0% found this document useful (0 votes)
113 views11 pages

Charles Darwin University: HIT332: Embedded and Mobile Systems Casuarina Campus

This document provides instructions for a practical tutorial on basic schematic design concepts using the open-source KiCad software package. Students will learn how to create a new schematic document in KiCad, draw a simple circuit schematic diagram, and understand the basic tools and features in KiCad for electronic schematic design. The tutorial circuit involves drawing the schematic for a self-oscillating astable multivibrator circuit with four resistors, two capacitors, two transistors, and one connector.

Uploaded by

Nguyen Anh Thang
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
113 views11 pages

Charles Darwin University: HIT332: Embedded and Mobile Systems Casuarina Campus

This document provides instructions for a practical tutorial on basic schematic design concepts using the open-source KiCad software package. Students will learn how to create a new schematic document in KiCad, draw a simple circuit schematic diagram, and understand the basic tools and features in KiCad for electronic schematic design. The tutorial circuit involves drawing the schematic for a self-oscillating astable multivibrator circuit with four resistors, two capacitors, two transistors, and one connector.

Uploaded by

Nguyen Anh Thang
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Charles Darwin University

HIT332: Embedded and Mobile Systems


Casuarina Campus
Practical No. 1: Basic schematic design concepts

This practical / tutorial is designed to give you an introduction to schematic design concepts
relevant to embedded system development. Specifically, this tutorial will introduce the
process of drawing a schematic diagram for a circuit design using the open-source package
KiCad. Once a schematic has been drawn, the design can then be prototyped, source code
developed and debugged and a PCB design could then be created to build the final product.

By the end of this tutorial you should;

• understand how to create a new schematic document using the KiCad Electronics
Design Automation (EDA) suite,
• be able to use the tools in KiCad to draw a schematic diagram.

IMPORTANT
Read the instructions carefully, and follow each step in the correct order. In particular,
make sure that you are logged into the INTERNET before connecting the board or starting
the software for the first time.

Before you begin


1. Download or copy of the CDU Embedded System Toolbox
package and extract the zip file to a convenient location. You
should end up with the following files and folders in the
extracted directory. This package contains all the software
tools, documentation and supporting files you will need for
completing these practical exercises.
2. Log into the internet.
3. BEFORE CONNECTING THE BOARD, make sure you have internet access on the
computer you are using (check that you can visit a website outside CDU). Windows
needs to access the windows update server to successfully install the driver. If your
computer cannot access the server, the driver install will fail.
4. Use a USB cable to connect the development board to an available USB port on the
computer. Windows should detect the board and begin the process of searching
windows update for the driver and then installing the driver. You should see a pop-
up as shown below.
5. If you click the pop-up you can see more information about the installation process.
If everything was successful, after some time you should see the message “Ready to
use”.

Alternatively, if you do not click the pop-up you should see the following pop-up
when installation is successful.

You will see that the board is installed as a USB Serial Port device and assigned a
COM port number (your COM port may be different). Your development board is
now installed and ready to use.

In all of these practical exercises, to minimise errors and maximise your success, make
sure you read the instructions carefully, enter commands and source code exactly as
shown and pay careful attention to wiring up your circuits. If you are unsure about
anything, ask you instructor for assistance.

Please make sure there are no spaces in file or directory names.


The ‘CDU Embedded System Toolbox’
The software tools we will use for all practical sessions during this semester have been
combined into a package referred to as the ‘CDU Embedded System Toolbox’. To make
things easier, a simple ‘Launcher’ program provides a central menu to enable quick access
to each of these tools.

1. Double click the Launcher.exe program to start


the main interface.

This is the main menu you will be using for all


practical sessions in this semester. It gives access to a
number of tools which you will use for various
development tasks. Clicking each of the buttons
launches the respective tool. Each tool can be closed
individually when you are finished using it.

Note that if the development board is not connected,


some tools are not available. Each of the tools are
described below, along with their corresponding
button in the launcher.

Launches notepad++, a powerful


and flexible text editor. Used for
viewing/editing source code files.

Launches KiCad, an Open Source


Electronics Design Automation
(EDA) suite.
Launches an interface for
compiling source code and
uploading the compiled code to
the microcontroller.
Launches an interface for the on-
board oscilloscope, waveform
generator and digital logic
analyser. This can be used for
various debugging tasks.
Launches a basic serial terminal.
This may be used to
communicate with a program
running on the microcontroller.
Launches the windows command
line. Used for manually running
the development tools if
required.

Introduction to KiCad
KiCad is an open-source software tool for creating electronic schematic diagrams and PCB
layouts. It is a collection of tools, however we will focus on the schematic
editor only.

1. To start KiCad, from the CDU Embedded Toolbox, click the Launch
KiCad button.
2. You should now see the main KiCad manager window. This interface allows you to
access the various tools available within the KiCad suite. You can also see the files in
your currently open KiCad project.

