Intro to Electronics Week 5 Intro to Electronics, Week 5 Last updated Nov. 14, 2012 1
Build a Larson scanner (red moving Cylon eye) TODAY’S P PROJECT Intro to Electronics, Week 5 Last updated Nov. 14, 2012 2
Analog vs. digital • Continuous range of • Two voltages — high voltages and low – Can use any value – Can only use these two within certain limits values (0 and 1) – More susceptible to – Can lose some noise information • Useful for sound, light, • Useful for data storage, sensing, etc. processing, etc. Intro to Electronics, Week 5 Last updated Nov. 14, 2012 3
Analog vs. digital • Continuous range of • Two voltages — high voltages and low – Can use any value – Can only use these two within certain limits values (0 and 1) – More susceptible to – Can lose some noise information • Useful for sound, light, • Useful for data storage, sensing, etc. processing, etc. • Plenty of reasons to use both! Intro to Electronics, Week 5 Last updated Nov. 14, 2012 4
Digital logic • We’ll focus here on digital • Started with this a couple of weeks ago – Mainly talked about logic gates Intro to Electronics, Week 5 Last updated Nov. 14, 2012 5
Digital logic • More complex parts exist than just gates: – Multiplexers • Use one signal to control several outputs – Latches • Fundamental storage element — store a bit at a time – Adders, multipliers • Mathematical elements (add/multiply numbers) – etc. Intro to Electronics, Week 5 Last updated Nov. 14, 2012 6
Making zeroes and ones • Need to hold stable high and low voltages • How do we do that? – Already know how to set a high or low voltage • Use a switch to connect something to either positive or negative Intro to Electronics, Week 5 Last updated Nov. 14, 2012 7
Pull-up resistor • When switch is connected, output is 0 V (low) 1 k � • When switch is Out 6 V disconnected, output is ~6 V (high) • Avoids “floating” (unpredictable) output Intro to Electronics, Week 5 Last updated Nov. 14, 2012 8
Pull-up resistor Intro to Electronics, Week 5 Last updated Nov. 14, 2012 9
Pull-up resistor • Measure it with a multimeter! – Watch the voltage between the negative end of the batteries and the leg of the resistor that connects to the switch – Note the difference at different positions of the switch Intro to Electronics, Week 5 Last updated Nov. 14, 2012 10
Decimal counter • New component! • Ten (main) outputs – We’ll refer to them as outputs 0 through 9 • One (main) input – Called the “clock” Intro to Electronics, Week 5 Last updated Nov. 14, 2012 11
Decimal counter • Clock oscillates (goes back and forth) • Each time it goes high: – The currently active output turns off – The next output turns on • Counts from 0 to 9 and then loops back to 0 – Like a wheel in an old odometer Intro to Electronics, Week 5 Last updated Nov. 14, 2012 12
What works as a clock? • Anything that alternates between high and low – Quartz crystals – Resonant LC networks – Part of your credit cards’ magnetic stripes – 555 timer outputs! Intro to Electronics, Week 5 Last updated Nov. 14, 2012 13
Let’s try it 0.01 180 k � µF 555 180 k � Just the clock first: This is same 555 circuit as 0.22 last week, just with different µF resistors (and therefore a different frequency). 6 V Intro to Electronics, Week 5 Last updated Nov. 14, 2012 14
Let’s try it Elsewhere on the same breadboard: Connect up the counter. All of the resistors are the same. 5 4017 9 LEDs (just 1 to show which 4 0 output’s on) 8 2 6 6 V All gray resistors are 7 220 � 3 Intro to Electronics, Week 5 Last updated Nov. 14, 2012 15
Let’s try it 0.01 Put them together! 180 k � µF Clock 555 180 k � 0.22 5 µF 4017 9 LEDs (just 1 to show which 4 0 output’s on) 8 2 6 6 V All gray resistors are 7 220 � 3 Intro to Electronics, Week 5 Last updated Nov. 14, 2012 16
Let’s try it Intro to Electronics, Week 5 Last updated Nov. 14, 2012 17
What now? • We have a sequence of flashing lights • Can we make them go in a line back and forth? Intro to Electronics, Week 5 Last updated Nov. 14, 2012 18
Make a table! • Let’s use six LEDs Step ( (output) Whi hich L h LED t D to li light ht? 0 0 instead of 10 1 1 • At each step, let’s pick 2 2 which LED turns on 3 3 4 4 5 5 6 4 7 3 8 2 9 1 Intro to Electronics, Week 5 Last updated Nov. 14, 2012 19
Make another table! Step ( (output) LED D LED D Steps w whe hen i n it s sho hould ld b be o on n 0 0 0 0 1 1 1 1 or 9 2 2 2 2 or 8 3 3 3 3 or 7 4 4 4 4 or 6 5 5 5 5 6 4 7 3 8 2 9 1 Intro to Electronics, Week 5 Last updated Nov. 14, 2012 20
This or that • Need some way to say “when A or B is on, make Y turn on as well” Intro to Electronics, Week 5 Last updated Nov. 14, 2012 21
This or that • Already got one: the OR gate A A B B Y Y 0 0 0 A Y 0 1 1 B 1 0 1 1 1 1 Intro to Electronics, Week 5 Last updated Nov. 14, 2012 22
OR gate chip (74HC32) • Has four OR gates built in – How handy — we need four of them Intro to Electronics, Week 5 Last updated Nov. 14, 2012 23
The setup 0.01 180 k � µF 555 180 k � All gray resistors are 220 � 0.22 µF 32 4017 6 V Intro to Electronics, Week 5 Last updated Nov. 14, 2012 24
LED 1 0.01 180 k � µF 555 180 k � All gray resistors are 220 � 0.22 µF 32 4017 6 V Intro to Electronics, Week 5 Last updated Nov. 14, 2012 25
LED 2 0.01 180 k � µF 555 180 k � All gray resistors are 220 � 0.22 µF 32 4017 6 V Intro to Electronics, Week 5 Last updated Nov. 14, 2012 26
LED 3 0.01 180 k � µF 555 180 k � All gray resistors are 220 � 0.22 µF 32 4017 6 V Intro to Electronics, Week 5 Last updated Nov. 14, 2012 27
LED 4 0.01 180 k � µF 555 180 k � All gray resistors are 220 � 0.22 µF 32 4017 6 V Intro to Electronics, Week 5 Last updated Nov. 14, 2012 28
LEDs 0 and 5 0.01 180 k � µF 555 180 k � All gray resistors are 220 � 0.22 µF 32 4017 6 V Intro to Electronics, Week 5 Last updated Nov. 14, 2012 29
Done! 0.01 180 k � µF 555 180 k � All gray resistors are 220 � 0.22 µF 32 4017 6 V Intro to Electronics, Week 5 Last updated Nov. 14, 2012 30
Done! Intro to Electronics, Week 5 Last updated Nov. 14, 2012 31
That’s everything! • Thanks again for coming to the class! Intro to Electronics, Week 5 Last updated Nov. 14, 2012 32
Recommend
More recommend