A project log for MURB

A binary clock

BiraBira 03/17/2015 at 17:270 Comments

I've added circuit schematics and PCB layout files to the GitHub repository. Circuit is almost as simple as it could get. LEDs are connected to ATmega pins, with current limiting resistors. The encoder and the push-button are also connected directly to the µC pins, with pull-up resistors. All the LEDs, the push-button and the two encoder channels are each connected to its own dedicated pin. A 16MHz crystal, three capacitors, a programming header and another pull-up resistor complete the circuit.

I used gEDA for schematic capture and the PCB layout. I'm a beginner with those and it took some time to learn it. But it was worth it.

MURB's precision as a clock depends on the crystal. One MURB I built advances about 4 seconds per day. This is a frequency error of about 50ppm. Maybe a different crystal would have better precision.

This is the LED part of the circuit. At first, I selected the resistors to have a current of 20mA through the LED when on, the nominal current according to the datasheet. But these LEDs are bright! I'm using the L-7104QBC from Kingbright. At 20mA I could only dim it with a very small duty cycle in the PWM. So I went on and reduced the current. The final resistor value used was 5.6kOhm. I didn't measure the current, but it is below 1mA, probably below 0.4mA.

Another thing to note on the circuit above is the position of the resistors. Usually it doesn't matter much because they are in series with the LEDs. But since I'm using the schematic to create the PCB, I had to alternate the order LED-resistor in some pins to simplify the layout.