Author Topic: Decoding WWVB phase modulation  (Read 8097 times)

0 Members and 1 Guest are viewing this topic.

Offline jmwTopic starter

  • Frequent Contributor
  • **
  • Posts: 285
  • Country: us
Decoding WWVB phase modulation
« on: February 04, 2021, 04:04:23 pm »
For a while WWVB has had a BPSK-modulated signal that is supposedly more robust against fading and interference. What kind of discrete circuit would be used to demodulate it? For a exercise, I've wanted to make my own receiver that can output the baseband signal without using SDR.
 

Offline gnuarm

  • Super Contributor
  • ***
  • Posts: 2218
  • Country: pr
Re: Decoding WWVB phase modulation
« Reply #1 on: February 05, 2021, 09:53:11 am »
I don't know for sure how to analog detect the phase signal in the WWVB signal, I'm much more of a digital guy, but a PLL would do the job.  The PLL would run at 60 kHz to match the carrier.  When the phase shifted the change in the output of the phase detector would shift.  If the tracking is fast enough the control signal would be a spike on every phase shift, either negative or positive. 

The phase shift of the signal is on top of the AM signal.  So when the AM is low the phase is harder to detect.  I suppose you might want to detect the low amplitude and disable the PLL tracking.  But if you can detect when the amplitude is low you don't need the phase detection. 

Or maybe it would be easier to do this the way I would do it in digital.  Have a fairly stable and accurate 60 kHz reference signal to beat against the incoming signal in quadrature and take the ratio.  Hmmm... that already sounds difficult in analog.  Any interest in doing this digitally?  Anyway, the quadrature ratio is the phase difference which will show a slow variation from the difference in frequency of the reference and the WWVB signal.  It will also show a sharp change at every phase shift.  Hmmm... the ratio actually won't change with a 180° change in phase due to the symmetry of the tangent.  But the sign of both portions of the quadrature signal will. 

I used to know how to do this, but I seem to have forgotten the details and a quick google search didn't help. 

I do recall that when the government produced this new format a company worked with them to design a chip which I guess they expected to sell to all the clock makers.  This company has a patent on the method of demodulating the time code signal.  I don't know if they priced the chip too high or what, but I've never seen a standard wall clock that made any claims about demodulating the phase and I'm sure if they were using the chip, they would be crowing about it. The patent still has over 10 years to go I believe.
Rick C.  --  Puerto Rico is not a country... It's part of the USA
  - Get 1,000 miles of free Supercharging
  - Tesla referral code - https://ts.la/richard11209
 

Offline CaptDon

  • Super Contributor
  • ***
  • Posts: 1721
  • Country: is
Re: Decoding WWVB phase modulation
« Reply #2 on: February 05, 2021, 02:30:04 pm »
There is a company that made WWVB timecode receivers that plugged into the Tektronix TM500 system power modules. Those receivers no longer work correctly because the modulation scheme is no longer used. I see the receivers for sale on Ebay from time to time but they are useless. Efratom I think was the company that made them. Blue colored single space plugin. They were sweet back in their day!!!!
Collector and repairer of vintage and not so vintage electronic gadgets and test equipment. What's the difference between a pizza and a musician? A pizza can feed a family of four!! Classically trained guitarist. Sound engineer.
 

Offline CaptDon

  • Super Contributor
  • ***
  • Posts: 1721
  • Country: is
Re: Decoding WWVB phase modulation
« Reply #3 on: February 05, 2021, 02:41:31 pm »
Those little plugin receivers were made by spectracom. They also had the WWVB rack mount models which I currently see on Ebay. I assume those are also not useful today since they had the same guts. Perhaps WWVB has some new modulation standard but I thought with all the GPS disciplined stuff today that WWVB has no compensation modulation scheme anymore????
Collector and repairer of vintage and not so vintage electronic gadgets and test equipment. What's the difference between a pizza and a musician? A pizza can feed a family of four!! Classically trained guitarist. Sound engineer.
 

Offline CaptDon

  • Super Contributor
  • ***
  • Posts: 1721
  • Country: is
