Tutorial 11: Light Activated Alarm

Created on: 3 August 2012
Updated on: 18 January 2023

When enough light falls on the LDR in this circuit, an alarm tone is played on the loudspeaker. This is a four transistor light activated alarm circuit for beginners in electronics. Follow the steps in this tutorial to build the circuit on an electronic breadboard.

The video below shows what you will achieve in this tutorial.

Prerequisites

Complete Tutorial 8: Dual LED Flasher and its prerequisites before attempting this tutorial. Read about LDRs if you have not used one yet.

Light Activated Alarm Circuit Components

In addition to an electronic breadboard, wire links, a 9V battery and a battery clip, you will need the following to build the light activated alarm circuit on a breadboard:

Qty Part Designator Notes Type
3 10k resistors (brown - black - orange) R3, R4, R7 1/4W, 5% or better Resistors
1 4k7 resistor (yellow - violet - red) R6
1 2k2 resistor (red - red - red) R8
1 1k5 resistor (brown - green - red) R1
1 1k resistor ( brown - black - red) R2
1 330Ω resistor (orange - orange - brown) R5
2 100n C1, C2 Capacitor
3 PN2222 or KSP2222 Q2, Q3, Q4 NPN transistors Semiconductor
1 PN2907 Q1 PNP transistor
1 LDR R9 Light dependent resistor Transducer
1 8Ω loudspeaker SP1

Light Activated Alarm Circuit Diagram

The circuit diagram looks more complicated than in previous tutorials, but can be thought of as two parts. The right half of the circuit is very similar to Tutorial 8: Dual LED Flasher. This part of the circuit produces the tone on the loudspeaker.

The left part of the circuit is the trigger that switches the right part of the circuit on when enough light falls on the LDR.

Light activated alarm circuit diagram
Light Activated Alarm Circuit Diagram

The breadboard used in projects on this website has top and bottom horizontal rails (or connecting strips) that are split in the middle. The right half of the circuit will be built between the right horizontal rails and the left half between the left horizontal rails. The top rail of the circuit is shared by both halves, so the top left and top right rails will be joined by a wire link.

The collector of transistor Q2 will join to the right bottom rail as shown in the circuit diagram. All the ground points of the left part of the circuit will share the left bottom horizontal rail.

Building the Circuit on Different Breadboard Types

It is important to note that not all full-size breadboards have horizontal rails that are split in the middle. Narrower full-size breadboards usually have continuous top and bottom horizontal rails. If you build this circuit on one of these breadboards, then the alarm will continually sound because the right half of the circuit is then switched on by the GND from the continuous horizontal rail. With this type of breadboard use the second horizontal bottom rail to connect the emitters of Q3 and Q4 and the collector of Q2. Alternatively use two half-size breadboards, one for each half of the circuit.

Building the Light Activated Alarm Circuit

Insert two PN2222 transistors – Q3 and Q4. Connect the emitter of each transistor to the bottom rail of the breadboard. If using a breadboard that has continuous horizontal rails, this is where the emitters of Q3 and Q4 must be connected to the other bottom horizontal rail. Get R2 (1k) and R5 (330R) ready.

Insert the transistors into the breadboard circuit
Step 1: Insert Transistors Q3 and Q4, and Wire Emitters

Connect R2 to the collector of Q3. Connect the other lead of R2 to the top rail using a wire link. Connect R5 to the top rail in line with the collector of Q4 below. The loudspeaker will be connected between R5 and the collector of Q4 later. Get C1 and C2 ready (100n capacitors).

Insert resistors into the breadboard circuit
Step 2: Insert Resistors R2 and R5 into the Breadboard

Connect C1 to the collector of Q3. The spare lead of C1 is to be to the right. Connect C2 to the collector of Q4. The spare lead of C2 is to be to the left with two empty tie points between its left and right pins. Get R3 and R4 ready (10k resistors).

Insert capacitors into the breadboard circuit
Step 3: Connect Capacitors C1 and C2 to the Breadboard

Connect R3 to C1 and R4 to C2. The other end of each resistor is to be placed above the middle of the breadboard and connected to the top rail using wire links. Get two wire links ready.

Insert resistors into the breadboard circuit
Step 4: Insert Resistors R3 and R4 into the Breadboard

Connect the C1 - R3 junction to the base of Q4. Connect the C2 - R4 junction to the base of Q3. Get Q2 ready (PN2222 transistor).

Insert wire links on transistor bases
Step 5: Wire Transistor Bases

Insert Q2 into the breadboard between the left top and bottom rails. Connect the emitter of Q2 to the bottom left rail. Join the left and right top rails with a wire link. Get R8 (2k2) ready. R8 is blue in color here as it is a 1% tolerance resistor. Just use a normal 5% tolerance resistor. The 1% tolerance resistor was only used because a 5% tolerance resistor was not available in the required resistance value.

Insert transistor into the breadboard circuit
Step 6: Insert Transistor Q2 into the Breadboard

Connect the 2k2 resistor (R8) to the base of Q2. Connect the collector of Q2 to the right bottom breadboard rail. This is where the collector of Q2 is to be connected to the other bottom rail that has the Q3 and Q4 emitters attached if using a breadboard that has continuous horizontal rails. Get Q1 ready (PN2907 transistor).

Insert wire link and resistor into the breadboard circuit
Step 7: Insert Resistor R8 and Wire Transistor Collector

Insert Q1 so that its collector connects to R8. Connect the emitter of Q1 to the top breadboard rail. Get R7 ready (10k resistor).

Insert transistor into the breadboard circuit
Step 8: Insert Transistor Q1 and Wire its Emitter

Connect R7 to the collector of Q1 and to the bottom left rail using two wire links. Get the 1k5 resistor ready.

Insert resistor into the breadboard circuit
Step 9: Connect and Wire Resistor R7

Connect the 1k5 resistor (R1) to the base of Q1 and to the top rail. Get the LDR and 4k7 resistor ready.

Insert resistor into the breadboard circuit
Step 10: Connect and Wire Resistor R1

Connect the 4k7 resistor (R6) to the base of Q1. Connect the LDR to the other end of R6 and to the left bottom rail. Get the loudspeaker and battery ready.

Insert resistor and LDR into the breadboard circuit
Step 11: Insert Resistor R6 and the LDR

Connect the positive lead of the loudspeaker to R5 and the negative lead to the collector of Q4. Connect the negative lead of the battery to the left bottom rail and the positive lead of the battery to the top rail.

The finished light activated alarm breadboard circuit
Step 12: Connect the Loudspeaker and Battery

Operating the Light Activated Alarm Circuit

After connecting the battery to the circuit, the loudspeaker should start producing the alarm tone. Cover the LDR to stop light from reaching it and the alarm will stop sounding.

To trigger the alarm, uncover the LDR and the alarm will start sounding.