D2db97df 381f 4448 8ee6 f6881e2e1c48

invention

LED Tripwire Alarm

by wilsonrl

Published on March 13, 2017

This is my first invention and my project for the MAKE IT GLOW challenge.

I don't have the motion trigger bit (yet) and I wanted to create an alarm system that would alert me whenever my dog, Mr. Oscar, tries sneaking down the hallway into the bedrooms. To solve this problem, I created an LED tripwire alarm that sets off a buzzer when Mr. Oscar walks down the hallway past the alarm.

So far, I created three different versions of this project. In version one, the buzzer only goes off when Mr. Oscar walks by and triggers the alarm. In my favorite and the most annoying version so far, version two, I used the arduino bit to keep the buzzer blaring until I reset the alarm system. Finally, I created simple cloudbit version that records Mr. Oscar's strolls past the alarm in a google sheet rather than by setting off the fun, but at times annoying buzzer.  

The bits and accessories listed are to make the second version. You can make the first version with just two power bits, a light sensor, buzzer, LED and two mounting boards. 

Duration: 1 hour or less

How To Make It

STEP 1 : Create LED circuit

A863594d c4c5 4412 8f57 e3e53d694083

This is used in all three versions of the LED tripwire alarm. Just snap a power bit (with the battery and cable) to the bright LED bit and attach these two bits to the middle of a mounting board.

STEP 2 : Tape LED circuit to wall and focus light with magnifying glass

2aa54d42 5b01 46eb a791 d12b3389c6c7

A4d08402 90b9 4fdf ada4 af94d71cf407

This step can be tricky and might take a while to get just right.

First tape the LED circuit to the wall. I taped it to a height that would cause the light to hit Mr. Oscar when he walked by (and I can easily step over).

Now we have a problem: the LED isn't bright enough to trigger the light sensor all the way across the hallway. However, I recalled using a magnifying glass when I was younger to focus the sun's light into a tiny beam that was hot enough to burn a hole right through a leaf. So, I decided to try using a magnifying glass to focus the light beam on the light sensor. All I could find floating around was a cheap-o, light-weight, plastic magnifying glass, but this did the trick.

After taping your LED circuit to the wall, turn it on and hold the magnifying glass at different positions in front of the LED until you are able to get a nice sharp light beam focused on the opposite wall. When you find the perfect position, tape or somehow secure your magnifying glass in that position.

Mr. Oscar supervised this process, but you may need a second pair of hands and some creativity to position your magnifying glass. I was really lucky because the bump on our wall just happened to be at the correct focal length to make a nice focused light spot on the opposite wall and to hide the circuits from any unsuspecting human victims that may decide to walk down the hallway.

STEP 3 : Create light sensing alarm circuit

Eb8903fb af1b 4b7f 813a 384da8f72e80

999d9a63 d2cc 4c45 8201 23f0288cadfb

0091c051 3111 4233 98a3 704cd20b3945

Version One: As shown in the first image, snap the light sensor bit to the power bit and the buzzer to the light sensor bit. Then, snap your circuit to the center of a mounting board and set the light sensor to dark mode.

Version Two: As shown in the second image, snap the power bit to the fork and then snap a light sensor bit to the middle spot on the fork and the button to the bottom spot on the fork. Next, snap the Arduino bit the light sensor and button so the light sensor is attached at position a0 and the button at a1. Finally, snap the buzzer to the middle spot on the Arduino at position d5 and then attach the entire circuit to the center of a mounting board. Make sure you set the light sensor to dark mode and the Arduino bit to analog.

*At this point you may also want to type or copy and paste the provided code (it should be near the top of this page) to the Arduino IDE and upload it to your Arduino bit. If you aren't sure how to use your Arduino bit yet, I highly recommend you start with @syedBits tutorials the first is here: http://discuss.littlebits.cc/t/introduction-to-arduino-programming-1-the-basics/22237

