[miceuz] has a friend that works as a theatre technician, and in the course of his job he often needs to jigger with various stage components while shows are in progress. As you can imagine, the lighting situation is far from ideal, so he asked [miceuz] to build him an adjustable lighting solution for his tool box.
The circuit itself is relatively straightforward, using an ATMega88 to provide the PWM required for dimming and color control. Input is taken from three different sources, a rotary encoder for color selection, a pot for brightness control, and a button to turn the light strip on and off.
[miceuz] says that while project came together pretty easily, it still presented some issues along the way which provide some useful design reminders for beginners (and some veterans) alike.
First and foremost: debounce, debounce, debounce. [miceuz] forgot this mantra and made a mad dash to add capacitors to his design after etching the PCB to ensure that his inputs were not bouncing all over the place. He also noted that one should always be sure to read the ADCL before the ADCH register when decoding ADC data. His final observation is that using thick traces is the best policy whenever possible – he ran into a lot of issues with traces detaching during assembly, which he had to rework with wire and solder.
In the end, his friend was happy with the result, and [miceuz] is a better hacker for having worked through his issues. What sorts of important/useful lessons have you learned through the course of your projects? Be sure to share them with us in the comments.