Let's face it. Taillights are boring.
At best they go 'blink blink - look at me! I'm blinking - woohoo' all the time. And they're always red. Very creative. We can do better than that, maybe not much, but still better than just 'blink blink'. I was riding my bike during new year celebrations and people liked it, and not all of them were drunk ;-)
The rest is pretty straight forward: 2x AA cells, boost converter for 5V, some RGB LEDs, the obligatory micro controller, custom printed circuit boards from BatchPCB, perfboard and the usual soldering gear.
Step 1: Main Schematic
Really nothing special. If you know how to wire up an AVR chip on a breadboard or an Arduino on a breadboard, if you like that better, you won't have any problems with this one. I used KICAD for designing the schematic and the printed circuit boards. KICAD is open source and as opposed to eagle, which has a free (as in free of charge) version as well, there are absolutely no limitations in the size of boards you can make. You too get gerber files that work with any fab house you want. E.g. BatchPCB had no problems with them.
In the schematic you'll just find the cpu, the LEDs, a few resistors and capacitors. That's all. There's a few headers too. The boards have an ICSP header for flashing a bootloader and a 6pin header for convenient serial upload. The last 2 headers are mirrored and contain power, I2C and two more GPIO/ADC pins.
3 GPIO pins with 3 current limiting resistors are used to supply current to all 8 anodes of a single color. Individual LEDs are turned on or off using 8 GPIO pins to drive the cathodes. Depending on the type of operation the LEDs are either multiplexed (PWM for more colors) or fully on (higher brightness).
Some info on the packages I used for this board:
- ATmega168-20AU: TQFP32 SMD
- LED: PLCC6 5050 SMD
- Resistors: 0805 SMD
- Capacitors: 0805 SMD, 1206 SMD