A burglar alarm using a NAND gate and an LDR detects light. In the dark, input is high, but when light falls, resistance drops and the buzzer starts.

 

Apparatus

CRP123 power supply (6V), variable resistor (100k), NAND gate, buzzer, and breadboard.


Theory

A NAND gate is a combination of an AND gate followed by a NOT gate (inverter). The output of the NAND gate becomes high when any one or more inputs are low. The symbol for the NAND gate includes a small circle that represents the NOT operation.

The Boolean expression for the NAND gate is:
F = (A • B)’

The truth table for the NAND gate is shown below:

When a NAND gate is used to make a burglar alarm, one of its inputs is connected to a Light Dependent Resistor (LDR). The LDR’s resistance varies with light intensity.
In total darkness, the LDR has a resistance of about 10 MΩ, while in bright light, it decreases to a few hundred ohms. Because of this, the voltage across the LDR changes accordingly.

In the dark, the voltage drop across the LDR is large enough to make the input of the NAND gate 5V (logic 1). However, when light from a burglar’s torch shines onto the LDR, its resistance decreases, reducing the voltage drop to around 0.5V.
As a result, the input becomes logic 0, and the buzzer sounds at the output.
Thus, the circuit detects light changes and triggers the alarm effectively.

Burglar alarm circuit using NAND gate and LDR sensor.

Procedure

  1. Connect all components according to the circuit diagram.

  2. Adjust the variable resistor so that the voltage drop across the LDR is 5V and the input B is at logic 1.

  3. Shine light on the LDR using a torch. The resistance of the LDR decreases, and the voltage across it drops to 0.5V.
    Consequently, the input B becomes logic 0, and the output is high, activating the buzzer.


Precautions

  1. Ensure that all connections are neat and clean.

  2. Draw the circuit diagram before assembling the components.

  3. Use an LDR and a variable resistor with suitable values.


Viva Voce

Q1: What is a NAND gate?
Ans: A NAND gate is a combination of an AND gate followed by a NOT gate.

Q2: What will be the output of a NAND gate if both inputs are high?
Ans: The output will be low.

Q3: What will be the output of a NAND gate if both inputs are low?
Ans: The output will be high.

Q4: Name the gate formed when two inputs of a NAND gate are joined together.
Ans: It forms a NOT gate.

Q5: Can a NAND gate be converted into an AND gate?
Ans: Yes, a NAND gate can be converted into an AND gate or an OR gate. An AND gate is obtained by connecting two NAND gates, where one is used as a NOT gate by joining its input terminals.

Leave a Reply

Your email address will not be published. Required fields are marked *