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

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

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

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.

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

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

Our circuit is based on this dark sensing circuit:

Build a Light-Triggered Alarm to Catch Your Food-Thieving Roommate in Action  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.

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

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

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

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.

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

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.

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

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

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

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.

Just updated your iPhone to iOS 18? You'll find a ton of hot new features for some of your most-used Apple apps. Dive in and see for yourself:

8 Comments

Great! Does anyone else feel like McGyver when doing this?

I try to feel like McGyver all the time.

Very clever. I could see this being put to good use in a number of office break-room kitchens all over the world!

Ya, as long as there is light and avarice, there is a place for this project!

Excellent work there, william.

Nive very nice. I wanna ask one thing if I want to reverse its action say the buzzer should trigger when its dark so would interchanging positions of LRD (Photoresistor) and 1Kresistor will do? and one more thing is it 2N907 or 2N3907?

Share Your Thoughts

  • Hot
  • Latest