Another Clock
I built a new clock. Out of the dozens of clocks I built or modified, I made my first digital clock. Measuring 25¼ by 9½ inches, it is the biggest clock thus far.
It all began while at a Hamvention sometime during the mid-2000s, which at the time was still at Hara Arena in Dayton, Ohio. This fellow had four of these really large 6-inch numeric flip digits with each set of two of them connected to some kind of custom PCB. These industrial grade numeric displays were originally designed to be used in scoreboards and such. These 4 digits sat around in the box I got them in until this year when I happened upon them. I then got an idea for another Arduino project.
In looking up the specs for various Arduinos such as the Nano, I realized I would either have to build a real time clock or find one. Well, the former Maoist Chinese will provide.
The Maxim DS3231 chip is said to be a really accurate I2C module RTC with an integrated temperature-compensated crystal oscillator (TCXO). The chip specs say the onboard TCXO is incorporated into the DS3231 chip. The AT24C32 chip provides 32,768 bits of serial electrically erasable and programmable read only memory. This is where the date and time are stored. Next… I then asked myself, how would I set the time on this clock? Answer: why not let the government do that for me? I have this functionality built into all my other clock builds. That’s where the following off the shelf component comes in.
They designed this component around a receiver chip from Micro Analog Systems in Finland. This module was designed for use with micro controllers such as the Arduino with logic levels 3.3 and 5V. Features:
Can be used to receive:
This module has to be ordered with the correct crystal and antenna for the desired frequency.
The Digits
ScoreTronics, Inc. Components Division manufactures and sells two sizes of the Staver "flip digits" (electromagnetic digits.) These were originated and supplied for many years by the Staver Company (Signalex) in Bay Shore, New York. This includes the 402L (4" - 100mm), and the 602L (6" - 150mm). OK, now I have the Arduino, the RTC and the radio. So how do I get the Arduino to flip the digits? Turns out if the segment is to be showing or not, each of the 7 segments is flipped either by a positive or negative 12 volt pulse. I did find where several builders used MIC5601BN driver chips and initiated the pulse using the Arduino. Ah but what-the-heck. We are two decades past Y2K. So, why can’t I use another off-the-shelf component?
Well, what-d-ya-know. Someone does make a driver board – and they aren’t that expensive. They’ve got everything built onto them including mux and I2C bus connections. They are daisy-chained together allowing up to 8 of them to be connected via I2C bus. The I2C address for each controller is determined by 3 jumpers (A0, A1, A2) on each driver board. The boards are powered by 12v DC. Along with the boards, they’ve published the necessary downloadable C++ Arduino driver library routines.
Note. There may be conflicts with certain LCD I2C address such as 39 (0x27). I only used the first four of the above SIG settings. Sample Code: #include <sig7seg-i2c.h> Sig7segi2c sig0; void setup(void) { void SetSig(byte digit0, byte digit1, byte
digit2, byte digit3) The routines do all of the necessary conversions.
OK, before I wire up everything, I need to ask myself, “What’s this WWVB signal look like?” Well, it’s not bits on and off like one might expect. This is 1960s US cold war technology. There’s no forward error correction and no parity. Also, the data does not fit any common baud rate. When I finally got the tiny radio PCB mounted on a proto board and a scope hooked up to it, I was confused. The signal kept switching on and then off again. I thought the board was defective. I then slowed the wave length of the scope down to 1 second per division. That’s when I noticed a pattern emerging. The data is transmitted via 1 second pulses with the width of each pulse indicating a different value.
The WWVB 60 kHz carrier, which has a normal effective radiated power (ERP) of 70 kW, is reduced in power at the start of each second by 17 dB (to 1.4 kW ERP). It is restored to full power some time during the second. The duration of the reduced power encodes one of three symbols:
Each minute, seven markers are transmitted in a regular pattern which allows the receiver to identify the beginning of the minute and thus the correct framing of the data bits. The other 53 seconds provide data bits which encode the current time, date, and related information. The beginning of a minute time data block can be identified by to two markers in succession. These are the end of one data block (59) and the beginning of the next (00).
The Atomic Clock Receiver module takes the incoming signal and shapes or creates square wave pulses. The receiver has available output data pins for either a positive pulse or an inverted negative pulse. Note. The month and day needs to be converted from day of year to mm and dd. Date and time are UTC. The current time for the particular time zone must be calculated. The parameters for the calculations include time zone, DST, leap year, etc. I downloaded the github.com/phanrahan/Arduino/blob/master/wwvb/wwvb.ino code to derive what I developed. There’s still a bug in that once in a great while, the Arduino code will display an erroneous time. This is likely due to RF noise and misinterpreting the data. It takes about two minutes to correct itself. It’s on with the build The clock case and frame are of a fairly simple construction. The digits are held onto a frame made of 1½ inch aluminum angle stock brazed at the mitered corners. I constructed the center (:) colon by gluing two small pieces of white painted aluminum to a black metal box-like bracket, which is the same height as the digits. The outer cabinet is 4 pieces of birch plywood mitered at the corners held together with biscuits. The front class frame which holds the glass is held on with decorative screws and is removable.
The metal clock frame is floating and is held in the cabinet by 8 screws through rubber grommets, hopefully quieting the noise made by the flipping segments.
I cut a decorative window mat out of some picture framing matting material to cover the edges between the 4 numeric segments and the colon. The little thing in the center in between the colon dots is an indicator LED that shows the radio is receiving a WWBV signal. This will blink on and off every second indicating each bit of data. The controller:
From top to bottom:
Controller Box
The control box is also used to access the configuration menus. These include:
S January 15th 2020 - my 70th Birthday
|