Building a WWVB Receiver Using the CME8000

(C) 2010 Hank Wallace

A recent project called for a WWVB receiver to decode the time transmission sent at 60KHz from Fort Collins, Colorado. The C-MAX CME8000 device was chosen for its multi-band capability. Unfortunately, several problems became apparent. This article explores these issues to hopefully save you such grief!

Poor CME8000 Documentation

The first problem encountered was the poorly written, broken English format of the CME8000 data sheet. I understand that there is a tremendous shortage of English speakers on Planet Earth, but C-MAX could have made the investment in time to have a schoolkid from New Jersey proof their data sheet for grammatical correctness. It’s hard to have confidence in the manufacturer or their product with jewels like this in the data sheet:

“To get a fast information of the received protocol, after every power on the received signal will be compared with the chosen protocol. The bit stream is checked for pulses with characteristically pulse duration.”

I had to piece together the workings of the CME8000 from the data sheet and several application notes, some for other devices. Hopefully, this article will help you create a working design.

CME8000 Decoder Lockup

The next problem is with the hardware in the CME8000 where the BSI signal strength decode logic locks up and the BSI outputs stop updating with changes in input signal level. This generally happens after a few hours of decoding.

After exploring several fixes, I determined that the last half of the CME8000 logic is simply brain damaged. Tragic that this device is on sale when it simply does not work. Perhaps the same people who wrote the data sheet designed the chip?

Fortunately, there is a test mode in the CME8000 that allows access to the output of the bit detector. The front end of the CME8000 appears to function correctly, so I simply created a bit decoder for the WWVB signal. My decoder has run for weeks on end with no issues.

I cannot publish the source code for this decoder for reasons of confidentiality, but I will outline here the logic involved. It is coded as a state machine. The SampleBit() function is described below, but basically determines whether the incoming bit is a 1, 0, or marker.

State 0:

  if bit is a marker
    state=1

State 1:

  if bit is a marker
    state=2
  else
    state=0

State 2:

  save bit in buffer
  check for fixed zero and marker bits
  if error
    state=0
  if 59 bits received
    ValidateTime()
    state=0

Note that in the WWVB protocol the first and last bits of a 60-second frame are markers. The decoder senses the beginning of a frame by detecting two markers in states 0 and 1. Once detected, state 2 collects subsequent bits and buffers them. State 2 also checks several bits in the frame which are fixed at zero or marker states. If these bits are in error, a transition to state 0 resets the decoder. After 59 bits have been detected, ValidateTime() is called to check the received time against recent received times.

The SampleBit() function performs this logic:

wait for start of bit (rising edge on TEST pin)
sample the bit at 19ms intervals for 50 times
if less than 35% of samples are high
  bit is a marker
else
  if less than 65% of samples are high
    bit is a one
  else
    bit is a zero

This is a standard bit sampling decoder which you have probably written yourself many times. It is tolerant of noisy bits using the sampling and thresholding technique.

With this decoder software, extracting the time from the WWVB bit stream is simple and reliable. You could add more noise tolerance in the SampleBit() function if needed, but I was getting 200-300 decodes per night on the east coast of the US.

Extreme Noise Sensitivity

Another issue with the CME8000 is its extreme noise sensitivity. This may not be a flaw in the device, but should be mentioned. I found that any local noise source would destroy the sensitivity of the receiver. Particularly, compact fluorescent bulbs are WWVB killers. They radiate wideband noise that totally swamps the signal. (The topic “Fun with CFL Bulbs” will be saved for another article!)

I also found that it is necessary to keep the antenna coil away from local noise sources, such as the micro that decodes the data. It is recommended to leave the micro in sleep mode as much as possible, and use hardware logic (a timer counter) to do the bit decoding, if possible. Decoupling using bypass capacitors is important, but the loopstick antenna will also pick up noise directly from the micro.

Tuning Difficulty