Re: Decoding WWVB phase modulation
« Reply #4 on: February 05, 2021, 02:58:53 pm »
I see I am totally ass backwards on this, It is the new PM signal which has made the old Spectracom stuff useless. Sorry about that!! When the phase shifts the old Spectracom and others see this as a frequency/phase discrepancy which is out of tolerance and the error/unlock light comes on as the unit tries to re-establish phase coherency. Ouch, my bad, I just remember millions of dollars of WWVB disciplined oscillators becoming worthless. Cheers mates!!
Collector and repairer of vintage and not so vintage electronic gadgets and test equipment. What's the difference between a pizza and a musician? A pizza can feed a family of four!! Classically trained guitarist. Sound engineer.
 

Offline gnuarm

  • Super Contributor
  • ***
  • Posts: 2218
  • Country: pr
Re: Decoding WWVB phase modulation
« Reply #5 on: February 05, 2021, 05:09:26 pm »
I see I am totally ass backwards on this, It is the new PM signal which has made the old Spectracom stuff useless. Sorry about that!! When the phase shifts the old Spectracom and others see this as a frequency/phase discrepancy which is out of tolerance and the error/unlock light comes on as the unit tries to re-establish phase coherency. Ouch, my bad, I just remember millions of dollars of WWVB disciplined oscillators becoming worthless. Cheers mates!!

The problem is the more accurate systems got the basic time from the modulated tone that was sent AM, but also locked to the 60 kHz carrier to get more accurate timing resolution.  Now that they added the phase modulation these units can't lock to the phase. 

The irony is to demodulate the phase signal requires detecting the carrier phase, just not blindly locking to it. 
Rick C.  --  Puerto Rico is not a country... It's part of the USA
  - Get 1,000 miles of free Supercharging
  - Tesla referral code - https://ts.la/richard11209
 

Offline jmwTopic starter

  • Frequent Contributor
  • **
  • Posts: 285
  • Country: us
Re: Decoding WWVB phase modulation
« Reply #6 on: February 05, 2021, 05:40:07 pm »
Thanks! I'd eventually like to to do something like the wall clock idea (something microcontroller-based) instead of connecting to a full-blown PC SDR setup. So I think digitial demod is ok, and sampling and processing at > 2*60 kHz should be within the capabilities of microcontrollers, right?
 

Offline gnuarm

  • Super Contributor
  • ***
  • Posts: 2218
  • Country: pr
Re: Decoding WWVB phase modulation
« Reply #7 on: February 05, 2021, 06:44:51 pm »
I looked at synchronous sampling in detail once.  I was going to sample at 240 kHz as the lowest frequency to give quadrature data (slower is lower power).  The input stream is multiplied by a pair of sine waves to give the I and Q streams which at 4x the carrier rate are just sequences of 1, 0, -1, 0.  After applying a simple filter the I,Q samples become (y(t)-y(t-2), y(t-1)-y(t-3)), so no math other than subtraction. 

There are short cut ways of taking the RMS of the samples (amplitude signal) and dividing to get the tangent.  I can't believe I didn't realize 180° phase shift doesn't change this ratio.  Hmmm... someone double check me on that.  Yeah, my calculator says they are the same.  So the sign has to be checked and that means both the I and the Q have to be checked since one could be very close to zero. 

While the amplitude squared can be accumulated as a running sum, the I and Q parts probably should be accumulated separately then the signs and phase angle calculated at the end of a sample period.  You want to track the phase angle (the tangent) to see how your oscillator is drifting wrt the carrier.  I was planning to integrate over 0.1 seconds.  The AM varies with a resolution of 0.2 sec, but the phase is constant for a full bit time, 1 second.  The phase changes when the amplitude is low so aligning to the edge of a second may be hard other than by using a long term integration.  Such a long term integration is not amenable to the lowest power levels, but is fine for wall powered equipment. 

Still, if you are trying to get the most accurate timing possible and you are not close enough to the transmitter to receive a good signal when the amplitude is low you may be limited in the accuracy you can achieve.
Rick C.  --  Puerto Rico is not a country... It's part of the USA
  - Get 1,000 miles of free Supercharging
  - Tesla referral code - https://ts.la/richard11209
 

Offline 5065AGuru

  • Frequent Contributor
  • **
  • Posts: 355
  • Country: us
