In this post we’ll show you how to build a circuit with a light-dependent resistor (LDR). This LDR circuit will trigger a buzzer when it’s exposed to light.
In other words…
A flashlight tag detector!
This project and all Geek Pack Hack activities must be undertaken with a suitable adult completing their own risk assessment and supervising their children at all times.
This game never seems to get old– here’s how it works.
Someone hides this detector:

Then the players search for the detector with their flashlights in the dark.
When one of the flashlights shines on the detector, it sets off the buzzer!
Read on to learn about what an LDR circuit is and how to build your own flashlight tag buzzer with just a few inexpensive parts..
This is a great STEM project to do with school-aged kids as a homeschool activity or in a makerspace. Some steps are a bit fiddly and may require the help of an adult.
We’ll list the parts we used and then give you step-by-step instructions for how to make this LDR circuit.
If you aren’t already familiar with them, you might want to check out this post on how to use breadboards.
You can check out our video tutorial here and subscribe to our YouTube channel to keep up with new projects.
Everything is explained below as well.
Light-Dependent Resistors
A light-dependent resistor changes its resistance based on how much light is hitting it.
You can read up on electric resistance, current, and voltage in our post on how to make a basic electric circuit.
Here’s a close-up of the light-dependent resistor in our circuit:

When an LDR is in the dark, it lets very little electricity through.
When an LDR is exposed to bright light, it lets a lot of electricity through.
LDR Circuit
Let’s take a look at how an LDR works in a circuit.
If you have a simple complete circuit with just a battery and a buzzer, electricity will flow through the circuit and sound the alarm.

Now let’s see what happens if we include a light-dependent resistor in series with the alarm in this circuit.
In this LDR circuit, if there is no light hitting the LDR, it will resist the flow of electricity. The buzzer will not sound.

If light hits the LDR, it allows electricity to flow, and the buzzer goes off!

Amplifying the LDR circuit with a MOSFET
We started off wiring up exactly that circuit to build our detector, but it wasn’t very sensitive. A flashlight had to be within a few feet of the detector to set off the alarm.
To amplify the signal from the LDR, we used a MOSFET. You can learn about MOSFETS in our post on wiring up a security alarm.
The MOSFET boosted the weak current from the LDR so we could trigger the detector from over 10 feet away!
Here are the supplies you’ll need and instructions for wiring up this cool little flashlight tag detector.
Supplies
100k-ohm resistor
Jumper wire or insulated wire and wire strippers
Steps to build an LDR circuit flashlight tag detector
Step 1: Insert MOSFET into mini-breadboard
Step 2: Insert light-dependent resistor
Step 4: Connect buzzer contacts
Step 1: Insert MOSFET into mini-breadboard
For a very brief overview of what a MOSFET is and how it works in simple circuits like this, you can check out our post on how to make an alarm triggered by nearby objects
We’ll wire up the breadboard as shown in the image below.

Insert the MOSFET into the breadboard with the printed side facing you. Each of the three legs should go into a separate hole in one of the long rows of holes on the breadboard. Each leg is now *not* electrically connected to either of the other legs of the MOSFET.
Step 2: Insert the light-dependent resistor
Insert one leg of the light-dependent resistor into one of the holes electrically connected to the left leg of the MOSFET (the MOSFET “gate”).
The other leg of the light-dependent resistor can go into one of the holes farther to the left. This will serve as a “positive bus”– later we’ll connect the positive voltage here.
Step 3: Insert resistor
Insert one leg of the 100k-ohm resistor into another one of the holes that is electrically connected to the left leg of the MOSFET (the “gate”).
The other leg of the resistor can go into a hole farther to the right. This will serve as a “negative bus”– later we’ll connect the negative voltage here.
This resistor functions as a “pull-down” resistor. If there is any leakage of electrical current through the light-dependent resistor, this pull-down resistor ensures that it does not trip the MOSFET and buzzer.
Step 4: Connect the buzzer contacts
The black buzzer wire goes to one of the holes that is electrically connected to the middle MOSFET leg (the “drain”).
The red buzzer wire goes to another hole in the positive bus where we inserted the second leg of the light-dependent resistor.
Step 5: Insert jumper wire
Insert one end of your jumper wire into one of the holes electrically-connected to the MOSFET’s right leg (the “source”).
The other end of the jumper wire goes to the negative bus. That’s where we put the second leg of the pull-down resistor.
Step 6: Connect the battery to complete the LDR circuit
Pop your 9v battery into the battery connector.
The red wire goes to the positive bus. The black wire goes to the negative bus.
If you wired it up correctly and you’re not sitting in the dark, you should hear a very loud buzzer going off!
If you enjoyed this project or have questions, please leave us a comment!
Are there other projects you’d like us to build? Let us know!
Check out all of our cool engineering projects.
Or, narrow in on our simplest basic electrical circuit projects or our slightly more advanced electrical engineering projects.
We also have a helpful basic electronics page that teaches skills such as how to use a breadboard and multimeter.
Don’t forget to sign up for our free monthly newsletter to receive Geek Pack Hack updates along with an even wackier simple circuit project. Have fun!