I wanted really bright eyes to shine through the iris.

The LEDs are rated at 3 Watts each (silly bright) and the driver board is a Sparkfun FemtoBuck. The FemtoBuck is a constant current LED driver board that can accept a PWM signal to dim the LEDs -there's a great simple hookup guide on the product page.

Next I made a clear sheet plastic lens, scuffed it with a scotchbrite pad and added some polyfill behind the lens to help diffuse the light and then I placed the lens behind the iris. The LEDs were simply screwed to the 1/2" hub clamps that hold the iris cups in place. I was really happy with how it looked. The pics show the full range of iris motion.

I set up the radio to dim the eyes and poof! Yep- I let out the magic smoke. I accidentally reversed the power wires to the FemtoBuck and smoked the driver chip. I ordered a replacement AL8805W5 chip, removed the blown one using a hot air tool and soldered the new one in. Note to self- ALWAYS use polarized connectors!

As soon as I was back in business I set about making the RC radio receiver signal work with the FemtoBuck. The FemtoBuck is able to dim the LEDs by applying a voltage range of .5V to 2.5V to its control pin. The problem is that the RC receiver doesn't output a compatible signal so a fix is needed.



Arduino (Pro Mini) to the rescue! At the beginning of this project I thought I'd finally build something animatronic without an Arduino in it but the little bugger managed to work its way in there...

The Arduino takes power and input signal from one channel of the RC receiver. The Arduino output then is connected to the input control pin on the FemtoBuck- simple!

Using this code the Arduino was able to take the output of the RC receiver and turn it into something useful-

const int inputPinA = 2; // The pin connected to the RC receiver's servo output A

const int outputPinA = 3; // Output PWM pin A

void setup() {pinMode(inputPinA, INPUT);}

void loop() {unsigned long pulseLength;

pulseLength = constrain(pulseIn(inputPinA, HIGH), 1000, 3000);

analogWrite(outputPinA, map(pulseLength, 1000, 3000, 0, 255));

}

And with that I was able to get a full range dimmer for the eye LEDs using the RC transmitter. I also made two battery packs using AA NiMH cells- one 6V pack for the radio receiver, Arduino, head and eye servos and a 7.2V pack for the fan servos and eyes. The reason for this is the fan servos are rated for higher voltage and draw more current and the eye LEDs also want 7V + input power. In order to do this the fan servos are still connected to the radio receiver, but only using the signal and GND wires. The output from channel 6 on the receiver provides +6V, GND and the signal to input pin #2 on the Arduino. The output from the Arduino pin #3 provides the signal to the FemtoBuck to dim the eye LEDs. The wiring diagram shows all of the battery and servo connections and how power is routed in the system.

The radio is set up as follows:

Channel 1 -> Right head servo

Channel 2 -> Eye iris servos

Channel 3 -> Head tilt servo

Channel 4 -> Left head servo

Channel 5 -> Fan servos

Channel 6 -> Eye LED dimming

When moving both of the radio sticks forward and back, the head will move down and up. When moving the sticks in opposite forward and back directions the head will move side to side. When moving the right stick side to side the eye iris will open and close. When moving the left stick side to side the head will tilt side to side. Rotating the channel 5 and 6 knobs will open and collapse the fans and dim the eyes.