Binary clock
After fooling around with the Pocket Watch B, I thought I'd make a binary clock.
This uses a 5x7 LED display to display the time as binary values. Leftmost column is months, then days, hours, minutes, and seconds.
There are two buttons that are used to set the time. First button selects the column, the second increments the value in that column.
The LCD is a UJ2041-21 I picked up from Jameco (Cat #335290). The LCD is driven by a MAX7219 - the wiring is straight out of Nuts&Volts #70. The Pocket Watch B came from Parallax, and it's wiring is straight out the datasheet.
The code is attached.
This uses a 5x7 LED display to display the time as binary values. Leftmost column is months, then days, hours, minutes, and seconds.
There are two buttons that are used to set the time. First button selects the column, the second increments the value in that column.
The LCD is a UJ2041-21 I picked up from Jameco (Cat #335290). The LCD is driven by a MAX7219 - the wiring is straight out of Nuts&Volts #70. The Pocket Watch B came from Parallax, and it's wiring is straight out the datasheet.
The code is attached.
Comments
· Neat display...Although I must admit I am having a little trouble following the seconds since it seems to jump to a number high than allowed, but maybe you've set it up like that to handle the missing column?
·· Also I find it interesting that the breadboard you laid this out on is the same setup as I laid my binary clock out on when I ran out of room on the PDB (Don't ask).·
http://forums.parallax.com/showthread.php?p=552892
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
Highest value displayed, except when in setting mode, is 59. Then it rolls over to 0.
In the GIF, it starts out at 32+16+8 = 56. When it increments past 59, it resets to 0 and the minutes column increments from 16+2=18 to 16+2+1=19. Of course, after the GIF gets to 3/5 10:19:04, it loops back to 3/5 10:18:56
There are a lot of LEDs that aren't really used. Seconds and minutes only need six, hours and days need 5, months needs only four.
In setting mode, I blink the top LED in each column in turn.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
·· It makes a lot more sense now.· · Very nice.· Are you planning on putting it into a more permanent enclosure?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
I'll be swapping the Pocket Watch for a DS1302, so I can add a backup battery.
And as it is now, it draws too much current to be useful as a battery-powered clock. It's running off of 9V through a 7805, and it's drawing 40-50 mA. Which means roughly three hours life on a battery.
I'm thinking about replacing the 7805 with a charge-pump DC-DC converter, so I can run it off of a pair of AAs, which would have a lot more mAH. But even then, I may have to put in a sleep mode, so the display is only powered when needed.
·· The DS1302 is my personal favorite...Along with a backup battery you will be able to back up other data in the DS1302 RAM.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
And I can see the source of your confusion. The hackers clocks you'd copied weren't binary clocks, they'd be more correctly called BCD clocks. So naturally you expected one column per decimal digit.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
Her is an analog clock movement but with a WWVB receiver in it (about $14)
http://www.klockit.com/products/dept-159__sku-AAAAH.html
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
John J. Couture
San Diego Miramar College
· Wonder what's the "hackability" of the Klockit unit.
· GPS time is pretty easy to get.
** Edit Addendum **
Sorry, Jeff, we shouldn't hijack your thread/subject.·
My apologies.
Post Edited (PJ Allen) : 3/9/2006 1:10:52 AM GMT
The trick is to get timing down. I haven't done it yet but it would seem it would be a matter of getting the signal then measuring the carrier. A full time message is very slow (1 minute) .... someday I'll tackle it. In the mean time, I'm also thinking about making a binary clock for a friend.
Description of Time Code Format
http://tf.nist.gov/stations/wwvb.htm
Graphic
http://tf.nist.gov/stations/wwvbtimecode.htm
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
John J. Couture
San Diego Miramar College