Fading Spruce
I wanted 3 separate colors of light strings to fade in and fade out 120 degrees out of phase with each other. Thus the effect would be of one color getting brighter, one getting dimmer, and the other in-between. The overlapping of the colors would make it look like there were more colors (blue mixing with red for example), and the spruce trees on which the lights were installed would change color.
I tried getting the effect with an analog (linear) electronic circuitry and spent many hours trying to perfect the scheme. I could get one circuit working, but not 3 out of phase. All the while I was thinking how easy it would be to do it digitally. (It wasn't much easier but it was more fun). I used a Motorola 68HC11 MCU, added circuitry and triac driver, and wrote the program to do what I wanted using assembly language. It took me 6 months to do the hardware and software, working every evening.
Just for fun, I added a potentiometer fade-speed control via a 6 bit A/D input of the MCU. (I could have just programmed the variables in software.)
I used about 1200 mini-lights on the trees and added more as the trees grew larger. Are you aware how fast spruce trees grow in a year? I taped strings of red, green and blue together and plugged them into extension cables that went back to my triac drivers.
When I started this display, the trees were about 6 feet tall and I could reach the top easily. In 1999, the trees were about 20 feet tall, making it very difficult to get lights to the top. I abandoned the mini-lights because they were series wired, and when I put the lights up, bulbs would pop out or twist and the whole string wouldn't work. What a pain! In 1997 I replaced the mini-lights with 7 watt bulbs, the big ones. This made more sense anyway because the little lights on the big trees didn't light up brightly enough.
I redesigned the triac boards and put them outside in a weather-proof box and just run signal wires back to the computer in the house. Works well, except for getting the strings to the tops of the trees.
Code (pdf)