Ed Nisley's Blog: Shop notes, electronics, firmware, machinery, 3D printing, laser cuttery, and curiosities. Contents: 100% human thinking, 0% AI slop.
I read a whole stack of NIST doc on the WWVB transmitter & time code format last year, figuring out how to build a WWVB simulator and then the Totally Featureless Clock. The Circuit Cellar article on the simulator just appeared in print and a reader gave me a heads-up: the transmitter power now drops 17 dB during the low-power part of the PWM pulse.
How could I miss it? Well, all the doc is quite old and the change happened in 2006…
Fairly obviously, the C-Max WWVB receiver I’m using doesn’t have the mojo to track the signal during the day, no matter how fancy the modulation. Those pulses, the low-power part of the signal, just aren’t present amid all the other noise!
Also of interest: the WWVB transmitter has been running at half-power during the daylight hours since September 2009 while they do antenna maintenance. That’s supposed to be finished right about now, so the signal should be 3 dB better. I’ve got a nearly continuous record of the last month or so, which means a comparison will be in order after a few weeks.
Search for WWVB to find the other posts I’ve done on this topic…
When you’re buying test equipment, buy all the options.
Mad Phil taught me, long ago, to buy everything available in one package, rather than try to figure out what you’ll eventually need and go through the justification process for each piece you forgot.
That applied in a corporate setting, but it’s worth pondering even for your own gear: you’re likely to own it longer than the company producing it will offer parts.
Or, these days, it’s more likely you’ll outlive the company…
Ferrite inductor cores are notoriously fragile: they do not withstand much abuse at all. Given the amount of fiddling I’ve been doing with the Totally Featureless Clock, it was inevitable that I’d manage to drop the antenna…
Broken ferrite bar antenna
Gluing it back together with cyanoacrylate demonstrated that some things just never work the same. The antenna depends on a continuous flux path through the winding and even the minute gap introduced by the adhesive is enough to ruin the antenna.
What they say about hearts and wheels is also true of ferrite bar antennas:
The next day of WWVB Glitchiness, with the “!” limit characters changed to “|” to move them above the plot where they belong… which really doesn’t make that much difference.
Gnuplot Glitchiness 2
It’s worth mentioning that the WWVB transmitter is running in degraded mode during the day, down 3 dB, while they work on the antenna system. It probably doesn’t make much difference, given the noise around here, but you can see a definite jump as the frame marker pulses pop up off the floor.
The clock synched with WWVB nine times during the Valley of the Shadow of Night. Each synch requires four consecutive glitch-free minutes, which obviously doesn’t happen during daylight hours.
That’s with the antenna perched 3 cm over the top of the clock, aligned with the circuit board: the hardware seems quiet enough.
The character based Glitchiness histograms described there work pretty well for short time scales, but more than a screen full is too much. It turns out that Gnuplot can chew up the histograms and spit out a perfectly serviceable 3D map plot.
The trick is to extract the histogram characters into a file, then persuade Gnuplot to regard the file as a binary array, with the ASCII character values giving the Z height of the dot for each XY cell.
Click for bigger picture:
Gnuplot Glitchiness
The axes:
Front edge = 51 pulse durations, 0 – 1 second, 20 ms resolution
Right edge = 1363 histograms = 22.7 hours of WWVB reception
Z axis = histogram counts
The flat plane has the vast majority of points having zero (or just a few) counts.
The three front-to-back hillocks show the durations of the binary-zero, binary-one, and frame markers within each second; the resolution is 20 ms per sample perpendicular to those lines.
The fuzzy mountain peaks along the left edge represent intense noise; you’re looking for the very few intervals of zero noise when the WWVB signal is readable. Those would be flat lines from the left to right edges, with just three bumps at the proper durations.
The valley between the mountain peaks is the nighttime reception, when the noise drops to bearable intensity and RF propagation brings in enough WWVB signal to make a difference. The fact that you can see the proper pulse widths through much of the day suggests the signal is in there, but it’s so noisy you (well, I) can’t make make much use of it.
How to get the graph…
The clock produces three lines of output every minute that look like this:
You could do that all in one gargantuan Bash line, piping the results from one filter to the next, but that’s hard to explain.
Now, fire up Gnuplot and have at it:
gnuplot
set xyplane at 0
set zrange [0:128]
splot 'histo.txt' binary format="%uint8" record=52x1363 using 1 with points lt 3 pt 0
The doc suggests record=52xInf should work, but that draws a useless picture. If the record value is bigger than the number of actual records (found with wc -l histo.txt, the plot ends at the end of file; if it’s smaller, then you get only that many records. I suppose you could just use 99999; it’d work well enough.
The 52 comes from the number of characters in the line: 51 histogram bytes per line, plus a newline character at the end. The newline produces the distinct line below everything else along the right edge of the plot. You could get rid of the newline characters and turn it into a binary file before plotting, but that’s sort of cheating, I think.
You’ll recall the counting sequence in each histogram character:
“.” = 0
1 through 9 = obvious
A through Z = 10 – 35
a through z = 36 – 61
! = more than 61
Unfortunately, the “!” has a lower ASCII value than the other characters, so those are the dots below the plane on the left side; they should be along the top surface. I’ll change that to “|” and make the answer come out right.
From here on, it’s a matter of the usual Gnuplot futzing to get a decent-looking plot.
Rotating the view may be useful. For example, set view 60,80 produces this:
Gnuplot Glitchiness – rotated
Now you’re looking more-or-less parallel to the samples for each minute. If you twiddled with the ranges, you could probably see the few valleys where it’d be possible to extract a valid time code.
The alert reader will note that I used record=52×4344 to generate those plots. Homework: why?
The little C-Max CMMR-6P-60 WWVB receiver board is somewhat sensitive to its surroundings: putting it too close to fast-switching digital signals is a Bad Idea. Of course, when there’s an antenna connected to the thing, it’s hard to separate the effects, but I’ve been testing reception with the antenna at the end of a two-foot twisted pair: far enough away to eliminate most problems.
Just to see what happens, I built a little shield enclosure around the receiver board. The clock board has a pair of solid planes isolated from everything else, with a header matching the receiver’s pinout, for this very purpose. The receiver has a fairly solid ground plane on the bottom, but it’s quite sensitive being snuggled up against other objects; the header holds it about 5 mm above the circuit board.
The dark amber square is Kapton tape across the traces. If I ever do this again, I’ll put the traces on the bottom so the board is entirely shielded and the tape isn’t needed.
Shield soldered to base
Some 1-inch copper tape with adhesive on one side serves as the shield enclosure, with a layer of Kapton tape covering all but about 2 mm of the adhesive near the bottom to insulate the copper from the receiver. Bent those 2 mm strips outward, with the adhesive on the bottom, stuck it to the shield plane, and soldered it in place at the corners.
The antenna leads poke out through one side; it’s not very elegant, but I think it’s about as good as is needed for this sort of thing.
I cut the tape at the corners and folded it down to make a little box, stuck a square of copper tape over the top flaps, soldered the corners, and it’s cute. Admittedly, it doesn’t have perfect conduction around the joints; the next time it’s on the bench I’ll add a few solder dots at the midpoints.
Completed shield enclosure
The immediate effect was to raise the receiver’s Glitchiness score by a factor of about four. However, that’s not entirely a bad thing; it turns out that the reciever is much less Glitchy when it’s subject to high noise levels: the receiver AGC cranks the gain down so low that only heroic pulses get through and the number of glitches drops dramatically.
As nearly as I can tell, when there’s no WWVB signal, as during the day, a low Glitchiness count means there’s extremely high noise. Thus, a higher count means less noise and better sensitivity.
More data collection is in order, but the receiver’s LED showing data pulses now tracks the Alpha Geek Clock‘s display almost perfectly.
Given that the wavelength of WWVB’s 60 kHz carrier is 5 kilometers, you’d think that the position of a receiver’s ferrite bar antenna isn’t all that critical. I’ve been running a receiver hitched to a laptop atop a file cabinet, with the bar antenna a few feet away atop an adjoining bookcase.
Putting the antenna 12 cm over the top shelf surface (in a kludged cardboard holder to keep it off the wood), located on the left side of a mechanical mantel clock, produces these samples:
The first position is roughly equidistant from the apex of the corner, so the antenna is on the diagonal of a corner reflector made from the metalized aluminum foil of the exterior insulation.
I’m not sure what to make of this, other than that location is everything.