The KiCad manager has 8 buttons for different tools. These tools are described below:

Eeschema The schematic editor.

The component editor and component library


LibEdit
manager.

Pcbnew The PCB layout editor.

FootprintEditor The PCB footprint editor and footprint library manager.

Gerbview A GERBER file viewer. It can also show drill files.


A tool to build a footprint or a component from a B&W
Bitmap2component
bitmap image to create logos.

Pcb Calculator A tool to calculate track widths, and many other things.

The Page Layout editor, to create/customise frame


PL Editor
references.

The project tree view on the left shows the files in the current project directory. The top
toolbar gives access to basic project file operations (hover your mouse over the buttons
for a description).

Creating a new KiCad project


1. To create a new KiCad project, from the KiCad manager window, select File >> New
Project >> New Project.
2. Navigate to the projects directory in the extracted CDU Embedded System Toolbox
and create a new directory named “practical1”. Select this directory and name the
project “practical1”. The project file will automatically take the extension ”.pro”. All
your project files will be saved in this directory. It is recommended to use a unique
directory for each KiCad project. To avoid problems, do not combine multiple
projects into a single directory.

Creating a schematic document


1. Start the schematic editor “Eeschema” by clicking the first button from the left in the
KiCad manager window. The schematic editor then opens.
2. Select File >> Page Settings, or click the corresponding button on the toolbar. Check
the paper size is A4 and the orientation is landscape. Enter the title as “Practical 1”.
You will see that more information can be entered here if necessary. Click Ok. This
information will populate the title block on the schematic.
3. Now save the schematic project, select File >> Save Schematic Project. You will see
the schematic document is shown in the project tree view.

Drawing the schematic


Below is a picture of a hand-drawn schematic that we will be capturing into KiCad’s
schematic editor. It is a rather simple circuit consisting of 4 resistors, 2 capacitors, 2
transistors and 1 connector. This particular circuit is a self-oscillating, astable multivibrator.
Locating components and loading the libraries
KiCad includes a number of built-in libraries for common components. In addition to these
libraries, included with the files in the CDU Embedded System Toolbox is a library called
“CDU_KiCad_Library”. This library contains components which will be useful for this series of
practical exercises. You should add this library to every project you create this semester.

1. To add this library to the project, select Preferences >> Component Libraries.
2. Click on the upper “Add” button (next to the component library files list). Browse to
the CDU Embedded Toolbox directory, then the “CDU_KiCad_Library” directory and
finally select the “CDU_KiCad_Library.lib” file.
3. If the library is not at the top of the list, select it and move it up with the Up button.
4. Click Ok.

Placing components on your schematic


First place the two transistors, Q1 & Q2. For the basic layout of the circuit, refer to the hand-
drawn schematic.

1. Select Place >> Component, or


select the corresponding icon
from the right toolbar. You can
also use the shortcut key P. For
a list of all the shortcut keys,
hold shift and press the ? key.
2. Click somewhere on the
schematic sheet to open the
Choose Component window.
First we will place the
transistors, so enter “2n3904”
in the filter field at the top. You
should see the component has
been found in the
CDU_KiCad_Library.
3. Select the 2N3904 component and click Ok.
4. Move the cursor / floating transistor and place it slightly to the left of the middle of
the sheet. Click to place the transistor onto the schematic sheet.
5. Click again to place another transistor, you should find that the 2N3904 is still
selected in the choose component window, click Ok.
6. Referring to the hand-drawn schematic, you’ll notice that Q2 is the mirror of Q1. To
flip the orientation of the transistor that is floating on the cursor, press the Y key.
This flips the component horizontally (around the Y axis). For future reference, the X
key will flip the component vertically (around the X axis ) and the R key will rotate
the component through 90° each press (i.e. four presses of the R key will rotate the
component through 360°, leaving it as was).
7. Move the cursor / floating transistor and position the part (do not place / click yet)
to the right of Q1. Use the mouse scroll wheel to zoom in so you can place the part
more accurately. To pan left-right and up-down hold the Ctrl or Shift key while
scrolling the mouse wheel. When you are happy with the position, click to place the
part.
8. After you have placed the component, you can also hover the mouse over the
component and use the X, Y and R keys to change the orientation.

Next, place the four resistors:

