1 Electronics 4.4: Digital Processes Transistors and Digital Electronics Electronics 4.4: Digital...
-
Upload
elisabeth-bryan -
Category
Documents
-
view
267 -
download
10
Transcript of 1 Electronics 4.4: Digital Processes Transistors and Digital Electronics Electronics 4.4: Digital...
1
Ele
ctr
on
ics 4
.4:
Dig
ital P
rocesses
Transistors and Digital Electronics
Electronics 4.4: Digital Processes
2
Ele
ctr
on
ics 4
.4:
Dig
ital P
rocesses
Introducing Transistors
•This is the symbol for an NPN transistor.3
•Transistors are process devices.
3
Ele
ctr
on
ics 4
.4:
Dig
ital P
rocesses
Transistor Terminals
•Transistors have three terminals:
Collector
Emitter
Base
4
Ele
ctr
on
ics 4
.4:
Dig
ital P
rocesses
Transistor as a Switch
•Transistors can be used as switches.1
•Transistors can eitherconductconduct or not conductnot conduct current.2
•ie, transistors can either be onon or offoff.2
Transistor
Switch
5
Ele
ctr
on
ics 4
.4:
Dig
ital P
rocesses
How Transistors Work
•Switching is controlled by the voltage between the Base and the Emitter.
Collector
Emitter
Base
•When VBE < 0.7V the transistor switches off andno current flows between the Collector and the
Emitter.
•When VBE ≥ 0.7V the transistor switches on andcurrent flows between the Collector and the
Emitter.
6
Ele
ctr
on
ics 4
.4:
Dig
ital P
rocesses
Transistor Switching Example15
•When VBE is less than 0.7V the transistor is offand the lamp does not light.
•When VBE is greater than 0.7V the transistor is on
and the lamp lights.
X
Variable
VoltageSupply
12V
7
Ele
ctr
on
ics 4
.4:
Dig
ital P
rocesses
Transistor Circuit #1: Temperature-Controlled Circuit
•This transistor circuit containsa Thermistor.
•Because of the thermistor, this circuit is dependent on temperature.
•The purpose of this circuit is to turn on the LED when the temperature reaches . . .
Input = Voltage Divider
Process = TransistorOutput = LED
1) LED = Off.2) Heat the Thermistor.3) RThermistor .4) VThermistor .5) Voltage across 10k resistor
.6) Transistor switches on.7) LED = On.
8
Ele
ctr
on
ics 4
.4:
Dig
ital P
rocesses
Transistor Circuit #2: Light-Controlled Circuit•This transistor circuit contains
a Light-Dependent Resistor.
•Because of the LDR, this circuit is dependent on light.
•The purpose of this circuit is to turn on the LED when the light reaches a certain intensity.
Input = Voltage Divider
Process = TransistorOutput = LED
1) LED = Off.2) Cover LDR.3) RLDR .4) VLDR .5) Transistor switches on.6) LED = On.
9
Ele
ctr
on
ics 4
.4:
Dig
ital P
rocesses
Transistor Circuit #3: Time-Controlled Circuit•This transistor circuit contains
a Capacitor.
•Because of the capacitor, this circuit is dependent on the time taken to charge and discharge of the capacitor.
•The purpose of this circuit is to turn on the LED a short time after the switch is opened.
•Where would this circuit be found in a car?
Input = Voltage Divider
Process = TransistorOutput = LED
5) Open Switch.6) VC .7) Transistor switches on after
a short delay.8) LED = On.
1) Switch closed.2) VC = 0V.3) Transistor switches off.4) LED = Off.
10
Ele
ctr
on
ics 4
.4:
Dig
ital P
rocesses
Summary of Transistor Switching Circuits
•You are expected to know the purpose of a transistor switching circuit: the last three pages should help.4
• In each of the three circuits the input device is:
•A Voltage Divider using a
Thermistor
LDR
Capacitor
• In each of the three circuits the output device is:
an LED
11
Ele
ctr
on
ics 4
.4:
Dig
ital P
rocesses
Logic
12
Ele
ctr
on
ics 4
.4:
Dig
ital P
rocesses
•From Section 4.2 Output Devices, remember that digital signals have only two values,7
•“1” and “_”, or•“High Voltage” and “___ _______”, or
•“On” and “___”, or•“True” and “_____”.
Off
OnHigh Voltage
Low Voltage
Revision: Digital Signals
1
0
13
Ele
ctr
on
ics 4
.4:
Dig
ital P
rocesses
Introduction to Logic
•Many digital electronic processes aredesigned around “logic” circuits.
•The Inputs and Outputs in logic have only two values:
•0 & 1;•High & Low;•On & Off;•True and False.
•Logic is ideally suited to help designdigital electronic circuits because of its binary
nature.•We will look at some fundamental logic circuits.
14
Ele
ctr
on
ics 4
.4:
Dig
ital P
rocesses
Logic: Switches in Series
•The bulb will light only under certain conditions: what?
S1 S2
Complete the following:•The bulb will turn on only when switches S1 ___ S2 are closed, for all other combinations the bulb is off.
S1 S2 Lit
0 0 00 1 01 0 01 1 1
15
Ele
ctr
on
ics 4
.4:
Dig
ital P
rocesses
Logic: Switches in Parallel
S1
S2
•The bulb will light under certain conditions: what?
Complete the following:•The bulb will turn on when switches S1 ___ S2 are closed, for all other combinations the bulb is off.
S1 S2 Lit
0 0 00 1 11 0 11 1 1
16
Ele
ctr
on
ics 4
.4:
Dig
ital P
rocesses
Logic: Opposites!
S
•The bulb will light under certain conditions: what?
Complete the following:•The bulb will turn on when switch S is ____, and turn off when switch S is ______.
S Lit
0 11 0
•This circuit is for illustration only!• If this was a real circuit, what would happen to the battery
when switch S was closed?
17
Ele
ctr
on
ics 4
.4:
Dig
ital P
rocesses
Truth Tables
•The tables on the previous pages are truth tables.
Truth Tables list:•All combinations of all possible inputs,•Every Output for each combination of inputs.
•There are special circuits called logic gates whichcan be used in control situations.
S1 S2 Lit
0 0 00 1 01 0 01 1 1
S1 S2 Lit
0 0 00 1 11 0 11 1 1
S1 Lit
0 11 0
18
Ele
ctr
on
ics 4
.4:
Dig
ital P
rocesses
Logic Gates: AND
Two-Input AND Gate5
ANDTruth
Table8,16
A B Q
0 0 00 1 01 0 01 1 1
The output of an AND gate is 1 only when all inputs are 1.
Only when Input A AND Input B are 1, the output is 1.
•See page “Logic: Switches in Series”.
19
Ele
ctr
on
ics 4
.4:
Dig
ital P
rocesses
Logic Gates: OR
Two-Input OR Gate5
ORTruth
Table8,16
A B Q
0 0 00 1 11 0 11 1 1
The output of an OR gate is 1 when any input is 1.
When Input A OR Input B is 1, the output is 1.
•See page “Logic: Switches in Parallel”.
20
Ele
ctr
on
ics 4
.4:
Dig
ital P
rocesses
Logic Gates: NOT
NOT Gate5
NOTTruth
Table8,16
A Q
0 11 0
The output of a NOT gate is the opposite of the input.
When Input A is 0, the output is 1.When Input A is 1, the output is 0
Note that NOT gates have only one input.
•See page “Logic: Opposites!”.
21
Ele
ctr
on
ics 4
.4:
Dig
ital P
rocesses
Summary of Logic Gates and Truth Tables
Truth Tables list:6
•Every OutputEvery Output for everyevery combination combination of inputs.
AND GateA B Q
0 0 00 1 01 0 01 1 1
OR GateA B Q
0 0 00 1 11 0 11 1 1
NOT GateA Q
0 11 0
•Logic gates may have one or more inputs.6
22
Ele
ctr
on
ics 4
.4:
Dig
ital P
rocesses
Combinational Logic Circuits9,17
•Combinational Logic Circuits are simply circuits using a
combination of AND, OR and NOT gates.
•You are expected to design Logic Circuits andTruth Tables of simple combinational logic circuits.
23
Ele
ctr
on
ics 4
.4:
Dig
ital P
rocesses
Logic Circuit #1: Car’s Hot Engine•When a car’s engine becomes too hot an LED should light
but only when the ignition is switched on.
LED
IgnitionSwitch
Temperature
Sensor
Truth TableIgnitionTemperature OutputSwitch Sensor LED
Off Cold OffOff Hot OffOn Cold OffOn Hot On
•Here, the truth table is simply that for an AND Gate.
•For the LED to light, the Ignition Switch must be on and the Temperature Sensor must be “hot”.
1
1
24
Ele
ctr
on
ics 4
.4:
Dig
ital P
rocesses
Logic Circuit #2: Central Heating Pump•Derive a logic circuit that will turn on a Central Heating
System’s pump when the house is cold and the Central Heating System is turned on.
This time let’s find the truth table first:
•House is Cold = 0 ; House is Hot = 1•CHS is Off = 0; CHS is On = 1
Truth TableHouse CHS Pump
Cold Off OffCold On OnHot Off OffHot On Off
House CHS Pump
0 0 00 1 11 0 01 1 0
CentralHeating
Pump
1
10
Temperature
Sensor
25
Ele
ctr
on
ics 4
.4:
Dig
ital P
rocesses
Heater
Logic Circuit #3: Greenhouse Heater•Derive a logic circuit that will turn on a heater in a
greenhouse only when it gets cold at night.
Truth Table:•Greenhouse Cold = 0 ; Hot
= 1•Dark = 0; Light = 1
Truth TableGreen Day/Heaterhouse Night
Cold Night OnCold Day OffHot Night OffHot Day Off
Green D/NHeater
0 0 10 1 01 0 01 1 0
LightSensor 0
10
1
Temperature
Sensor
26
Ele
ctr
on
ics 4
.4:
Dig
ital P
rocesses
Summary of Combinational Logic Circuits
•Combinational Logic Circuits are simply combinations
of AND, OR and NOT gates.
Constructing Logic Circuits1) Make a Truth Table.
2) Get the logic circuit from the Truth Table.
•Tip: If the circuit has only one “high” outputthen the circuit will probably use an AND Gate.
•Tip: If the circuit has more than one “high” output
then the circuit will probably use an OR Gate.•Tip: Note how useful NOT gates are!
27
Ele
ctr
on
ics 4
.4:
Dig
ital P
rocesses
Clocks
•Clocks are normally square waves.
•Clocks are regular waves of pulses,just like the ticking of a conventional clock:
•Digital circuits can be used to producea series of clock pulses.10
•The circuits which produce clock pulses are sometimes called oscillators because they constantly oscillate between “on” and “off”.
28
Ele
ctr
on
ics 4
.4:
Dig
ital P
rocesses
A Simple Oscillator Circuit
•Supply Voltage VS = V1 +V2
• When the NOT-Gate outputs a 0, V2=0V and V1=5V:
the LED lights.
• When the NOT-Gate outputs a 1, V2=5V and V1=0V:
the LED does not light.
•Oscillator Circuits change between two valuesin a regular cyclical pattern: a clock output.
29
Ele
ctr
on
ics 4
.4:
Dig
ital P
rocesses
How an Oscillator Circuit Works18
1)The Invertor’s Input is 1, so its Output = 0:the Capacitor starts to discharge through the Resistor.
•Capacitor C charges and discharges through Resistor R.
•Start:ASSUME THE CAPACITOR IS
FULLY CHARGED.
2)As the Capacitor discharges the Invertor’s Input eventually falls to 0, so its Output becomes 1:
the Capacitor starts to charge through the Resistor.
3)As the Capacitor charges the Invertor’s Input eventually rises to 1, so its output becomes 0: the Capacitor discharges again.
4)This sequence of charging and discharging continues ad infinitum
to produce a series of clock pulses.
30
Ele
ctr
on
ics 4
.4:
Dig
ital P
rocesses
How an Oscillator Circuit Works (Alternative)
Capacitor NOT NOT V2 V1 LEDInput Output
Charged 1 0 0V 5V On
Discharged 0 1 5V 0V Off
Charged 1 0 0V 5V On
Discharged 0 1 5V 0V Off
31
Ele
ctr
on
ics 4
.4:
Dig
ital P
rocesses
How to Change a Clock’s Frequency19
•The frequency of clock pulses can be altered:
High Frequency
Low Frequency
•If the value of the Capacitor is increased, charging and discharging takes longer so the clock frequency is decreased.
•If the value of the Resistor is increased, charging and discharging takes longer so the clock frequency is decreased.
C then f
R then f
32
Ele
ctr
on
ics 4
.4:
Dig
ital P
rocesses
Counters
•Counters are electronic circuits whichcan count digital pulses from a clock.12
•Counters count the clock pulses in binary.13
1 2 3 4
33
Ele
ctr
on
ics 4
.4:
Dig
ital P
rocesses
Counting in Decimal
Binary Decimal
000000010010
etc
011110001001
etc
•Circuits called Binary-to-Decimal ConvertorsBinary-to-Decimal Convertorsconvert a counter’s binary output into
decimal.14
34
Ele
ctr
on
ics 4
.4:
Dig
ital P
rocesses
Devices using Counters
•You will be expected to name a devicewhich uses a counter.
•The most common device to usea counting circuit is an electronic clock or
watch.11
•Electronic timing devices workwith great accuracy.
•An electronic watch’s “clock circuit” generates regular pulses and a Counter simply counts these.
•The watch’s microprocessor is programmed to know how many clock pulses correspond to a second (and minute, hour etc) and will update the 7-segment display accordingly: thus displaying the time!