introduction:
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.
the clock design:
at the clock's core is an atmel atmega16 micro, running on its 1mhz
internal rc oscillator. a pulse-per-second interrupt is achieved by
prescaling the 32.768khz 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 4khz. 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've just completed on the computer. they have not been tested, but i'm quite sure they work just like the last version:
|
|
|
the materials listing:
i sourced all components from mouser this time, as i've found them to
be easier to work with, 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: | ||||
| part no. | description | quantity | price ea. | subtotal |
|---|---|---|---|---|
| 512-LM317T | 1.5A adjustable linear regulator | 1 | 0.43 | 0.43 |
| 556-ATMEGA16-16PU | 16MHz avr risc microcontroller | 1 | 6.56 | 6.56 |
| 595-SN74HC595N | 8-bit si/po shift/store register | 4 | 0.62 | 2.48 |
| 595-ULN2803AN | 50V 500mA octal darlington array | 4 | 1.35 | 5.40 |
| 512-SFP9Z24 | p-channel 60V 9.7A mosfet | 1 | 0.84 | 0.84 |
| 604-WP7113QBC/D | T1.75 water-clear blue led | 60 | 0.22 | 13.20 |
| 80-C440C105M5U | 1.0uF 50V ceramic capacitor | 1 | 0.71 | 0.71 |
| 80-C430C475K3R | 4.7uF 25V ceramic capacitor | 1 | 7.85 | 7.85 |
| 291-470-RC | 470 ohm 1/4W carbon resistor | 1 | 0.10 | 0.10 |
| 299-240-RC | 240 ohm 1/8W carbon resistor | 1 | 0.09 | 0.09 |
| 299-4.7K-RC | 4.7 kohm 1/8W carbon resistor | 1 | 0.09 | 0.09 |
| 299-47K-RC | 47 kohm 1/8W carbon resistor | 3 | 0.09 | 0.27 |
| 73-XT38T | 32.768kHz 20ppm watch crystal | 1 | 0.30 | 0.30 |
| total: | 38.32 | |||
the firmware:
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:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|