When I was attending college, my friends had a phantom thief in their dormitory. Almost every night, a different item of food would go missing, never to be seen again. There was constant speculation as to whom the thief was and how to catch them. Security cameras were deemed too invasive, but none could think of another method of surveillance... until today.
While it is too late for my college munchies, your food may still have a chance. Here, we will build a light-activated alarm you can hide inside your cookie, cracker, or Rice Krispies boxes. When the thief opens the lid, a siren lets everyone know to converge on the kitchen!
- Piezo buzzer
- Light dependent resistor (LDR)
- 1k ohm resistor
- PNP 2N907 transistor
- 3 volt coin cell battery
- Battery holder
- Jumper wires
Step 1 Breadboard the Circuit
Always breadboard your circuit before soldering! If it works on the breadboard and not in the project, you will at least know whether it can work. Connect the components according to the diagram below.
Our circuit is based on this dark sensing circuit:
Image from EMSL
To sense light instead, we simply switch the 2N904 NPN transistor for a PNP transistor. We also switch the phototransistor for an LDR, but both would work in our circuit. An NPN transistor allows electricity to flow through its outer legs when a current is applied to the middle leg. The PNP transistor allows current to flow unless there is a current applied to its middle pin.
Step 2 Layout and Solder Perfboard
I chose a circular perfboard to minimize the size of the alarm and compliment both the battery and the buzzer. Find a place on the board for your battery clip to rest. Plan the placement of the resistor, LDR, and transistor around the footprint of the battery clip.
This tiny board had just enough space for all of the components.
How you bend and solder your component leads will depend entirely on where the components are placed.
The only thing that cannot fit on the board is the piezo buzzer. If you are strapped for space in your cereal box, there are much smaller buzzers available.
Step 3 Make It Neat
I used Velcro to join the board and buzzer together, but you can use tape or hot glue just as effectively. When combining the components into a single compact object, remember that the smaller the alarm, the more kinds of food it can protect.
The Velcro ended up adding substantially to the physical volume of the alarm.
I decided to wrap the extra wire around the buzzer. Also, doesn't the alarm look eerily humanoid in the picture below?
Step 4 Install Alarm
Place your alarm in the box with your most coveted foodstuffs. Be sure the LDR is facing upward so that light will hit it when the box top opens. All you need to do is tape it to the inside of the box in the correct orientation. You can experiment with hiding the alarm inside the box using cardboard if you are extra sneaky.
This alarm is a great intro project if you are looking to get into electronics. It is also a fun way to play with transistors and different outputs. Share your alarms with us by posting pictures and video to our community corkboard. If you are having trouble with the circuit, please post in the forum, message me personally, or ask away in the comments below.