Schematic Source code
I made this project for Leo, a brother of mine. We had an old remote control of a video recorder laying around and he wanted some dimmers for all the lights in his house. I didn’t have much experience with programming microcontrollers at that time but I was willing to start something new.
The basic hardware was built within 2 weeks of spare time and I got the software working in one or 2 months more. After I thought the project was finished the requirements changed a few times and I was stupid enough to accept those changes as an extra challenge. One change was an extra light switch to turn one light channel on so you wouldn’t have to search for the remote control in the dark if you come home late.
And another was for the control of some motorized curtains. The curtains never worked properly but the light switch works. I also made a few basic errors in the design. I do far to much work in interrupt routines which make all the lights blink if the controller receives an infrared signal it wants to try to decode.
Another big problem is that the lights are controlled via a loop in main and the timing sometimes get upset. A third problem is a hardware bug because the controller resets itself every few weeks or months. At this time I am able to write better software but that would mean a complete rewrite of all the software (2kB). Maybe I shouldn’t complain to much. The project has been in use since 2001 and sometimes he complains a bit but he is still using it.
Read more: Dimmer using ATTiny2313 microcontroller