Re: Decoding WWVB phase modulation
« Reply #8 on: February 10, 2021, 01:30:43 am »
There are "de-bpsker" circuits that can make the old receivers useful again.
They have been described on the time nuts forum.

Cheers,

Corby
 

Offline Gregory

  • Regular Contributor
  • *
  • Posts: 59
  • Country: br
    • All Electronics Channel
Re: Decoding WWVB phase modulation
« Reply #9 on: February 11, 2021, 07:19:25 am »
Hello guys!

Here is a demo of a 2 PSK (BPSK) discrete demodulator, I'm not with the schematic here in this pc, but I can share later if it helps

 
The following users thanked this post: jmw

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16607
  • Country: us
  • DavidH
Re: Decoding WWVB phase modulation
« Reply #10 on: February 11, 2021, 01:40:43 pm »
The circuit you are looking for is called a Costas loop and is relatively easy to implement in hardware.  It is also used for synchronous AM detection so you can recover the amplitude information at the same time without interference from the phase modulation.

https://en.wikipedia.org/wiki/Costas_loop
 
The following users thanked this post: jmw

Offline ZigmundRat

  • Regular Contributor
  • *
  • Posts: 125
  • Country: us
Re: Decoding WWVB phase modulation
« Reply #11 on: February 17, 2021, 08:01:42 pm »
In the years since the BPSK was introduced to WWVB, I have yet to see a completed, functional, and reproducible BPSK clock and/or carrier recovery project. Plenty of times I've seen 'just do this' - but I've not seen anyone actually do it. It's also one thing to do it with a clean 60khz signal from a generator, but it's another to do it in the presence of all the noise on the WWVB carrier. I'm very interested to see if anyone actually makes progress on this.  :popcorn:
 

Offline octillion

  • Contributor
  • Posts: 37
  • Country: us
Re: Decoding WWVB phase modulation
« Reply #12 on: February 18, 2021, 04:30:47 am »
The only readily available WWVB-BPSK decoder I know of is the EverSet ES100.  http://everset-tech.com/receivers/

I purchased the Universal-Solder application development kit a few months ago, and can verify it is fully functional.  After assembling and first power-on, it picked up the correct time in under 2 minutes in New York in the afternoon (signal propagation is best late at night).  In other power-ons it has taken a few minutes to pick up the time.  This is in my basement with stock antennas, and no attempt at optimizing location.
https://www.universal-solder.ca/product/canaduino-application-development-kit-with-everset-es100-mod-wwvb-bpsk-atomic-clock-receiver-module/
 
The following users thanked this post: edavid, seamusdemora

Offline ZigmundRat

  • Regular Contributor
  • *
  • Posts: 125
  • Country: us
