Inspired by other LED clock designs on the internet, I decided to test my skill by designing and building my own. The entire project was done using open-source software, including PCB and gschem. The circuit board was developed using sodium hydroxide and etched with ferric chloride, which took some practice.
At the clock’s core is an Atmel ATmega16 micro, running on its 1.0 MHz internal RC oscillator. A pulse-per-second interrupt is achieved by prescaling the 32.768 kHz pulse of a watch crystal by 215. The ‘digit’ cathodes are driven by AVR GPIO’s through SN74HC595 shift registers and ULN2083 darlington drivers, and the anodes are driven by a pulse-width modulated P-channel MOSFET at 4.0 kHz. Software fading routines were written to make the display less ‘rigid’ looking.
The schematic, layout and copper etch pattern are of a redesign of the clock which I re-made on the computer. They have not been tested, but I’m quite sure they work just like the last version:
A link to the C firmware, written against the avr-libc open-source library. The Makefile included allows for writing to the flash and fuses via avrdude:
Note: The above link is presently broken, as I seem to have misplaced the source files. If you really want more info, email me and I’ll try to dig up the original sources.
I sourced all components from mouser this time, as I found them to be easier to work with at the time, have a better selection of some parts, and a superfast (two days UPS ground!) shipping time. Here are the parts:
|LED clock bill of materials|
|512-LM317T||1.5A adjustable linear regulator||1||0.43|
|556-ATMEGA16-16PU||16MHz avr risc microcontroller||1||6.56|
|595-SN74HC595N||8-bit si/po shift/store register||4||0.62|
|595-ULN2803AN||50V 500mA octal darlington array||4||1.35|
|512-SFP9Z24||p-channel 60V 9.7A mosfet||1||0.84|
|604-WP7113QBC/D||T1.75 water-clear blue led||60||0.22|
|80-C440C105M5U||1.0uF 50V ceramic capacitor||1||0.71|
|80-C430C475K3R||4.7uF 25V ceramic capacitor||1||7.85|
|291-470-RC||470 ohm 1/4W carbon resistor||1||0.1|
|299-240-RC||240 ohm 1/8W carbon resistor||1||0.09|
|299-4.7K-RC||4.7 kohm 1/8W carbon resistor||1||0.09|
|299-47K-RC||47 kohm 1/8W carbon resistor||3||0.09|
|73-XT38T||32.768kHz 20ppm watch crystal||1||0.3|