1. Use the filter field in the component selector and enter “res”. Select the RES
component from the CDU_KiCad_Library.
2. While the resistor is floating on the cursor, press the E key to open the component
properties window. The component properties window should appear as shown
below.
3. In the fields list, select the value field. Change the Field Value from RES to 100k and
then click Ok.
4. Position the resistor slightly to the left and above the base of Q1 (again refer to the
hand-drawn schematic), adjust the rotation and then click to place the part. Make
sure that no part of the resistor is touching the transistor as all components will be
wired together later. If you need to move a component after it is placed, position the
cursor over the component and press the M key.
5. Now place the other 100K resistor R2 above and to the right of the base of Q2. You
can hover over the first resistor and press the C key to copy the resistor and then
click to place it in position.
6. R3 and R4 have a value of 1K, so press the E key and change the Value field to 1K.
7. Place R3 and R4 as appropriate then press Esc to exit part placement mode.
8. You can also edit the component value after placing the component by hovering
your mouse over the component and pressing the E key. If you hover over the
displayed value next to the component on the schematic and press E, a different
window will open to allow changing only the value field.
9. Alternatively, you can right-click on the component and choose Edit Component >>
Edit.
10. To delete a part, hover over the component and press the Delete key.

Next, place the two capacitors:

1. Set the filter field to “cap” and select the component “CAP” from the
CDU_KiCad_Library.
2. Set the value and place the capacitors according to the supplied schematic.
The connector is the last component to be placed, it is also located in the
CDU_KiCad_Library.

1. Use the filter field to find the “conn_2” component and place it in the schematic.
2. Remember, to exit the part placement mode (or any other mode), press the Esc key.
3. Save the schematic with File >> Save Schematic Project.

All of the components should be well spaced with plenty of room to wire each component
pin. This is important because you cannot place a wire across the bottom of a component
pin to get to a pin beyond it. If you do, both pins will connect to the wire. Basically, if you
place a wire over a component they will become joined, however if you place a wire over
another wire they will not become joined unless done so explicitly using a junction.

Wiring up the circuit


Wiring creates connectivity between the various components of your circuit. Complete the
following steps to wire up your schematic.

1. Fit all of the components on the screen by either panning or zooming.


2. First we will wire the bottom pin of resistor R1 to the base of transistor Q1. Use the
shortcut key W (or Place >> Wire from the menus) to enter wire placement mode. If
you use the shortcut key W the wire placement will start immediately from where
your cursor is located. You can press Esc to cancel drawing the current wire.
(Pressing Esc again will exit the wire placement mode).
3. Position the cursor over the bottom end of R1. Click on the small circle at the end of
R1 then click on the small circle on the base of Q1. You can zoom and pan while you
are placing the connection is necessary.
4. Note that KiCad remains in wire mode, ready to place another wire.
5. Now wire C1 to Q1 and R1. Position the cursor over the left pin of C1 (the small
circle) and left-click to start a new wire. Move the cursor horizontally until it is over
the wire connecting the base of Q1 to R1. Left-click to place the wire segment. You
should now see a junction at this point.
6. Wire up the rest of your circuit as shown in the figure below. Note the following:
a. Note 1: Wiring between components does not have to be completed in two
steps (or clicks) as you have done so far. There can be many clicks in
between, to anchor the wire around components in the way
b. Note 2: To delete a wire, first exit wire placement mode with right-click then,
End Tool. Alternatively, press Esc. Next, hover over the wire and press the
DELETE key.
c. Note 3: To move or re-route a wire, hover over the wire and press G. The
behaviour is different if you hover at a corner, end or in the middle of a wire.
Try it!
d. Note 4: If you wish to move a component and drag any wires connected to it,
hover over the component and press G. If you hover and press M, the
component will move while the wires remain. Try it!
7. When all wiring has been completed, exit wire placement mode. The cursor will
revert back to the standard arrow.

Annotating the components


You will have noticed that we did not set the component reference values when we placed
them onto the schematic. If you want to set these values manually you can do so in the
component properties window (using the E key) as you did to change the component value .

1. Hover over the resistor R1 and press E. The component properties window will open
and you can change the reference field to R1.
2. You can also hover over the reference field (R?) and press E to achieve the same
thing.

While we could annotate our schematic this way, it


is often convenient to automatically annotate the
reference values.

1. From the menu, select Tools >> Annotate


Schematic.
2. The Annotate schematic window will open.
This window has a number of options but
the default settings are generally ok.
3. Click Annotate, you will be asked to
confirm, click Ok.
4. You will notice that the values are not the
same as the hand-drawn schematic since
they were assigned automatically based on
the component position.

Checking for errors


To check the schematic for errors you can run the Electrical Rules Check:

1. From the menu, select Tools >> Electrical Rules Checker.


2. Click Run, if there are no errors then the error list should be empty. Click Close.
3. Now we will simulate an error. Hover over the wire connecting to the base of Q1 and
press Delete.
4. Run the electrical rules check again and you should see an error indicating an
unconnected pin.
5. Now fix the error by selecting Edit >> Undo from the menus [shortcut Ctrl+Z]. The
wire you deleted previously should now be restored. If not, simply re-wire it.
6. Run the electrical rules check again to make sure the error is fixed.
7. Save the schematic project.

Congratulations! You have completed Practical No. 1.

You might also like