May 15, 2013

Electric Tricycle, now with Gaudy Lighting

 Using a couple feet of RGB LED strips I found in a drawer at MITERS, I made some obnoxiously colorful and bright lights for the tricycle.


This little circuit has some NPN transistors and a 7805 voltage regulator on it.


The voltage regulator powers an Arduino pro mini that sits on top of the board.  This reads the throttle signal, and converts the throttle position into a color for the LEDs.  The LEDs are mapped to the throttle such that the color of the strip shifts through the rainbow as you change the throttle position.  To smoothly transition between colors, the Arduino handles an HSV to RGB conversion.  The throttle position is just proportional to hue value.  The conversion was done with a modified version of this code.  


I crammed the Arduino, transistor board, and tiny DC-DC converter into the cut-down plastic casing from a wall wart, and used an audio jack for quick-disconnecting the the power, ground, and signal lines.


The assembly attaches to the motor controller with a little bent-polycarbonate clip:


 A video of the lights in action: