Better binary than the others I looked at!!
I prefer the full binary output for the sec/min/hr (rather than "Binary Coded Decimal" with just minutes and Hours.). I like to see the binary seconds ticking!!
I'm using code for the UNO!! (and Nano!!)
Yes, there are enough pins on the UNO :)
Hardware required:
When complete, it will display time as binary for SEC / MIN / HR.
This is different than many of the others which use BCD (Binary Coded Decimal). This one sets the numbers using only one row of LEDs. I like this setup more because it is not mixing binary and decimal together.
Connect Hardware (using breadboard)
*WARNING* If you do not use the proper resisters with the LEDs (with one for each), you may damage the LEDs.
*NOTE* Adjust the brightness of the LEDs by putting higher value resistors on any that are too bright!
Load the code on your Arduino!
Download the text file, upload to your UNO using the IDE.
Couple notes:
Comment if you need help!
Here's the simulation!!
http://123d.circuits.io/circuits/645817-binary-clo...
OK, some enhancements!!
First off, the programming is very similar, but is running on the Nano now with the hardware instead of the simulation :) (I also have a new simulation at this link it you want to look at the new one http://123d.circuits.io/circuits/649386-binary-cl... )
The changes to the wiring are:
-1-
Installing the Nano is easy! Just plug it into the board!! (though you will need to re-wire the components)
*NOTE: I shorted the ground pin to power by brushing a jumper on the ground pin ... I needed to replace the Schottky Diode (it fried) to get power again from USB, be careful, do not touch power to ground! (best to leave off when wiring and check the circuit before powering!).
-2-
To provide a dimmed "OFF" state for the LEDs (to read them in low light), I needed to move all the resistors to make room for a diode and another wire for the low level power.
The circuit is revised so that the "LOW" power goes from the 3.3v Nano pin through a higher power resister (about 47k depends on the individual LEDs). A diode is in front of the "HIGH" resistor to flow current through the LEDs since the Nano pins are set to ground (0v) when they are off.
"HIGH" power goes through the diode and then through the LED.
-3-
I coded the jumpers to pins 0&1.
BOTH PINS NEED to be GROUNDED to keep time. The timer begins adding +1 for each 1/2 second, but then speeds up until adding +1 each 1/10 sec. To set the hours, I disconnect ground from pin 0 and to set minutes, I disconnect ground from pin 1.
Since these pins will interfere with downloading a program if they are grounded they need to be disconnected to program the Nano.
-4-
5V power source through the USB connector :)
I think I'll drop $4 on some cheap solar lights to make a solar power cell.
-5-
Dim all the lights together by adding resistance to the ground! I put this in the circuit diagram showing the ground going through a potentiometer before going to the ground rail. Adjusting the dial will reduce the overall voltage for the LEDs.
Thanks if you read up to here!
I expect to be adding more steps with solar power, diagram to build from "scratch" using the Mega chip instead of the full blown Nano, diagram for prototype perf board / PCB and 3D prints for the enclosure!