Tuning the CME8000 receiver is a pain, to say the least. One would think that if you are going to the expense of integrating a sensitive, narrowband receiver onto a chip that you would provide for some automatic or at least automatable tuning facility. This is not the case with the CME8000. Though it allows for multi-band tuning, there is no easy way to tune the tank circuit for each band in production. One is reduced to soldering capacitors.

I found that the tank could be tuned even without power applied to the chip. This is done by exciting another loopstick antenna with a 60KHz signal running less than 100mV. Coupling the exciter loopstick to the antenna on the CME8000 injects a signal into that resonant tank circuit. I scoped the tank circuit and adjusted the capacitor and coil for resonance at 60KHz, plus or minus 100Hz. The signal level at that point is just some few millivolts. The resonant peak does not move significantly after power is applied.

With a small loopstick antenna (about 1 inch long), I was only able to obtain a tank Q of about 25.

It is possible to electrostatically shield a loopstick antenna, to cut noise levels. However, I determined that any proximate shielding material detuned the antenna considerably. This has the effect of making the shield part of the tank circuit, requiring tuning of the tank with the shield fixed in place. That means that any shielding material needs to be carried with the WWVB receiver circuit and not externally, for example on the inside surface of an enclosure.

Another tuning issue concerns the crystal. The data sheet does not specify the mode of operation of the crystal, series or parallel resonance. All the tuning fork 60KHz crystals I found were listed as parallel mode. However, it appears that the crystal is used in series mode, as a filter, meaning that the point of resonance will not be 60.000KHz. I measured several crystals and this was indeed the case, with the error being one or two Hertz. This is enough to seriously impact the sensitivity of the receiver. I obtained a quote from C-MAX through a distributor for 60KHz crystals (mode not specified), and they quoted a 6-week lead time. Presuming that they are having 60KHz series mode crystals made custom, it is interesting that I can buy the chips off the shelf, but not the right crystals. I found with one device that the crystal taken from a C-MAX development board worked, but a stock 60KHz parallel mode crystal did not.

I was ultimately able to tune the tank circuits and get some decode performance even using stock parallel mode crystals, though I am highly suspicious that much of the sensitivity is being wasted.

A WWVB Simulator

I work days, and that makes it tough to test WWVB receivers, since propagation is best at night. After some struggling with this issue, I built my own WWVB simulator. This is a trivial affair and consists of a DDS function generator (B&K 4017B), a transistor based attenuator, serial port cable, and simple bit generator program.

Recall that the WWVB signalling format requires attenuation of the signal during various time periods to create and differentiate the bits. It is not just an on-off keying protocol.

The signal generator has a sub-Hertz resolution and can produce a good 60KHz sine wave within the narrow passband of the receiver. The generator has a computer interface via RS-232 and the signal level can be varied. However, as with much test equipment these days, the AM performance is poor, having a bandwidth of perhaps 5Hz! It is not possible to have a program control the signal level through the RS-232 interface because the signal slews only slowly between levels, revealing some poor design choices in this product as well. Isn’t life fun?

To compensate for this difficulty, I created a simple attenuator consisting of a transistor and a couple resistors, driven from an RS-232 RTS line. See the schematic below.

atten

The RTS line from a PC serial port is used to control the signal level.

I cannot publish the program I wrote, but it is simple and you should have no trouble reproducing the function. There is a good table showing the time code format here. I tabulated a fixed time in a constant array and sent it repeatedly. You could easily send the actual date and time. That reference also discloses the bit timing format.

Thus it is not necessary to spend thousands of dollars for a WWVB simulator when you can build one in a couple hours.

Conclusion

Those are my experiences with the C-MAX CME8000 WWVB decoder device, and how I compensated for its shortcomings. Please do not email and ask for source code as I cannot divulge it at this time. However, I have given you the basic outline of what needs to be done, as the C-MAX application notes attempted to do with less than total success. Making a working WWVB receiver should be easy for you now. Good luck!

Author Biography

Hank Wallace is the owner of Atlantic Quality Design, Inc., a consulting firm located in Fincastle, Virginia. He has experience in many areas of embedded software and hardware development, and system design. See www.aqdi.com for more information.