Re: Decoding WWVB phase modulation
« Reply #13 on: February 18, 2021, 02:17:38 pm »
By all accounts the Everset chips do their job pretty well. As a simple upgrade to consumer wall/desk clocks they are fine. However the accuracy of the Everset output is actually pretty poor, and there is no way to accomplish carrier recovery. So the problem remains. The closest I have seen is the “A Frequency Standard For Today’s WWVB” by John Magliacane, KD2BD. (http://www.arrl.org/files/file/QEX_Next_Issue/2015/Nov-Dec_2015/Magliacane.pdf] [url]http://www.arrl.org/files/file/QEX_Next_Issue/2015/Nov-Dec_2015/Magliacane.pdf[/url]). Unfortunately this doesn’t provide a restored 60khz signal.

I’d like to see a real implementation of the Costas loop (which would yield both timecode and recovered carrier). A bonus would be seeing both digital and analog implementations. It seems that with the abilities of the faster Teensy processors or PSoC a 60khz digital Costas loop should be quite possible, but I don’t know enough to even begin such a project.   
 

Offline gnuarm

  • Super Contributor
  • ***
  • Posts: 2218
  • Country: pr
Re: Decoding WWVB phase modulation
« Reply #14 on: February 18, 2021, 11:20:22 pm »
By all accounts the Everset chips do their job pretty well.

Everset is the company that apparently worked with NIST to assure a receiver would be commercialized and has patents on much of the receiver technology implemented in chips.  That's probably why you don't see anyone else making them... that and the fact that the people making the clocks don't care.  I doubt very many consumers would pay $5 or $10 more for an "atomic" clock that is really only a benefit to a relatively few on the east coast. 

To appear in more serious equipment the chip is competing against an MCU implementation and has to be cheaper, lower power or cost less than a programmed MCU.  I'm not sure the Everset chip is any of those things.  The documents on their web site seem to show a very basic receiver really, but they may only be marketing materials.  One of the docs shows their chip as simply being an MCU!
Rick C.  --  Puerto Rico is not a country... It's part of the USA
  - Get 1,000 miles of free Supercharging
  - Tesla referral code - https://ts.la/richard11209
 

Offline rcbuck

  • Frequent Contributor
  • **
  • Posts: 346
  • Country: us
Re: Decoding WWVB phase modulation
« Reply #15 on: February 19, 2021, 12:03:28 am »
La Crosse Technology has had a wall clock (1235UA) out for several yeats that decodes the phase modulation. They sell it for $76 but I have seen it on sale for $40 at Lowes big box store a couple of times. There is even a tear down of the clock here:

http://leapsecond.com/pages/ultratomic/

Quote
Still, if you are trying to get the most accurate timing possible and you are not close enough to the transmitter to receive a good signal when the amplitude is low....
You don't need to detect the signal when it is low. You use the low (or no) signal to determine the beginning of each second. Using either the old st\yle AM decoding or new style PM decoding you would be able to get within 50-100 milliseconds of the corect time. That is good enough for any consumer clock.

The QEX article that is referenced does actually provide a series of 1s and 0s at a TTL level that corresponds to the phase of the WWVB signal. But that requires duplicating the parts of his design that does that. That is roughly 12 ICs and about 30 resistors and 30 capacitors.

I have had email correspondence with John and am actually thinking about duplicating the parts of the circuit to extract the phase modulation. He doesn't extract the original 60 kHz signal but does have a 10 MHz output that is locked to the WWVB signal. The 10 MHz oscillator generates 7 other outputs using 74HC390 dividers.  The 10 MHz signal does not have the phase reversal present. That was the purpose of the article - eliminate the phase reversal so the WWVB signal could be used for Frequency measurement purposes. The unit's purpose wasn't built to decode the time but it does so using the old AM modulation process.

Quote
I doubt very many consumers would pay $5 or $10 more for an "atomic" clock that is really only a benefit to a relatively few on the east coast.
No, but government buildings, schools, medical centers, and other operations with dozens of wall clocks would. It is far less costly than paying someone to go around and set the clocks once per week. And it means the clock can be moved without having to call someone in relocate the wiring if the clocks are linked together over a PPOE connection. The medical center I go to has several of the "Atomic" clocks hanging on the wall. You can clearly see the little radio tower emblem on the face of the clocks.
 

Offline gnuarm

  • Super Contributor
  • ***
  • Posts: 2218
  • Country: pr
Re: Decoding WWVB phase modulation
« Reply #16 on: February 19, 2021, 12:45:27 am »
La Crosse Technology has had a wall clock (1235UA) out for several yeats that decodes the phase modulation. They sell it for $76 but I have seen it on sale for $40 at Lowes big box store a couple of times. There is even a tear down of the clock here:

http://leapsecond.com/pages/ultratomic/


Yes, this is even more expensive than I expected.  I've bought RC clocks for $25 regular price. 

Quote
Quote
I doubt very many consumers would pay $5 or $10 more for an "atomic" clock that is really only a benefit to a relatively few on the east coast.
No, but government buildings, schools, medical centers, and other operations with dozens of wall clocks would. It is far less costly than paying someone to go around and set the clocks once per week. And it means the clock can be moved without having to call someone in relocate the wiring if the clocks are linked together over a PPOE connection. The medical center I go to has several of the "Atomic" clocks hanging on the wall. You can clearly see the little radio tower emblem on the face of the clocks.

Sure lots of places like RCCs.  But relatively few find they can't live with the $25 versions.  I don't know what you are talking about setting clocks every week.  My non-RCC clocks are only adjusted twice a year when the time changes.  The improvements from adding the phase modulation are largely unrealized because of a general lack of need in most areas and few adopters in the rest of the country where it might be of benefit. 

I am near DC, so in a poor reception area.  Yet it works just fine nearly every night.  NIST has coverage maps for 100 uV/m, the approximate threshold for amplitude demodulation.  I wonder if they have been calculated at an appropriate threshold for a phase modulated signal? 

Wow!  70 kW ERP!  I wonder how far that can be received in space?  It's "aimed" more along the surface of the earth, but that's got to be receivable at some considerable distance. 
Rick C.  --  Puerto Rico is not a country... It's part of the USA
  - Get 1,000 miles of free Supercharging
  - Tesla referral code - https://ts.la/richard11209
 

Offline rcbuck

  • Frequent Contributor
  • **
  • Posts: 346
  • Country: us
Re: Decoding WWVB phase modulation
« Reply #17 on: February 19, 2021, 01:58:45 am »
Quote
I don't know what you are talking about setting clocks every week.
I guess it depends on the clock, how accurate they are, and how accurate you want the clocks to be. I think all the RC clocks I see are the old AM based ones.

I've got 6 clocks in my house. One of them loses over a minute per month. Three of them lose or gain less than a minute every 6 months. My RC wrist watch and home built GPS clock are never wrong. I'm in Phoenix so we don't change time. But if I did live in a DST place the wrist watch has the feature built in to handle that automatically. WWVB transmits the information and the watch software extracts it. I had to turn DST off to keep it from changing.

My family lives in North GA and when I go back for a visit the RC wrist watch picks up WWVB every night. It has an icon that tells if the reception was successful or not at the 2 AM hour. I think the problem people have in the upper NE part of the country is with interference from the MSF signal in the UK since it is also on 60 kHz.
 

Offline gnuarm

  • Super Contributor
  • ***
  • Posts: 2218
  • Country: pr
Re: Decoding WWVB phase modulation
« Reply #18 on: February 19, 2021, 02:52:22 am »
That's my point about the phase modulation and the market.  Very few people need this to begin with.  Those people probably aren't going to pay much for the benefit. 

I was looking at this one time, how to aim an antenna.  I found WWVB is nearly 270° from my place near Wash DC.  Anthorn in the UK is 45° from my place, much more north than I would have expected, but that's great circles for you.
Rick C.  --  Puerto Rico is not a country... It's part of the USA
  - Get 1,000 miles of free Supercharging
  - Tesla referral code - https://ts.la/richard11209
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16607
  • Country: us
  • DavidH
Re: Decoding WWVB phase modulation
« Reply #19 on: February 19, 2021, 10:10:14 pm »
Everset is the company that apparently worked with NIST to assure a receiver would be commercialized and has patents on much of the receiver technology implemented in chips.  That's probably why you don't see anyone else making them... that and the fact that the people making the clocks don't care.  I doubt very many consumers would pay $5 or $10 more for an "atomic" clock that is really only a benefit to a relatively few on the east coast.

My understanding from when the change happened is that nobody wanted to risk Everset's patent wrath.

That's my point about the phase modulation and the market.  Very few people need this to begin with.  Those people probably aren't going to pay much for the benefit.

The people who might need it are the ones whose clocks stopped working properly because of the modulation changes.
 

Offline gnuarm

  • Super Contributor
  • ***
  • Posts: 2218
  • Country: pr
Re: Decoding WWVB phase modulation
« Reply #20 on: February 19, 2021, 10:22:40 pm »
Everset is the company that apparently worked with NIST to assure a receiver would be commercialized and has patents on much of the receiver technology implemented in chips.  That's probably why you don't see anyone else making them... that and the fact that the people making the clocks don't care.  I doubt very many consumers would pay $5 or $10 more for an "atomic" clock that is really only a benefit to a relatively few on the east coast.

My understanding from when the change happened is that nobody wanted to risk Everset's patent wrath.

That's my point about the phase modulation and the market.  Very few people need this to begin with.  Those people probably aren't going to pay much for the benefit.

The people who might need it are the ones whose clocks stopped working properly because of the modulation changes.

My understanding is the only units that stopped working are the ones that locked to the signal phase... in other words, the fancy, expensive ones.  lol 

I think there is a mitigation where the phase modulation is turned off periodically to allow such units to sync up. 
Rick C.  --  Puerto Rico is not a country... It's part of the USA
  - Get 1,000 miles of free Supercharging
  - Tesla referral code - https://ts.la/richard11209
 

Offline rcbuck

  • Frequent Contributor
  • **
  • Posts: 346
  • Country: us
Re: Decoding WWVB phase modulation
« Reply #21 on: February 20, 2021, 03:15:10 am »
Quote
My understanding from when the change happened is that nobody wanted to risk Everset's patent wrath.
I doubt that is the reason. BPSK has been around for a long time. Maybe they could patent their one chip solution (which I think is what they did) but patent the decoding scheme would not hold up. The decoding method for BPSK has been around since it was invented. It is probably as gnuarm says "Why bother with the extra cost of phase demodulation when AM demodulation works virtually everywhere."

Quote
I think there is a mitigation where the phase modulation is turned off periodically to allow such units to sync up.
From https://en.wikipedia.org/wiki/WWVB :
To allow users of phase tracking receivers time to adjust, the phase-modulated time code was initially omitted twice daily for 30 minutes, beginning at noon and midnight Mountain Standard time (07:00 and 19:00 UTC). This provided enough opportunity for a receiver to lock on to the WWVB carrier phase. This allowance was removed as of March 21, 2013.

I don't know how difficult it would be to use a micro such as an STM32 or PIC to decode the BPSK. It must not be easy or someone would have already published an article on how to do it. There is an article online that describes building a DCF77 receiver to decode the phase changes using a dsPIC33.
http://www.marvellconsultants.com/DCF/
 

Offline seamusdemora

  • Regular Contributor
  • *
  • Posts: 54
  • Country: us
Re: Decoding WWVB phase modulation
« Reply #22 on: January 30, 2023, 07:52:38 am »
Hoping to resurrect this thread as there's a lot of good information here.

Anyway - I've become interested in building a SDR for WWVB. At this point, as long as I can still get a useful signal, I'm not particularly keen on phase modulation. I'm leaning more toward low, low cost receiver. I recently saw a post somewhere that led me to this GitHub repo for PiccoloSDR where the author has apparently developed code to use the ADC on a Raspberry Pi Pico to implement a direct-sampling receiver.

First question: Opinions on the viability of this as a WWVB receiver??
The trouble with the world is that the stupid are cocksure, and the intelligent are full of doubt.
~ Bertrand Russell
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16607
  • Country: us
  • DavidH
Re: Decoding WWVB phase modulation
« Reply #23 on: January 30, 2023, 03:57:07 pm »
Quote
My understanding from when the change happened is that nobody wanted to risk Everset's patent wrath.

I doubt that is the reason. BPSK has been around for a long time. Maybe they could patent their one chip solution (which I think is what they did) but patent the decoding scheme would not hold up. The decoding method for BPSK has been around since it was invented.  ...

They would have patented every way they could think of for decoding the WWVB phase modulation as applied to WWVB, just to block other people from doing it, even while they only implemented one way.

The companies selling encrypted pay TV services worked this way to try and keep third party decoders off of the market.

First question: Opinions on the viability of this as a WWVB receiver??

There is no reason that it cannot be done, however the dynamic range requirements are considerable because of noise and interference unless significant filtering is done in the hardware.
« Last Edit: January 30, 2023, 04:03:05 pm by David Hess »
 

Offline seamusdemora

  • Regular Contributor
  • *
  • Posts: 54
  • Country: us
Re: Decoding WWVB phase modulation
« Reply #24 on: January 30, 2023, 11:36:00 pm »
First question: Opinions on the viability of this as a WWVB receiver??

There is no reason that it cannot be done, however the dynamic range requirements are considerable because of noise and interference unless significant filtering is done in the hardware.


Anything more specific than "significant filtering"? I have always assumed that these receivers are fairly simple in design because they are inexpensive. But I've never actually seen a schematic for one of them.
The trouble with the world is that the stupid are cocksure, and the intelligent are full of doubt.
~ Bertrand Russell
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf