Header Banner
wonderhowto.mark.png
Gadget Hacks Next Reality Food Hacks Null Byte The Secret Yumiverse Invisiverse Macgyverisms Mind Hacks Mad Science Lock Picking Driverless

Build a Light-Triggered Alarm to Catch Your Food-Thieving Roommate in Action

Apr 10, 2012 05:01 PM

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!

Materials

  • Piezo buzzer
  • Perfboard
  • Light dependent resistor (LDR)
  • 1k ohm resistor
  • PNP 2N907 transistor
  • 3 volt coin cell battery
  • Battery holder
  • Breadboard
  • Jumper wires

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.

Circuit on a breadboard with components including wires, a battery, and a motor.

Diagram of a simple electronic circuit featuring two AA batteries connected to a speaker with a resistor.

Our circuit is based on this dark sensing circuit:

Schematic diagram of a dark-detecting LED driver 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. 

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.

Small electronic component featuring a circular metallic part with wiring.

How you bend and solder your component leads will depend entirely on where the components are placed.

Circuit board with electronic components.

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.

Electric components including a circular connector and wiring.

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.

Electrical motor component with wires.

I decided to wrap the extra wire around the buzzer. Also, doesn't the alarm look eerily humanoid in the picture below?

Electrical component with a black round base, yellow insulating layer, and attached resistors.

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.

The next big software update for iPhone is coming sometime in April and will include a Food section in Apple News+, an easy-to-miss new Ambient Music app, Priority Notifications thanks to Apple Intelligence, and updates to apps like Mail, Photos, Podcasts, and Safari. See what else is coming to your iPhone with the iOS 18.4 update.

Related Articles

Comments

No Comments Exist

Be the first, drop a comment!