Using Logic Gates to Make a Fire Alarm
Simple circuits made of up the different types of logic gates – NOT, OR, AND, NOR, NAND, XOR, XNOR – can be used to perform simple and useful tasks. Because the circuits are simple and the logic gates are reliable and mass produced, the circuits are reliable.
One such is the circuit used to make a fire alarm. The circuit is required to switch on when activated then sound a buzzer continuously. The circuit is shown below.
The buzzer is initially off so the output from A is 0. This requires the output from B to be 1. There being no fire, the thermistor is cold and it's resistance is high, so there is a voltage across it and input 1 to A is 1 (as well as input 2). When the thermistor is warmed by a fire, it's resistance falls, as does the voltage across it, and input 1 falls to 0. The output from A becomes 1 so there is a voltage across the buzzer, which sounds.
Input 3 to B becomes 1, and since input 4 is also 1, the output from B becomes 0. The inputs to A are 1 and 0, so the output stays at 1. To reset the alarm the rest switch must be pressed. This will make input 4 into a 0, so the output from B will be 1 and A will have inputs of 1 and 1, so output 0 as originally.