mfgg-135, ece lab2 pwm servo driver board...
TRANSCRIPT
Electrical and Computer Engineering Department
Kettering University
IME-100
ECE
Lab 2
2-1 G. Tewolde, IME100-ECE, 2017
Getting Started 1. Laboratory Computers
i. Log-in with User Name: Kettering Student (no
password required)
ii. IME-100 information (Lab presentation, files, etc.) in folder
on desktop
iii. NI programs (MultiSim, Ultiboard) under the Start menu
iv. At the end of lab, Logout of computer; arrange keyboard
and mouse
2. Laboratory Instrumentation
i. Use instrumentation only when instructed
ii. At the end of lab, turn instrument power off, neatly arrange
leads on bench
2-2 G. Tewolde, IME100-ECE, 2017
IME-100, ECE Lab2
Circuit Board Assembly and Test
In this laboratory exercise, you will do the following:
• Read and interpret the schematic diagram of a traffic light
circuit
• Identify common electronic components
• Assemble/solder a traffic light printed circuit board
• Perform a functional test of the traffic light circuit using
standard laboratory equipment/instrumentation
• Debug the circuit if necessary
2-3 G. Tewolde, IME100-ECE, 2017
Traffic Light Printed Circuit Board
3D visualization of PCB design
Actual PCB
2-4 G. Tewolde, IME100-ECE, 2017
G. Tewolde, IME100-ECE, 2017
Siren Circuit Schematic Diagram
2-5
Traffic Light Circuit Kit Parts List
• 1 Traffic light PCB
• 1 LM555 Timer IC
• 1 4017 decade counter IC
• 1 4072 dual 4-input OR gate IC
• 2 10 mF capacitor
• 3 10 nF (0.01 mF) capacitors
• 1 120 Ω resistor
• 1 3.3 kΩ resistor
• 1 47 kΩ resistor
• 1 100 kΩ potentiometer
• 1 green LED
• 1 yellow LED
• 1 red LED
• 1 6-pin header
• 1 8-pin IC socket
• 1 14-pin IC socket
• 1 16 pin IC socket
2-6 G. Tewolde, IME100-ECE, 2017
G. Tewolde, IME100-ECE, 2017
Resistors and Capacitors
•Units of capacitance are Farads, (F).
•Values in μF (microFarads) or nF (nanoFarads).
•Two types of capacitors used
1) C1 is electrolytic (polarized - μF values)
2) C2, C3 and C4 are polyester or ceramic disk (non-
polarized - nF values)
•¼ W resistors. Values in Ω (Ohms) or kΩ (kilohms).
•Values indicated by color code
2-7
Capacitors
•Capacitance value
indicated by numerical
code or literally printed
on package
•Voltage rating is
important and either
encoded or printed on
package
Capacitors temporarily store electrical charge (called charging up the
capacitor) for release back into the circuit at a slightly later time
(called discharging the capacitor). Capacitors and resistors are often
used in combination to control how fast charging and discharging can
take place.
Electrolytic
Ceramic Disc
Negative lead is
marked on package.
Negative lead is
also cut shorter
than the positive
lead. Not polarized
Polyester
2-8 G. Tewolde, IME100-ECE, 2017
Polyester and Ceramic Disc
Capacitors
Polyester and Ceramic Disc capacitors are non-polarized. Their
orientation in a circuit does not matter. They have values less
than 1 mF. Their values are often represented by a numerical code.
101 = 100 pF 102 = 1 nF = .001 μF
221 = 220 pF 103 = 10 nF = .01 μF
331 = 330 pF 104 = 100 nF = .1 μF
471 = 470 pF
Capacitor Code
10 3
2A103J
2-9 G. Tewolde, IME100-ECE, 2017
Electrolytic Capacitors Electrolytic capacitors are polarized, i.e. they have a positive, +, and
a negative, -, lead. They MUST be connected into a circuit with the
correct orientation. They have values greater than 1 mF. Their value
and the negative lead are marked on the side of the capacitor. The
negative lead is also cut shorter than the positive lead.
+
-
C = 10 mF
Negative lead is
shorter
Capacitance
value, voltage
rating, and – sign
marked on side of
package
2-10 G. Tewolde, IME100-ECE, 2017
Resistors
•Resistance value usually
indicated by color code
•Physical size determines
power rating
Resistors allow designers to incorporate a known amount of resistance
into a circuit in order to limit the current flow or to generate a particular
voltage level.
¼ W resisor
2-11 G. Tewolde, IME100-ECE, 2017
Resistor Color Code
2-12 G. Tewolde, IME100-ECE, 2017
Resistor Color Code
2nd Band
4th Band
Example:
•First color band is Brown = 1
•Second color band is Black = 0
•Third color band is Red = x100
•Fourth color band is Gold = 5% tolerance
•Resistor value is 10 x 100 = 1,000 Ω = 1 kΩ
±50 Ω (i.e. 950 Ω < R < 1,050 Ω)
3rd Band
1st Band
2-13 G. Tewolde, IME100-ECE, 2017
Resistor color codes for Traffic Light Circuit
1 120 Ω resistor Brown Red Brown Gold
1 3.3 kΩ resistor Orange Orange Red Gold
1 47 kΩ resistor Yellow Violet Orange Gold
Qty Value Color Code
Exercise:
Fill in the appropriate Color Code
2-14 G. Tewolde, IME100-ECE, 2017
Resistor color codes for Traffic Light Circuit
1 120 Ω resistor Brown Red Brown Gold
1 3.3 kΩ resistor Orange Orange Red Gold
1 47 kΩ resistor Yellow Violet Orange Gold
Qty Value Color Code
Exercise:
Fill in the appropriate Color Code
2-15 G. Tewolde, IME100-ECE, 2017
Resistor color codes for Traffic Light Circuit
1 120 Ω resistor Brown Red Brown Gold
1 3.3 kΩ resistor Orange Orange Red Gold
1 47 kΩ resistor Yellow Violet Orange Gold
Qty Value Color Code
Exercise:
Fill in the appropriate Color Code
2-16 G. Tewolde, IME100-ECE, 2017
Resistor color codes for Traffic Light Circuit
1 120 Ω resistor Brown Red Brown Gold
1 3.3 kΩ resistor Orange Orange Red Gold
1 47 kΩ resistor Yellow Violet Orange Gold
Qty Value Color Code
Exercise:
Fill in the appropriate Color Code
2-17 G. Tewolde, IME100-ECE, 2017
Variable Resistors or
Potentiometer (Pot) • A potentiometer is a three-terminal resistor with a sliding or
rotating contact. It provides variable resistance value between
one end of the device and the wiper.
• Pots are useful for applications such as volume, brightness,
and speed control.
• In the traffic light circuit the 100 KΩ potentiometer is used to
allow the user to change the speed of the pulses generated by
the 555 timer module. This in turn helps to control the
switching speed of the traffic signals.
2-18 G. Tewolde, IME100-ECE, 2017
Integrated Circuits, ICs
•ICs combine all the basic
electronic components into a
complete miniature circuit
fabricated on a single piece of
semiconductor material
(silicon). Thousands of very
complex circuits can be
fabricated on small silicon chips
simultaneously. These circuits
are reliable, operate at high
speed and are relatively
inexpensive.
2-19 G. Tewolde, IME100-ECE, 2017
Integrated Circuits, ICs ICs come in a variety of packages. One of the most common is the
Dual-In-Line (DIP) package. ICs must be properly oriented on the
circuit board. The pins (leads) are numbered according to a scheme
tied to an index mark on the package.
•Usually a notch
index mark indicates
the head of the chip.
Pin 1 will be in the
upper left hand
corner.
• Sometimes Pin 1 is
marked with a small
circle indent mark
Notch index
Pin 1
Pin 1
small circle
pin 1
Indent mark
2-20 G. Tewolde, IME100-ECE, 2017
Integrated Circuits, ICs Once Pin 1 is identified, the other pins of the DIP follow according to
the pattern below. The highest numbered pin is always opposite pin 1.
8-pin DIP 14-pin
DIP
1
2
3
4
8
7
6
5
1
2
3
4
5
6
7
14
13
12
11
10
9
8
2-21 G. Tewolde, IME100-ECE, 2017
G. Tewolde, IME100-ECE, 2017
Assemble the Traffic Light Circuit
2-22
Assemble the Traffic Light Circuit
IC sockets
LEDs
Resistors
Capacitors
PCB
6-pin
header
2-23 G. Tewolde, IME100-ECE, 2017
G. Tewolde, IME100-ECE, 2017
Assemble the Traffic Light Circuit
Tools needed
Wire cutter
/wick
2-24
Step 1) Insert and solder the resistors R1, R2 and R3 in place.
2-25 G. Tewolde, IME100-ECE, 2017
Step 1) Insert and solder the resistors
in place. Start with R1, then go on to
R3 and R4, etc.
2-26 G. Tewolde, IME100-ECE, 2017
Step 2) Insert and solder the on-polarized
10 nF capacitors, C2, C3 and C3, in place.
2-27 G. Tewolde, IME100-ECE, 2017
Step 2) Insert and solder the on-polarized
10 nF capacitors, C2, C3 and C3, in place.
2-28 G. Tewolde, IME100-ECE, 2017
Step 3) Insert and solder the polarized 10 μF
capacitor. The negative lead is cut shorter
than the positive lead and is marked on the
side of the package.
2-29 G. Tewolde, IME100-ECE, 2017
Step 3) Insert and solder the polarized 10 μF capacitor, C1, in
place. The negative lead is cut shorter than the positive lead and
is marked on the side of the package.
Positive terminal of C1is
marked on the board
Negative lead of C1 is
marked on the package
2-30 G. Tewolde, IME100-ECE, 2017
Step 4) Insert and solder the green, yellow and
red LEDs in place.
2-31 G. Tewolde, IME100-ECE, 2017
LEDs are polarized. The positive lead
ls longer than the negative lead. The
negative end is on the Fflat side of the
package.
Place the negative leads of the LEDs in
the holes closest to the board edge
Step 4) Insert and solder the green, yellow and
red LEDs in place.
2-32 G. Tewolde, IME100-ECE, 2017
(
Pin 1 index mark
Step 5) Insert and solder the 16 pin, 14 pin and 8 pin IC
sockets in place. There is a notch index that indicates the pin 1
orientation. (Use some tape to help hold the socket in place
when you turn it over to solder)
2-33 G. Tewolde, IME100-ECE, 2017
Step 5) Insert and solder the 16 pin, 14 pin and 8
pin IC sockets in place. There is a notch index
that indicates the pin 1 orientation.
2-34 G. Tewolde, IME100-ECE, 2017
Step 6) Insert and solder the 3-pin
potentiometer (variable resistor),
R4, in place.
2-35 G. Tewolde, IME100-ECE, 2017
Step 6) Insert and solder the 3-pin potentiometer (variable
resistor), R4, in place. If you place the potentiometer pins in
a different direction the way you turn the screw for increasing
or decreasing the resistance values will be reversed.
Pin 1 is on the
screw side
2-36 G. Tewolde, IME100-ECE, 2017
Step 7) Insert and solder the 6-pin
header, J1, in place.
2-37 G. Tewolde, IME100-ECE, 2017
Step 7) For convenience first insert the 6-pin header, J1, in a
breadboard, then place the PCB in place with the header
inserted in its socket. (The longer leads remain in the
breadboard. The shorter leads come out on the component
side of the PCB as shown in the figure)
2-38 G. Tewolde, IME100-ECE, 2017
Completed Traffic Light Printed Circuit Board
R3
R2
C1
C2
14
7 1
8 LM556
R4
R6
R7
C3
8 Ω Speaker
C4
4.3 V Power bus
Ground bus
-
+ -
-
+
Insert the 16-pin, 14-pin, and
8-pin ICs, in their sockets.
Align the notch index of the IC
to that of the socket. If it is
placed the wrong way the chip
could get damaged. Be careful
when inserting the chips so you
do not bend the pins. Ask the
instructor if you need help.
2-39 G. Tewolde, IME100-ECE, 2017
Functional Test of the Traffic Light Circuit
Arduino board
to provide 5V
power
Digital oscilloscope
with 2-channels
2-40 G. Tewolde, IME100-ECE, 2017
Functional Test of the Traffic Light Circuit…
Attach USB cord from a powered
PC to an Arduino on your desk.
This gives power to the Arduino.
To provide power to your traffic light
circuit, connect a wire from the Arduino
5V pin to the 5V pin of the PCB board.
And connect GND from the Arduino board
to GND of the PCB.
If the circuit assembly is done
correctly, you should see the
correct sequencing of the lights
on the LEDs. You can change the
setting on the potentiometer to
change the timing of the traffic
signals.
[Demonstrate for your instructor]
2-41 G. Tewolde, IME100-ECE, 2017
Functional Test of the Traffic Light Circuit…
Wirings to display signals
on the oscilloscope.
Attach another GND wire from the
Arduino to GND (Black) wire of one
of the oscilloscope probes.
Attach a wire from the
CLK pin of the PCB to
the red wire of channel
1 of the oscilloscope.
Attach a wire from Red (R) pin of the PCB to the
red wire of channel 2 of the oscilloscope.
5V and GND wires are
connected between Arduino
and the PCB
2-42 G. Tewolde, IME100-ECE, 2017
G. Tewolde, IME100-ECE, 2017
Functional Test of the
Traffic Light Circuit…
CLK
pulses
Red (R)
light
Repeat the test with the Yellow
(Y) and Green (G) lights
2-43
Homework: For the Curios You …
Due: Beginning of 3rd Week Lab
Think about ways in which you could improve
the functionality of the basic traffic light circuit,
by considering features that would be useful. Be
open to include additional inputs to control the
traffic light circuit in different ways.
Research and brainstorm your ideas with
your lab partners to cover many possible
scenarios.
Turn in a one page report for your answers.
2-44 G. Tewolde, IME100-ECE, 2017
Finishing Up (and to get full-credit in the lab)
1. Clean-up at bench – Leave it better than you found it!
i. Pick-up any spare parts, wire-trimmings, etc
ii. Detangle and coil wire leads
iii. Soldering stations and tools neatly arranged
iv. Turn off instrument power, arrange neatly
v. Logout of computer; arrange keyboard and mouse
vi. Neatly arrange the chairs
2. Check-out with the instructor
i. Leave the check-out sheet with your group names at
your station
2-45 G. Tewolde, IME100-ECE, 2017
Lab 2 Check-Out Sheet (to be left on the bench at the end of lab)
Group Members (please print name clearly):
Instructor (check all that apply):
□ Traffic Light Printed Circuit Board assembled
□ Functional audio test of Traffic Light Circuit
□ Functional Oscilloscope test of Traffic Light
Circuit showing CLK and one of the traffic light
signals (G, Y, R), one at a time.
□ Computer Logout
□ Bench clean-up
Wires, detangled and coiled,
Disposal of wire clipping, etc.
Soldering equipment arranged
Instrument power off and arranged
Keyboard and Mouse arranged
Chairs arranged
Additional Comments:
2-46 G. Tewolde, IME100-ECE, 2017