*04 Electronics (160-187).qxd
2/2/07
Key words light-dependent resistor (LDR) logic gate resitance thermistor
12:21 pm
Page 172
Combinational logic design 2 1 Switch for electric motor
2 Fire alarm +5V
1 Switch for electric motor ● With
the switch open, voltage across the NAND gate is high. This provides a low input to the NOT gate. The NOT gate provides a high output which activates the relay, completing the motor circuit. ● With the switch closed, voltage across the NAND gate is low. This provides a high input to the NOT gate. The NOT gate provides a low output which deactivates the relay, switching off the motor.
buzzer
thermistor
+5V
2 Fire alarm resistance of a thermistor falls with increasing temperature. ● The resistor and thermistor act as potential dividers. At low temperatures the thermistor’s resistance is high, thus the input to the NAND gate is high. The NAND gate acts as an inverter so its output is low. ● If there is a fire the thermistor’s resistance falls. The input to the NAND gate becomes low, its output high and the buzzer is turned on. ● The
0V
0V
driver
motor
driver
4 Non-sequential traffic lights AB R
3 Length detector +5V
3 Length detector
Y
© Diagram Visual Information Ltd.
● The
resistance of a light dependant resistor (LDR) falls with increasing brightness. ● When both LDRs are dark, voltage across them is high and inputs to the NAND gate are both high. This produces a high output at the second NAND gate, sounding the buzzer. ● If one LDR is moved towards a light its resistance falls, as does the voltage across it. When one input to the NAND gate is low its output is high; output of the second NAND gate will be low and the buzzer will not sound.
G
4 Non-sequential traffic lights ● The
four possible inputs can be used to illuminate different combinations of lights.
l
0V
A
B
R
Y
G
0
0
1
0
0
0
1
1
1
0
1
0
0
0
1
1
1
0
1
0