If you want a slightly different look for your Halloween pumpkin or skull, you can pretty quickly whip something up with a few servos and an Arduino. Here’s a set of Scary Shifty Servo Eyeballs, for instance:
It looks around randomly…what’s over there!… wait, what’s that!
It consists of the following components:
– 2 toy eyeballs or ping pong balls painted like eyeballs
– 2 small servos (HXT500 from HobbyKing.com or similar)
– 1 standard servo
– 1 Arduino with tiny breadboard rubber-banded on top
– 2 BlinkMs, one for each eyeball, running a custom light script
– hot glue, popsicle sticks, and bits of wire
– Arduino sketch (ScaryShiftyServoEyeballs.pde)
Hot glue is the best thing ever (and reversible in case of mistakes), so invest the $7.99 in a hot glue gun, get some structural hardware like popsicle sticks, and go nuts. Glue down the smaller servos for the eyes to a base, glue a servo horn underneath the base, then plug that into the larger servo. Get two servo horns for the smaller servos (the servos come with several), glue each eyeball to a servo horn and then you can snap the eyeball+horn onto the smaller servo. If you want the eyeballs to light up, drill or poke a hole in the back for the LED and hot glue the LED into the eyeball.
Once all the construction is done, wire up the servos to Arduino. The control pin of the servo goes to an Arduino digital pin (I used pins 5, 6, & 7). The power and ground pins of the servos go to +5V and Gnd on the Arduino. Then load up the Arduino sketch!
Some neat changes to the sketch would be adding some sensors to make the eyes look you when the sensors are triggered. One easy sensor to add would be a piezo knock sensor. Run the piezo under a rug and someone steps on the rug, the piezo is triggered and you can make the eyes look in that direction.
If you’re unfamiliar with servos, check out the current issue of MAKE. In MAKE volume 19, I have an article that’s a servo primer with two little fun projects you can build in an afternoon. Go now! Get it! You can get a taste of the servo primer if you like. I think the article came out pretty good.