Halloween has always been one of my favorite holidays. I have always had a sweet tooth so the idea of strangers giving me candy just for dressing up like a superhero blew my mind. Unfortunately, when I got into high school tricker treating became less socially acceptable and costumes became more about looking good and less about feeling like a crime fighting billionaire. That's when Halloween became about one thing and one thing only, pranks! Every year I would spend the week before Halloween devising a plan to scare my friends and family. After a few Halloween pranks that were deemed as "too far", my friends started to avoided me on Halloween and I decided it was time to give it a rest. But when my boss approached me a few weeks ago about setting up a Halloween prank I just couldn't resist.
I decided to use LabVIEW and a BeagleBone Black for this prank. I use copper tape to create a circuit on the inside of the refrigerator door, when the fridge is opened the circuit is broken and a loud scream comes from a wireless speaker hidden on top of the fridge. Check out the video!
Step 1: Materials
- Wireless Speaker
- BeagleBone Black
- Wi-Pi WiFi dongle
- Copper tape
- Alligator clips
- External power source (I use Anker Astro External Power Banks)
- Video camera (I use 2 Go Pro's)
(The push buttons, breadboards and the LED's are included in the LabVIEW Interaction Parts Kit)
Step 2: BeagleBone Black Set Up
First, connect the 1.8V pin(Pin 78) on the BeagleBone Black to the positive bus on one side of your breadboard and then connect the negative bus on the same side to the ground pin(Pin 80). Next use header pins to attach 7 gator clips to your breadboard on the opposite side of your breadboard.
Next, run 2 1MΩ resistors in series from each of the gator clip connections to the voltage bus. Then, connect each strip connected to a gator clip to an analog input on the BeagleBone Black. Finally, use a grounding strap to connect ground yourself by connecting it to the ground bus.
Finally, use a grounding strap to connect ground yourself by connecting it to the ground bus.
This circuit works as a voltage divider (simple drawing shown at the bottom of the picture above), with one of the resistors (R1) being the 2 1MΩ resistors in series and the second resistor(R2) is the resistance of your body. The switch shown above is closed when you complete the circuit. Let's say you hooked the gator clip to a banana when you touch the banana you are closing the switch and lowering the voltage read by the analog in of the BeagleBone Black (Vo). In the next step, I will show you how to use LabVIEW to detect this drop in Voltage.
Step 3: Setting Up the Fridge
Run a piece of copper tape from the top of the inside of the fridge to the top of the fridge, use scotch tape to secure this secure it
Next place a large piece of copper top on the door so that it will make contact with the tape on the frame of the fridge when the door is closed. Then run copper tape from this position along the top of the door all the way to the top of the fridge. Use scotch tape to secure this secure it this tape as well.
Place the BeagleBone Black on top of the fridge on top of a piece of cardboard or paper.
Attach Gator clips to the each of the pieces of copper tape
Connect the other end of the gator clips to your circuit in the way specified in the last step
Step 4: LabVIEW Code
First download the "BBB_Halloween" file and unzip it, next download the "BBB_Halloween_project" and add in the Vi's from the first download. Before you open the individual VI's you will need to change the IP address shown to the specific IP addresses of your BeagleBone Black. To do this right click on the Beaglebone Black and select "properties".
Change the IP address in the input that says "IP address/DNS name". Once the IP address is correct right click each and select connect, this will open a connection to each device.
Step 5: LabVIEW Code
F irst open "Halloween sound" VI under the "My Computer" category. Before you can deploy you will need to change some things on the front panel. First, input your computers IP and then add in the WAV file that you want to play. I attached the sound I used called " Woman Scream" below (credit to "MaderaDelEste Films").
Above you can see the Block Diagram for this VI; there are two while loops. The top while loop uses a UDP read to collect the data sent over from the BeagleBone; the bottom loop uses that information to determine whether or not the sound should be playing. To end this code, we press the stop button which will exit both the inner loops, then when it's out of the outer while loop we close the UDP socket.
Next, open the "BBB_Halloween" VI under the BeagleBone Black category. Before you can deploy you will need to change some things on the front panel. First input your computers IP and then you have the option to choose a Digital channel if you want to make the BeagleBone turn on a LED when the fridge door is opened, this makes it easier to debug the code.
Above is the block diagram for this VI, the first block is a LINX open. It is set to Local I/O because we are using a BeagleBone Black and the code that you write in LabVIEW actually gets deployed to the board. After LINX is opened open a UDP socket and then enter the while loop. A digital reads inside the loop get data about the status of the fridge door and then it is all bundled and UDP write sends it to your computer over Wi-Fi. Once the stop button is pressed we leave the loop and close the LINX reference as well as the UPD socket.
Step 6: Final Touches
Set up a camera so it won't easily be noticed but it will have a good view of the person you are trying to prank. I used a GoPro because I could control when it recorded from my phone which helped me save battery.
Place the Speaker on top of the fridge in a place where it can easily be accessed to turn it on and off.
Do your best to hide the BeagleBone and the speaker or people will become suspicious.
Step 7: The End
Thank you for reading my instructable, if you are interested in making this project yourself but don't have the right supplies you can purchase the LabVIEW computing kit for the BeagleBone Black. This kit includes a copy of LabVIEW 2014 home edition and everything you will need to run LINX 3.0 and start making projects. Please comment with any questions or comments you may have.