Showing posts with label Halloween. Show all posts
Showing posts with label Halloween. Show all posts

Monday, July 20, 2009

Robot Costume


This a a robot costume that I made for Halloween '07. The mouth is an LCD screen; the eyes are lit by multi-color LEDs. This was my first real foray into amature electronics. It's a good manageable sort of project to learn through for someone with a little programming experience and a few months of electronics tinkering under their belt.


The LCD had a nice strong back light and could display two lines of text. The eyes were plastic cups painted black on the outside, which gave a nice glossy sheen when viewed from the front. I cut out the bottoms of the cups and replaced them with a perforated silver paper made for cross-stitching. Because of the holes, I could see out easily but they looked mirror-like from a few feet away. The LEDs around the eyes were tri-color, essentially three LEDs in one package, giving a full red-green-blue color range. I filled the rims of the cups with hot glue and set the LEDs into that to diffuse the light around the circumference.

The ears were the bottoms of coke cans, punctured for air flow and sanded for a metallic finish. I wanted the case to have a thrown-together look to offset the electronics. The back opened up to let my head in and out, with a velcro closure. There was a USB port at the right temple, a power switch at the back right corner, and a fan at the back left, which I didn't get working in time. I had two additional air vents on the bottom, right under my mouth and nose.


The chest box featured a bunch of buttons, three knobs, and a power indicator light. Each button put a message on the mouth screen and in some case set the eyes to a color matching the message. Another button set the eyes to do a slow random walk through the color range. If the eye color was not forced by the buttons, it was controlled by the three knobs: red, green, blue. One button set the screen to display text coming in over USB, for on-the-fly communication. The chest box also held a battery pack, and power could be taken from the batteries or the USB port when the head was plugged in.

The head housed an Arduino microcontroller. Its input/output pins are limited, so I made an expansion board with a multiplexer to multiply the inputs and two daisy-chained shift registers to multiply the outputs. It turned out to be a great solution for pin-greedy Arduino projects. I'm sure I'll use it again in the future. Writing a set of functions to abstract away the details of the expansion board was really good practice. I was initially afraid that shifting two bytes out the shift registers and latching them every time I needed to change an output pin's setting would be too slow for running the LCD. Silly me, it was actually too fast and I had to put in a delay to communicate reliably. I wrote my own set of functions to run the LCD, working from the data sheet. I recommend that to anyone trying to get started with this kind of thing. It was just challenging enough to make the payoff of a working screen really satisfying for an amateur like me.

Here's a picture inside the head. The nose brace and vents were great for comfort. My head just fit inside. Incidentally, the head is made from the two boxes that the supplies arrived in from Digikey, hot glued together in the middle. It's good to know what size box fits your head, I suppose.

Thanks to J for the two better looking photos.

Sunday, July 19, 2009

Shower Curtain Prank




This is a another trick from Halloween '08. When the victim sat down on the toilet, a hand suddenly appeared behind the shower curtain.

This apparatus was set in the bath tub, with the curtain closed. When it was activated, the lamp turned on, back-lighting the curtain, and the cardboard hand rose up and slapped the curtain. It was very surprising, and the goofy cardboard hand profile cast a very convincing shadow. I was proud of the timing of this prank. The light drew your attention, and the rising hand made an amorphous shadow that became recognizable just as the hand made an audible slap against the curtain. There was just enough time for your mind to register a distraction from the light, then something moving toward you, then the sudden recognition of a person where (and when) you really don't expect one. It elicited strong language from some guests.

The motion was provided by the carriage mechanism of an inkjet printer. There is a small motor that runs a long belt; in the printer, the belt pulled the ink carriage across the width of the paper. The motor and belt were supported by a piece of sheet metal that was easy to screw down to a wooden base. I clamped a hinge to the belt with a bolt through two washers, and put the hinge on a strut that lifted the hand. The cardboard hand you see is stapled to another strut, which is hinged to the base at the bottom. The motor was very weak and I used cheap, sticky hinges, so I used a bag of pennies as a counterweight to make the hand rotate smoothly.


The control was done with an Arduino micro controller. It was triggered by a switch on the toilet seat--two wire coils under the seat were separated by a piece of sponge so that pressure on the seat squished the sponge and made the wires touch. The Arduino turned on the light using an H-bridge to control a relay in line with the lamp's power cord. Then it ran the motor to swing the hand out and back again. The motor was also run with an H-bridge (there are two bridges in the one chip in the photos).


The belt couldn't run too far or the hinge would hit the pulleys and probably burn out the motor, so I needed a way to recognize stopping points on each end. This was done using an optical switch from the same printer that provided the motor and belt. The optical switch is shaped like a horse shoe and senses when there is an obstruction between its arms. I connected it to the belt where the arm was hinged and set it to slide along a piece of cardboard. At the far ends of its intended travel, I punched holes in the cardboard. When the optical switch rode over a hole, it turned on and the the Arduino knew that it should stop.

Under-Couch Zombie Arm

This is a trick from Halloween '08. We hid this gizmo under the couch, and the arm would reach out and touch people's ankles, causing fear and amusement. Anyone with a web-enabled phone at the party could bring up a web page with controls to operate the arm.

The arm is stuck onto an old camera tripod with a crank to extend and retract the camera mount. I replaced the crank arm with a little dc motor. The motor was controlled by an Arduino micro controller through an H-bridge. The Arduino has to know when the arm is fully extended or retracted so that it won't keep trying to move it and burn out the motor. To make that possible, I embedded magnets in the extension arm and put a Hall-effect sensor on the tube. The sensor knows when a magnet is right under it, indicating that the full range of motion has been reached. The magnets are placed with different poles facing the sensor, so it can tell which end it is at and refuse to turn the motor any more in the that direction.

The Arduino communicated with a computer hidden behind the couch. The computer was serving a web page on the local wireless network with button controls for the arm, so anyone with a web-enabled phone could bring it up and operate the arm remotely form anywhere in the apartment.

The arm itself is a latex cast gone wrong that I had left over from a previous Halloween. The mold was contaminated with soap residue, so the casts came out with a lot of imperfections. With the right paint, it made a good zombie arm.

Full extension:

Wiring: