I recently rewrote the Arduino code for this project. Here is a summary of the changes:
- Main loop is now implemented as a state machine
- All timing now based on event time vs. current time evaluations
- timing is no longer dependent on frames
- allowed removal of delay() in the main loop
- eliminates the 'port busy' issue when connecting to Arduino IDE
- Relays now using Normally Open rather than Normally Closed connections *** Update your Relay Connections!!! ***
- Added Motion Detected LED
- Added Ready to Wake LED
- Added Paused LED
- Removed Action Trigger Switch
- Added ability to add extra time to Red Lights & Smoke
- allows these effects to run a bit longer than the lid bouncer
- Added lots of comments
You will find all the latest code here on github
Monster In A BoxI love Halloween props and have seen and read about some great Monster in a Box builds this past year and decided that I should build my own. The idea is pretty simple: create the illusion that some type of container is holding a dangerous monster that is on the verge of escaping. The illusion can be created with any combination of motion, sound, light, smoke and, of course, surprise.
What's in the Box!?!?You want a box that is large enough that it appears to be capable of holding something big and scary. It also adds to the illusion if the box appears to be old, well worn, and just maybe only strong enough to keep the monster at bay. At first I shopped around at thrift stores and online for something but never something that I liked, so I build my own. It was not very difficult.
I used 15 6ft pine fence pickets from Home Depot to make a box that measured about 3ft x 2.5ft x 2.5ft. I cut all the board to length with a table saw and assembled the box using a pneumatic 18 gauge brad nailer. This appeared to work well, but later I realized that the brads were not strong enough to hold the box together due to all of the banging and bouncing it would be doing. To strengthen the box I later screwed it together with 1 inch dry wall screws (from the inside out so they would not show).
Once built I aged the wood with a process that used black tea, vinegar and steel wool. I then decorated it with stencils and labels that I found online and/or created and printed.
The prop has 2 operational states "Sleeping" and "Awake". While sleeping the box is relatively calm and only makes snoring and light growling sounds. The monster is awoken when a trick-or-treater trips a motion sensor. When the monster is awoken the monster roars, breaths smoke, bounces the lid, and the inside of the box glows red.
I used an Arduino Uno along with a WaveShield and a Relay Module to orchestrate the behavior of this prop. The WaveShield is loaded with a small collection of sleeping and roaring sounds. A PIR motion sensor provided input to the Arduino to switch the box between "sleeping" and "awake" modes. During awake mode the Arduino activates relay channels to run the lid motor, red lights, the smoke generator. and play the sounds on the WaveShield. One other feature that I added was a Pause Button. This allowed me to temporarily silence the monster when younger kids come by.
A lid lifter is a device that will quickly raise and lower the lid to make it bang and bounce as if the monster is trying to escape. There are several ways this can be done the most popular appear to be pneumatic actuators and rotating cams. Although I think an electronically controlled pneumatic actuator would have allowed me to make the lid motions much more random, I decided to go with the a rotating cam as it seemed to be the simpler and least expensive option.
I bough a used automotive windshield wiper motor from a local scrap yard for $15. It was kinda funny. I walked in and asked for a motor. The guy behind the counter asked "for what make and model car" when I said "I dont care" his head tilted to the side a bit and he gave me a bit of side eye. After I explained what I was up to he wanted to build one :)
These motors, regardless of make/model, run on 12 volts, spin at a reasonable rate and have great torque: perfect! Note. When you get one make sure it has some of the old wire harness it will make it much easier for you to splice your wire to it. also make sure it has its crank arm and offset post. If the main motor post is the only physical connection you have to work with your cam will likely slip.
Mount the motor somewhere inside your box. I put mine on one of the side walls. Remember there will be a large rotating cam connected to it and it needs to be able to rotate free and clear of any and all items, especially wires, that you are going to put in the box. There are several good tutorials on YouTube on working with these motors.
I cut a 12 inch diameter cam from a piece of 1/2 ply wood. first I cut a perfect circle. I mounted it on the motor and used this to determine the required height of the motor in the box. I only wanted the lid to lift about 2 inches. After doing this fitting I used a jig saw to randomly cut 'teeth' into the cam trying my best to keep them at random width and depths.
Lastly I mounted a roller to the under side of the lid using 2 metal L brackets, a 1 inch nylon spacer and a carriage bolt. The roller is positioned just above the cam so that it rides along the teeth of the cam.
I used the 12 volt rail of an ATX power supply to power the motor through the relay controlled by the Arduino. Yes, getting everything to line up does require a bit of trial and error. After re-positioning the roller once or twice... ok three times... everything lined up and the lid began bouncing as planned!
Breath of Fire : Smoke and LightsI used a cheap 400 Watt smoke generator for smoke effects. Out of the box this was radio controlled. To control it with the Arduino I opened the receiver and soldered two lead lines to the trigger button pads. This provided me with lines that I connected to an Arduino controlled relay channel. It was a simple hack that I learn by watching a few YouTube videos. I also added an old vacuum cleaner hose to direct the smoke to come out as a stream from just under the lid. I liked the visual effect and it help reduce the vapor condensation on the electronics inside the box.
For lights I simple cut a light duty extension cord and wired it through a relay channel. The string of 100 red LED lights connected to this could then be switched on and off by the Arduino.
The WaveShield has an 1/8 inch headphone jack as and output - as well as 2 i/o pins for a direct connection. I used an 1/8 inch patch chord to connect to a 30 Watt bass guitar amplifier that I borrowed from my practice room. Any number of amplified speakers would work - including PC speakers. But using something with solid low end is definitely a plus.
I purchase some plastic chains from a Halloween store and 3D printed a pad lock. Wrapping these over the crate added to the depth and feel of the illusion.
Put the crate out in the yard and hide the motion sensor in a nearby bush. I used a long run of speaker wire to connect the sensor so that I could experiment with the positioning such that the monster would wake up when someone gets close (about 5 ft) to the crate.
As the evening grew darker I realized that all of the detail on the outside of the crate was becoming difficult to see. Eventually I illuminated it with a strobed floodlight and was very happy with the effect.
As trick-or-treaters walked up the driveway they notice the growling box: some with curiosity others were actually scared of it. As they approached and the monster roared to life they would up, and squeal some even applauded. It was a huge hit.
EnhancementsI got tired of looking for ways to hide my Motion Sensor in the bushes so I hot glued one into the belly of a plastic rat that I can position somewhere along the driveway or under that nearby bush. I also installed an RJ11 phone jack on the rear of the box so that I could connect the rat motion sensor using a 50ft phone chord - which is much better than the two strands of speaker wire that I was previously using.
You will note that I also added a switch and some indicator LEDs to that new plate. The switch PAUSES all functions on the box without powering it down. My main kill switch is the power strip inside and is cumbersome to access, plus with this only uses signal voltage (5v) on this external switch. This switch has been great for stopping the monster for younger trick-or-treaters and others that ask for a peek inside on Halloween night.
Oh! I drape plastic chains over box for effect and they can be unwieldy at times. Especially if I need to get into the box during the evening. To make this easier I zip tied black spring carabiners to the ends of the chains. This lets me quickly un/hook the ends to eyelets that I screwed into the lower corners of the box. Not very high tech but very helpful.
The FutureThere are a few things that I want to add in the future. Maybe R/C control so that I can pause or trigger the monster from a distance. I will also add some type of feedback to the lid lifter so that the Arduino can 'know' when the lid is open or closed. Several times the lifter stopped at a high point in the cycle which made the 'guts' of the box visible until the next wake cycle. Lastly, I may connect the external lighting/strobes to the Arduino to allow them to be controlled by the program and or the R/C fob.
GitHub RepositoryYou will find the latest code and wiring diagrams Here on GitHub
Comments