Version Three: As shown in the third image, snap a USB power bit to the light sensor to the cloudbit. Attach this circuit to the center of a mounting board and set the light sensor to dark mode.

*Make sure to use the USB power bit for this one. The cloudbit doesn't seem to work with the regular battery powered bit. I am still learning how to use the cloudbit (this was my first attempt), but if you haven't set up your cloudbit yet, go here to set it up: http://littlebits.cc/cloudstart and then here: https://ifttt.com/littlebits to create an applet. I tried setting my cloudbit up to send me an email which was super annoying, so I changed it to place a new line in a google sheet each time the alarm was triggered.

STEP 4 : Position and tape light sensing alarm circuit to wall

Bcc9a0cd 8827 4c7c b127 932eee8f4801

Position the light sensing alarm circuit on the wall so the light you focused on the wall in Step 2 falls directly on the light sensor. Tape your circuit to the wall as shown in the image.

STEP 5 : Adjust light sensor sensitivity

This part might be a bit tricky, but you are almost there! Turn on both circuits.

For versions 1 and 3: Adjust the sensitivity of the light sensor just enough so that the buzzer doesn't alarm when the LED is shining on it, but the buzzer goes off when the light is blocked. (The sensitivity is adjusted by using the purple screwdriver that comes with the kit to twist the little thing labeled "sensitivity" on the light sensor.)

If you have trouble with this step, I found it was helpful to replace the buzzer with the bargraph bit and adjust the light sensor sensitivity so just the first LED lights up (make sure your hand isn't casting a shadow on the light sensor while you are doing this), but when you block the light from the middle of the hallway, at least three of the LEDs light up. In my case, at least, the voltage passing through that was enough to light up the first LED of the bargraph wasn't enough to set off the buzzer, but the amount of voltage that caused three LEDs on the bargraph to light up triggered the buzzer.

For version 2: I set the light sensor to the maximum sensitivity and then adjusted the code to trigger the buzzer. I put some comments and a println line in the code to help you figure out what value you will need to use. I think it will depend on how much ambient light is hitting your light sensor.

STEP 6 : Test out your alarm system

44551792 3356 4868 8022 a31fa05b8fbe

F82506c9 18db 4729 83e3 4ffb13868de1

Test out your alarm system and make any necessary fixes.

I tricked poor Mr. Oscar into walking past the alarm to test it out. In the two images above, you can see the light hitting him instead of the light sensor.

STEP 7 : Make it your own

0cdb42a6 b3a5 4ab3 8669 e741189c4bc3

Now that you have the LED tripwire alarm system up and working, try making it your own. How can you improve it?

Can you set it up in your bedroom doorway or perhaps your closet? Or, use a laser instead of the LED bit? My versions work perfect for Mr. Oscar, but what about using multiple lights to keep a smarter intruder from just stepping over the single light beam? Maybe you will need to hide the on/off switches too?

What about adding a third seperate module? The buzzer could set off the sound trigger mounted someplace else which does something else awesome... Or, maybe instead of using the buzzer, you can record a message to the MP3 player to play?

If you are using the arduino bit, maybe you can adjust the program so that the alarm goes off for, lets say, five seconds and then turns off?

Perhaps you can use the buzzer and the cloudbit to turn off the alarm?

I don't have a bluetooth bit, but can you add it to do something fun? It would be super awesome to set up a camera to snap a photo of the intruder.

Mr. Oscar is sad because he can't sneak undetected into the bedroom for a nap on my bed anymore, but I hope you liked my first invention and have fun building your own version! Please leave a comment and share if you tried making this and/or added any fun improvements. :o)

Related Projects

Little Bits-Aqua Reading Light

Our illuminating invention provides a reading light that creates a beautiful glow, by using a light sensor to trigger the light th...

SWAG Medieval Castle

We created a castle with a turret that lights up with the help of the bright led inside.

Wireless Jack-In-The-Box Prank

Prank your friends with this simple wireless project. The buttons send signals through the wireless transmitter activating the ser...