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
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.
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.
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.
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.
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)