your hands on. The specific construction of the box is not
important, but I made mine with four panels by laying out
the width of the boards that I wanted, and then gluing and
tacking the frame boards onto it. I’m not a woodworker,
so there are probably better ways to build the box.
However, mine is still together after two Halloweens.
Once I had the four panels, I then glued and tacked
them together, and then glued and tacked this onto a
plywood bottom. I made the top the same way but used
hinges to attach it.
My goal was for the box to look like a crate that had
shipped from some far away country where monsters still
exist. In constructing your box, do some research on
crates and pick a style that you like. Just make sure there
is enough room for all the stuff that has to go in there to
make it work!
The Bouncing Lid Effect
I wanted the lid to bounce up and down frantically, so
I borrowed the idea from another MIAB project out there
and decided to use a cam follower. Basically, it’s a wheel
with peaks and valleys.
Connected to the box lid is a bearing that rides up
and down the peaks and valleys when the wheel turns,
which makes the lid go up and down. Sharper peaks and
valleys will make the wheel turn faster and create a more
violent lid motion.
To construct the cam, I basically took a piece of
plywood and used a can to draw a circle. I drew my peaks
and valleys coming off the circle, and used my bandsaw to
cut it out along the lines. It was not pretty but it worked.
I made a coupling to attach it to the stepper motor
shaft, which is basically a piece of aluminum threaded on
one end to mount the cam on to and a hole in the other
end to mount to the stepper shaft.
Another idea was to glue and tack a block of wood to
the cam, drill a hole the
perfect size for the shaft,
and use a screw to hold it
tight. However, I worried
this might not last as long,
so I opted for the aluminum
coupling. If you do not have
access to metalworking
equipment, this might be a
good idea for you.
The program I wrote to
control the whole thing is
written in C, and is available
at the article link.
As far as wiring is concerned, you can wire things up
as you see fit. As long as you change the program to
reflect the different pins used, you should be good. Just in
case you don’t want to wire things up differently, check
out the photos for how mine looks.
Four-Channel Relay Board
1. Place the ULN2803 on the breadboard and connect
pin 9 to ground and pin 10 to five volts.
2. Wire the Propeller pin 13 to the ULN2803 pin 1 (to
control the relay channel for the strobe).
3. Wire the Propeller pin 14 to the ULN2803 pin 2 (to
control the relay channel for the fog machine).
4. Wire the GND of the four-channel relay board to GND
on the Propeller activity board.
5. Wire the VCC of the four-channel relay board to a 5V
supply from the activity board.
6. Wire pin 18 from the ULN2803 to IN 1 on the four-channel relay board (strobe).
7. Wire pin 17 from the ULN2803 to IN 2 on the four-channel relay board (fog machine).
8. Wire the strobe wires to the first relay block. Pay
attention to the Normally Open/Normally Closed
configuration. You want the Normally Open jacks
(mine were next to each other).
9. Wire the fog machine wires to the second relay block.
1. Wire the PIR sensor GND to a ground on the activity
2. Wire the PIR sensor VCC to a 3.3V supply from the
3. Wire the PIR sensor out to P15 on the activity board.
64 September 2014
Here’s a look at how
things are wired up.