Tuesday, November 28, 2006

Dimming floodlights with a microcontroller
















Trying to design a scheme that would independently run my display lights for a Halloween display project, I've used a hacked dimmer switch, a Picaxe 08M microcontroller, a white LED and a light dependant resistor (LDR) to brighten and dim floodlights.

One of the problems I've encountered making animatronic displays is control of the lighting. I'm using an older version of Brookshire Software's RAPU unit which only has control of sixteen devices. Since the best use of such a control device is the control of the animatronic's servos (moving the animatronic's eyes, mouth, etc.) using several of the channels to control lighting seemed like such a waste.

The solution was to have each support effect (lights, smoke machines, etc.) run independently from the RAPU contol unit. Using the Picaxe 08M microcontroller to send PWM pulses to the LED, the LDR changes the resistance of the commercial dimmer and allows the microcontroller to control the floodlights with reasonable accuracy.

The Picaxe's program waits for a certain pin to be pulled high, and when that happens the program controlling the LED's light level starts, runs through its routine, and then stops, waiting for another pulse. A 12 VDC relay is used to pull the microcontroller's pin high, and this relay is connected to a switch controlled by one channel of the RAPU control unit.

Using this scheme, I can have several floodlights, smoke machines, etc., all "waiting" for a single 12 VDC pulse from the RAPU unit, and, once received, each remote device will independently run its own program.

As with any project that uses 120 VAC be careful as mains current can kill you!

No comments: