After some modifications on my UV exposure box (scanner) for better UV expose, i desided that a better pcb must me designed for switch timer. The old one had over drilled holes and it was designed and built on my very fist steps. Also the high voltage side from the low voltage wasn't seperated as it needed to be safe.
So i redesigned it in a more compact and easier to use pcb. The firmware has been also updated and now you can program the timmer by using the two buttons. The time is calculated by timer interrupt triggering using a 32.768KHz RTC Crystal with better accuracy. The display update also has been changed from static to dynamic.
The board is homeprinted at my exposure box.
Here is the schematic in pieces.
For 5V supply used for AVR, 7-segments etc, has been used a full bridge rectifier, a big decoupling capacitor and LM7805 :
The two seven segments are connected in parallel and are updated using mutliplexing. Current protection resistors are used for each segment. Q2 & Q3 are switching each display.
Here is the relay drived by Q1 witch switches on/off the relay. On the one side of the relay is connected the AC Mains and on the other the lamps.
The AVR ATmega8. A buzzer has been used to indicate when timer is on/off and when a button is pressed. Here you can also see the RTC crystal 32.768 used to trigger the timing counter.