For an average person it looks just like a bunch of lights, but you will be able to tell the time by just a quick glance at this clock. It might take you a couple of days to get up to speed on the esoteric art of fast binary counting, but you'll be able to tell the time right away, just a bit slower in the beginning.
Here's a instructable of counting in binary Binary counting.
Step 1: What You Need
- One Atmel Tiny2313 microcontroller
- One 0.1 uF capacitor
- Eleven resistors - 120 ohm
- Eleven high brightness leds. I used 6 white and 5 yellow
- One 10 MHz crystal
- Two 20 pF capacitors
- One small pushbutton
- Eleven glass marbles
- A nice piece of wood to mount it all on
Step 2: Preparing the Base
I started by drilling eleven 5 mm holes straight through for the leds. On the top I then used a 12 mm drill and drilled down like 7 mm at each 5 mm hole to get an indentation for the marbles to be put into. On the bottom I used an even wider drill and drilled out a huge chunk of wood over each led hole and then I chiseled a trench between the holes so the cables can be put there.
In the middle between the hour- and minute-leds I drilled and chiseled out a huge crater to put the electronics into.
After sanding it a bit and painted it all with a dark brown color.
Step 3: Soldering the Leds & Resistors
Solder the 120 ohm resistors on the long leads.
Solder a wire long enough to reach the middle of the clock to each resistor.
Step 4: The CPU & Crystal
Begin by flashing the software into the chip (ATtiny2313) and test it to make sure that it works.
Then flatten the chip by angling all the leads outwards.
Solder the crystal to pin 4 & 5 on the chip. I ran the leads of the crystal on the bottom of the chip to get them out of my way.
Solder the 20 Kohm resistor between pin 1 (reset) and pin 20 (plus).
Solder the two 20 pF capactitors to pin 4 & 5 and then solder them both to pin 10 (minus).
Solder the 100 nF capacitor between pin 10 (minus) and pin 20 (plus).
Step 5: The Button
Step 6: Wires
The led first led (the led farthest down) is the Minute-1 led up to the led for Minute-32 that should be just beneath the microcontroller. Above the microcontroller is the Hour-1 led.
Don't forget the wire coming from the button, solder that to pin 11 on the microcontroller.
End with soldering the power wires to pin 20 (plus) and pin 10 (minus) on the CPU. And yes, there's one final wire to do - solder a wire between the pin 10 on the microcontroller to the long wire connecting all the leds (and the button).
Finish it off by using hotglue to hold down all the wires into the trenches in a neat and orderly fashion.
Step 7: Schematic
Step 8: The Software
There are really nothing special about the software. Timer0 is used to generate interrupts every 1638.4 uS and the Bresenham algorithm is used to make sure that the clock ticks at average every second.
After power on the the clock displays a dot that flashed up & down to indicate that the time must be set.
By pressing the button the time advances as a slow rate for 15 seconds and then speeds up. If the button is just pressed momentarily (0.1-0.5 seconds) the time is decremented by one minute for easy adjustment.
Step 9: The Finished Clock
Apply 5 volt to it and bask in its glory.... :-)