Process: AND gate
|Applications||LINKS . . .|
Back to Contents Back to Beastie Zone
The symbol for a 2-input AND gate looks like this:
Input voltages can be LOW, logic 0, or HIGH, logic 1, and the gate obeys the following truth table:
|input B||input A||output|
The output becomes HIGH only when input A AND input B are HIGH.
This is the symbol for a 3-input AND gate:
As you can see from the truth table, the output becomes HIGH only when all three inputs are HIGH:
|input C||input B||input A||output|
A 3-input AND gate can be made by joining, or cascading, 2-input gates:
Cascading works with AND and OR gates, but not with NAND and NOR.
Most security lights and garden floodlights have a PIR, or passive infra-red device which is sensitive to heat radiation. When a hot object such as an intruder or the neighbour's cat, is detected the heat sensor gives a HIGH voltage, logic 1. During the day, the floodlight doesn't light up, but, when it is dark, the floodlight comes on if the heat sensor is triggered. Typically, the floodlight remains on for a few moments after the intruder/cat has gone.
A system like this requires an AND gate:
Block diagram of a garden floodlight system
The floodlight is triggered when it is dark AND an intruder/cat is detected.
The monostable provides a single pulse when triggered. The output of the AND gate goes HIGH briefly, but the monostable output goes HIGH and stays HIGH for a definite interval known as the period of the monostable. The transducer driver is needed because the floodlight is a high current device. The output of the monostable will not provide enough current. The transducer driver boosts the current so that the floodlight will illuminate correctly.
In commercial systems, a relay is used to switch the floodlight ON and OFF. A mains floodlight is used. This is safe provided the floodlight is installed by a competent and suitably qualified electrician.
For safety reasons, you must NEVER connect circuits directly to the mains supply.
Here is the subsystem diagram, or block diagram, for a bath alarm which will sound an alarm before the water in the bath overflows:
The float sensor consists of a voltage divider with a float switch at the top and a 100 kW pull down resistor at the bottom. If the water level rises above a critical level, the float switch closes and the output of this subsystem becomes HIGH, logic 1.
The astable, or pulse generator, produces pulses. Its output alternates repeatedly from HIGH to LOW. The float sensor provides a control input to the AND gate. If the control input is LOW, the output of the AND gate remains LOW. However, if the control input goes HIGH, the output of the AND gate starts to produce pulses, alternately HIGH and LOW, following the astable.
The transducer driver is needed to provide enough current to drive the buzzer. When the bath is full, the buzzer pulses ON and OFF.
It is easy to model this system using the system blocks provided by Crocodile Technology ©:
Launch the simulation by clicking on the diagram.
The 4081 integrated circuit provides four 2-input AND gates which can be used independently. Like all 4000 series devices, the 4081 works with power supply voltages in the range 3-16 V. In your final design, any unused inputs should be connected either to 0 V or to the +V power supply. (You don't need to do this for circuits on prototype board.) Unused outputs are left unconnected.
In the 74LS series, the 74LS08 provides four 2-input AND gates. As you can see, the pin connections are different!
74LS series devices usually require a regulated 5 V power supply. The LM7805 and LM78L05 are suitable power supply regulator devices.
The 74HC08 is a pin-compatible replacement for the 74LS08, with improved electrical properties and a wider range of power supply voltage.
Although 74HC series devices are designed to work with a 5 V power supply, voltages between 3 V and 6 V are allowed and most circuits work well using 4.5 V (3 x 1.5 V cells). Don't use a 9 V power supply!
Details about these integrated circuits are given elsewhere in the Beastie Zone. Click the diagrams to follow these links.
There are other ways of making AND gates. In the diagram below, an industrial machine is represented by a motor:
The machine won't start unless the safety guard is closed.
If a single AND gate is needed, think about using this diode/transistor circuit:
It's not immediately obvious how this arrangement works as an AND gate. Run the simulation by clicking on the diagram and follow through the truth table to confirm that the output goes HIGH only when both inputs are HIGH.
Cross references in the Beastie Zone:
4081 quad 2-input AND gate, 4073 triple 3-input AND gate, 4082 dual 4-input AND gate
74LS08 quad 2-input AND gate, 74LS11 triple 3-input AND gate
74HC08 quad 2-input AND gate
Back to Contents Back to Beastie Zone