
Hardware
A Microcontroller AT89C2051 with a low-cost X-tal 3.579MHz runs timer6.hex. The 6-channel output is P1.2 to P1.7 driving with sink current. A 74LS07 open collector provides approx. max 20mA @12V suitable for driving a homemade opto-triac shown in Figure 2. Two signal diodes, 1N914, provide simple backing up supply for the AT89C2051. Since RST uses simple RC circuit, there is no brownout protection and reset switch thus when the controller operated with battery for long time, the chip may knock. Simply take the battery out and put them again. The RS232 level converter, instead of DS275, any converter may use, or simple circuit using two transistors.
Link: source