Binary-Analog Dial-Retrograde Clock or the BAD-R Clock or the Rosetta Stone Clock
by imitche3 in Circuits > Clocks
1816 Views, 13 Favorites, 0 Comments
Binary-Analog Dial-Retrograde Clock or the BAD-R Clock or the Rosetta Stone Clock
In the time of Thomas Edison, my GrandDad made a living repairing and selling watches to Louisville & Nashville Railroad workers. Living with the ticking of time and the chiming of hours, I grew up to like watches and clocks.
One of my first microprocessor hobby projects was Taifur's "Binary Desk Clock" Instructable which taught me how to use the MAX 7219 LED Controller used in this project. I added an Analog Dial clock insert to help folks understand the translation between the two timepieces. Future versions will replace the battery operated Analog Dial clock with (hopefully) a larger version of a CG9A01 1.8” round display.
So; I had a Binary - Analog Dial clock. And it was BAD! .....But I wanted more! So I added a Retrograde Clock built with volt meters. NOW, I have a BAD-R clock.
To paraphrase a great American philosopher from the 1980s:
This clock is: "Bad, It's Bad, it's Really, Really, BAD-R" (repeat) ;-(
Teachers - Make sure to check out Step 6 for all of the ways this BAD-R Clock is a teaching tool for lots of mathematical concepts. Lure students into the clock by explaining how mathematics and this clock are your best chance of communicating with any visiting space aliens they may encounter... Check it out!
I’ve included case options for the versions shown here (one is laser cutter the other is 3D printer)
Supplies
Fort Collins Creator Hub is a cool maker space where I learned most of the skills used on this project. You can't buy supplies there, it's just a wonderful place with resources for individuals to work.
Arduino Nano (Buy from amazon.com)
DS3231 RTC Module (buy from amazon.com): . A Real Time Clock for the Nano 5-$18 to $4/per
MAX7219CNGLEDDriver IC (buy from amazon.com): $12 $3/per
3-5V Volt Panel Meter - uxcell 91C4 Class 2.5 Accuracy DC(buy from amazon.com)
20 LED, 5mm (buy from amazon.com): Your choice on color
140mm LED strip 5V to light volt meters
Resistor 10K ohm: Used to control the segment current of the MAX7219 IC
Circuit Board to build the circuits on - A 2.75in x 2in holds things fine
Circuit Board to hold time set buttons
3 - 6x6x8mm tactile momentary pushbutton
Analog Dial clock inserts 2.5in diameter mount for BAD-R clock
Analog Dial clock insert 1 3//8in diameter mount for BAD clock
Circuit board sockets - 30 pin for Nano, 24 pin narrow (0.3") DIL socket, DuPont connectors, JST-XH connectors
Start With the Clock Face
Print/Cut/Wire The Binary Clock Face FIRST!
Go ahead and print, cut and wire the binary clock face first. Both BAD clocks require building the binary clock display LED matrix. This Instructible includes a 3D printable "lifter" to hold the clock face with space below for the LEDs while you place and solder the LED matrix
Same if you're making the Binary/Retrograde clock requiring 3 analog volt meters. Measure these first and make adjustments.
In arranging the LEDs, keep the following in mind
- The matrix origin (0,0) is the upper right corner LED on the front of the face. It can get confusing because you place & solder the LEDs from the back.
- You will be connecting the anodes of each column together and the cathodes of each row together.
- Orient the pins of all LEDs the same way (all cathodes point one way/all anodes point another) as you place them in the clock face
- Bend anode leads together and complete the column connection with jumper wires. Similarly, with the cathode rows
- Attach 10 connection leads : 4 - one for each row and 6 - one for each column
- Column leads will be connected to each of the four electrically connected anode columns
- Row leads will be connected to each of the six electrically connected cathode rows
- If using the laser version BAD clock, I suggest using different colors for hour/minutes/seconds LEDs. I found the separation between hr/min/sec section columns are too close to easily know what column you're in.
Please go to Taifur's "Binary Desk Clock" Instructable for lots of good detail on this step
Attachments
- faceplate_lifter.f3d
- Download
- View in 3D
Build the Circuit
Three components make up the clock circuit which is based on the Arduino Nano. Connected to the Nano are the DS3231 RealTime Clock and the Max7219 LED controller. The code requires the wire.h, ds3231.h, ds3231_RTC.h and ledcontrol.h libraries.
Arduino connectivity:
Arduino MAX7219 DS3231
D12 DIN
D11 CLK
D10 LOAD
A4 SDA
A5 SCL
Both the DS3231 and the Max7219 take 5v and ground from the Arduino
Should you decide to make the Binary/Retrograde clock you will need three 5 volt, volt meters. Connect the v-meters to Nano pins 2,3,4 along with a ground connection. The circuit diagrams include connections for the retrograde meters and are in the script code as well.
Given the entire circuit is 5v, make sure to buy 5v lighting strips to light the volt meters
Using sockets for all 3 devices make life ever so much easier for the imperfect human. You can treat a socket roughly if you have to remove them. The Nano has 30 pins and the MAX uses a 24 pin narrow (0.3") DIL socket. I used Dupont connectors for the real time clock and JST-XH sockets for all of the peripheral wiring connections. It makes troubleshooting much easier if you can get the board out on its own to work on.
I strongly recommend installing the Arduino Nano on the circuit board first, then the DS3231 real time clock. Make those connections. Do unit testing on this configuration using the examples provided by the RTC libraries. Only after you have the RTC circuit working should you try to install the MAX 7219. As with the RTC connections to the Nano, do unit testing between the Nano and the Max LED controller using provided libraries before moving forward.
At this point you have unit tested the real time clock and the MAX LED controller and know any problems are most likely not the board.
The LED strip has a lot of options. I ultimately used 2 x 8LED RGB neopixel strips. The thinking here is expansion opportunities. Add a chimer and use neopixel colors to code quarter hour periods, maybe flash on the hour. A simple strip of 5V white LEDs with resistor, power and ground can be used just as well.
This project takes a lot of soldering. Make sure to wash your hands after a build session using solder. (A nod to the Hub's Soldering Class instructor. Most of the lead exposure during soldering is through your hands, not the vapors. I had no idea!).
Attachments
Prepare Volt Meters
You will have to remove the clear protective cover from the volt meters to replace the face with time vs volt markers. It may be necessary to "Snip" the image and resize and or scale the image to fit your meters. Card Stock does best but make sure to test the meters with the replacement faces before replacing the clear plastic covers as light weight paper may bend and bind the meter needles.
The volt meters need calibration via hard code changes in the script above the setup() section. The meterMaximum and meterMinimum variables establish boundaries to accurately point time. Use these variables to make the numbered tick marks (3,6,9 marks for hours and 15, 30, 45 marks for min/seconds) look correct on average.
Now is a good time to wire and install v-meter lights. Some RGB strips require 4 wires. Most Neopixels require 3 and a strait white strip would just require 5v and ground.
Downloads
Build Cases
The laser cut "clocks plural' pattern assumes 3.3mm Baltic birch plywood.
I used both Prusa Slicer and a Prusa MK3 printer for the BAD-R version of the clock. Updated versions of Slicer have the ability to program a filament change to pause automatically and guide you through the switch-out process. The raised lettering, v-meter light hood and the clock mount were printed using this method. I sliced the clock section at the face of the analog clock to minimize support requirements. Slicer now has "Pins" that you can incorporate into the design to help align split parts when you glue and reassemble (will incorporate in later versions). The pieces are friction fit and may either require filing or hot glue to fit perfectly. You just never know.
The Code
There are many improvements to be made in the code, the most obvious being the over use of global variables; but it works.
The clock has all the pieces and parts of a clock Arduino program:
Set RTC time - setDS3231time()
Read RTC time - readDS3231time() and readTime()
Format for display - setTime()
Display time LED & v-meters - setLEDs()
Downloads
BAD-R Teaching Opportunities
The BAD-R clock was designed to represent a single mathematical concept in multiple ways. Think Rosetta Stone. It represents Earth time using many mathematical constructs.
- 3 time representations
binary climb, analog dial, retrograde
- 3 different numbering representations
binary LED, roman numerals, Arabic
- Number bases for representing time
base 24 for hours, base 60 for minutes/seconds all using base 10 time span division indicators
Communicating with intelligent alien life forms first came to my attention with the "Golden Records" included aboard two Voyager space crafts launched in 1971. The TV show "Big Bang Theory" did a subplot of an episode on this topic in the 2015 episode "The Communication Deterioration". Both NASA and Big Bang Theory dealt with outgoing messages. The BAD-R Clock assumes aliens visiting earth.
Space Aliens visiting Earth will have the benefit of observation. They will observe and measure the earth's rotational period. Let's assume the binary number system is a universally understood construct across all intelligent species (It’s the simplest of an all numbering systems). Tammy or Tommy can use the Binary Clock to help the Aliens understand that humans have divided this rotational period into 24 sub periods called hours and further into minutes and then to seconds of 60 periods each. Then they can make use of the alternate clocks to demonstrate different numerical representations. Abet slowly, you then have the tools to understand representations of many kinds (exactly how a computer does it). Now you have human and alien races on their way to understanding one another and living in a happy productive universe. You're Welcome!