Wednesday, January 1, 2014

Interactive Jack-O-Lantern


Every Halloween there's a Jack-O-Lantern contest at work, with exclusively LED-lit pumpkins. My entry this year was this interactive pumpkin. It has a “mood” which is portrayed by eyebrow position and illumination color (which fades gradually from green (happy) to red (angry)). The mood changes depending on how close a person is to the pumpkin. From afar he looks happy, but gradually gets scarier as you approach him. In addition to changing color, the light at all times is modulated to simulate the flicker of a candle.
video

 The illumination is provided by an XML-RGBW, driven from LM7135regulators. Distance measurement is accomplished with an ultrasonicrangefinder in the mouth of the pumpkin. The eyebrows are operated by a single small hobby servo, through linkages made from music wire.


Getting those linkages to work out was not trivial as I was trying to drive the eyebrows in opposite directions from the same servo. The linkages are visible in this picture of the inside:


As always, this was a rush job right before the contest deadline, but I just barely got it working in time, and the kids that came to our house later that night appreciated it too.

Here's the code

No comments:

Post a Comment