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

0 Members and 1 Guest are viewing this topic.

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16548
  • Country: us
  • DavidH
Re: Decoding WWVB phase modulation
« Reply #25 on: January 31, 2023, 12:49:44 am »
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 ones I have seen use considerable filtering to prevent noise outside of the channel from overloading the mixer stages, and the same would apply to a direct conversion or SDR design.  The HF bands are very noisy, which is why an RF amplifier to lower the noise figure of the receiver is not necessary.

For an SDR design, at least a preselector should be included.
 
The following users thanked this post: seamusdemora

Offline jpanhalt

  • Super Contributor
  • ***
  • Posts: 3398
  • Country: us
Re: Decoding WWVB phase modulation
« Reply #26 on: January 31, 2023, 03:47:19 am »
Here's a link to one schematic: https://sidstation.loudet.org/hw-en.xhtml  I didn't bother to check whether the kits are still available.  I doubt it. 

The receiver I built basically used just the RF front end (attached).  My antenna was tuned.  It worked with ordinary ferrite core antennas, but I used a larger shielded loop design to get 24-hour reception at my location in Ohio.  If you just want a receiver, you can harvest one from an inexpensive "atomic clock" off ebay.
 
The following users thanked this post: seamusdemora

Offline gnuarm

  • Super Contributor
  • ***
  • Posts: 2218
  • Country: pr
Re: Decoding WWVB phase modulation
« Reply #27 on: January 31, 2023, 04:14:21 pm »
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??

As long as you are only asking for opinions, and not facts...

I have mind designed a direct conversion WWVB receiver for some time now.  I would sample with a 1 bit ADC at 240 kHz.  The input signal can be mixed with an LO that consists of the pattern 0, 1, 0, -1 without multiplies.  Every other sample can be used as the I and Q signals, giving phase.  The amplitude can be approximated by adding the I and Q signals. 

For this to work, the sampling rate has to be pretty close to 240 kHz.  A VCO can be used by initially syncing it to a reference like a 32,768 kHz crystal (I was trying to keep the design minimal power).  240 kHz crystals exist, but are hard to find.  The phase samples should be averaged over 50 ms periods to extract the signal phase.  An offset to the VCO can be measured and subtracted out.  The VCO should be adjusted to minimize the phase drift.  I was going to use a set of binary valued capacitors to trim the VCO.  Or, if you can still find them, a varactor would do the job (tuning diode).  I think LEDs might make adequate tuning diodes.  The DC value on the diode can be adjusted using a 1 bit DAC (sigma delta). 

This is not terribly complex, but the devil is in the details.  I don't know how hard it will be to keep the 240 kHz oscillator stable.  It has to remain stable for ~100 ms, enough so that you can compare adjacent block phase and trim the oscillator frequency to suit. 

I almost forgot... the reason a 1 bit ADC will work, is because the oversampling creates a pretty good low pass filter.  At 240 kHz, a 50 ms window has 12,000 samples being averaged.  I seem to recall the number 6,000 samples in the average, so maybe I was looking at 25 ms windows.  It's a trade off between the processing gain (more samples) and timing resolution for signal changes (fewer samples).

I may have mucked up some details.  I think I looked at this maybe 20 years ago. lol  I was going to do it all in a low power FPGA.  SiliconBlue had a family with low double digit static power numbers.  Processing at these low rates would not create much dynamic current, so it could have run from a AA battery.  Lattice bought SiBlue and when the new 45 nm chip came out, it was more like 100 uA static current. 

I should still do this.  It would make for a radio controlled clock that could be powered by scavenged energy. 
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
 
The following users thanked this post: seamusdemora

Offline gnuarm

  • Super Contributor
  • ***
  • Posts: 2218
  • Country: pr
Re: Decoding WWVB phase modulation
« Reply #28 on: January 31, 2023, 04:25:23 pm »
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.

They generally get all needed selectivity from a 60kHz tuned ferrite rod antenna.

If you use a more broadband antenna you would need to add an LC bandpass or lowpass filter.

There aren't any significant noise sources until you get to the AM band at 540kHz.

There's a reason clocks adjust themselves at night.  Many noise generators are not running.  Noise sources in this band are everywhere today.  Switching power supplies often run at around 60 kHz.  Even if they are running at 100 or 200 kHz, that's not far enough away from 60 kHz to be effectively filtered out when they are 100 dB stronger than your signal.

The ferrite loopstick is essential.  It will need to be tuned with a fixed film capacitor and a variable cap.  Depending on where you are, the WWVB signal can be rather marginal.  You need all the help you can get in getting rid of the noise.  A tuned circuit also boosts the gain, if your input is high enough impedance. 

Or... you can go with a long wire antenna.  A quarter wave length is 1,250 meters.  lol

Actually, that could be coiled up, no?  It's still a lot of wire though. 
« Last Edit: January 31, 2023, 04:30:54 pm by gnuarm »
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
 
The following users thanked this post: seamusdemora

Offline jpanhalt

  • Super Contributor
  • ***
  • Posts: 3398
  • Country: us
Re: Decoding WWVB phase modulation
« Reply #29 on: January 31, 2023, 04:48:23 pm »
My shielded loop antenna was built as described here w/ minor modifications: https://www.febo.com/time-freq/wwvb/antenna/

Pictures attached.  Initial tuning was done with a large aircore capacitor then switched to mica caps for the final design.  As mentioned, I got pretty much 24-hour reception in Cleveland, OH; whereas, the ferrite cores only gave night reception.
 
The following users thanked this post: edavid, seamusdemora

Offline KE5FX

  • Super Contributor
  • ***
  • Posts: 1878
  • Country: us
    • KE5FX.COM
Re: Decoding WWVB phase modulation
« Reply #30 on: January 31, 2023, 06:06:07 pm »
Pictures attached.  Initial tuning was done with a large aircore capacitor then switched to mica caps for the final design.  As mentioned, I got pretty much 24-hour reception in Cleveland, OH; whereas, the ferrite cores only gave night reception.

Interesting.  I wonder what the rationale behind the antenna coupling is.  Not having played with large magnetic loop antennas before, what's the advantage to the single-turn secondary winding around the loop, assuming that the JFET input stage is located at the antenna? 

Would the performance be worse somehow if you simply tied the gate of Q1 directly to the hot end of C1/L1?  It's not as if you're going for grid-leak detection here, right?

I suppose peak voltage might be a concern, in environments where LF fields are strong enough to damage the FET.  But  that could be handled with a voltage divider, again with seemingly-equivalent results to the step-down effect from the one-turn secondary winding.
 

Offline gnuarm

  • Super Contributor
  • ***
  • Posts: 2218
  • Country: pr
Re: Decoding WWVB phase modulation
« Reply #31 on: January 31, 2023, 06:55:14 pm »
I may have mucked up some details.  I think I looked at this maybe 20 years ago. lol  I was going to do it all in a low power FPGA.  SiliconBlue had a family with low double digit static power numbers.  Processing at these low rates would not create much dynamic current, so it could have run from a AA battery.  Lattice bought SiBlue and when the new 45 nm chip came out, it was more like 100 uA static current. 

I should still do this.  It would make for a radio controlled clock that could be powered by scavenged energy.

The iCE40s can run at 25-100 microwatts if you go off the 10 kHz internal oscillator. But seeing as you're in Puerto Rico, if we go off the inverse square law, you'd need either a 5 cm aperture (going off 1/r) or a 205 square meter aperture (going off 1/r^2) to run at 100% duty cycle. Probably a lot easier to scavenge power from other bands like WiFi, LTE, AM/FM terrestrial radio, etc.

Not sure how you came up with the power number you did.  They may have some very tiny parts in some of the newer iCE40 lines, but the static current is the limit of power.  I don't have the time to dig out the data sheets at the moment, but I'm pretty sure the spec was near 100 uA for most of their parts.  I don't know if this design would fit in 256 LUTs.

Even so, I wasn't planning to use RF power.  I was going to use temperature fluctuations or maybe solar cells.  The trouble is the messy circuits required to capture power from low power and intermittent sources.  That's a field of it's own.
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 mark03

  • Frequent Contributor
  • **
  • Posts: 708
  • Country: us
Re: Decoding WWVB phase modulation
« Reply #32 on: January 31, 2023, 09:45:56 pm »
Pictures attached.  Initial tuning was done with a large aircore capacitor then switched to mica caps for the final design.  As mentioned, I got pretty much 24-hour reception in Cleveland, OH; whereas, the ferrite cores only gave night reception.

Interesting.  I wonder what the rationale behind the antenna coupling is.  Not having played with large magnetic loop antennas before, what's the advantage to the single-turn secondary winding around the loop, assuming that the JFET input stage is located at the antenna?

I'd also like to understand the design principles behind this.

In addition, I'm wondering how much selectivity this provides without further filtering.  If you connect a scope directly, can you see the WWVB signal?  I tried a multi-turn loop using ribbon cable, a plastic variable capacitor to resonate, and an instrumentation amp (no transformer).  I could see a signal near 60 kHz, but nothing exactly on frequency.

I'm in the odd position of thinking the DSP stuff to decode the phase modulation would be fairly easy (or at least fun), whereas the analog aspects of actually getting a signal to the A/D are what stumps me...
 

Offline seamusdemora

  • Regular Contributor
  • *
  • Posts: 54
  • Country: us
Re: Decoding WWVB phase modulation
« Reply #33 on: January 31, 2023, 11:21:02 pm »

I have mind designed a direct conversion WWVB receiver for some time now.  I would sample with a 1 bit ADC at 240 kHz.  The input signal can be mixed with an LO that consists of the pattern 0, 1, 0, -1 without multiplies.  Every other sample can be used as the I and Q signals, giving phase.  The amplitude can be approximated by adding the I and Q signals. 

For this to work, the sampling rate has to be pretty close to 240 kHz.  A VCO can be used by initially syncing it to a reference like a 32,768 kHz crystal (I was trying to keep the design minimal power).  240 kHz crystals exist, but are hard to find.  The phase samples should be averaged over 50 ms periods to extract the signal phase.  An offset to the VCO can be measured and subtracted out.  The VCO should be adjusted to minimize the phase drift.  I was going to use a set of binary valued capacitors to trim the VCO.  Or, if you can still find them, a varactor would do the job (tuning diode).  I think LEDs might make adequate tuning diodes.  The DC value on the diode can be adjusted using a 1 bit DAC (sigma delta). 

<<snip>>

I should still do this.  It would make for a radio controlled clock that could be powered by scavenged energy.

I agree 100%... you should still definitely do this!  :-+

Some notes:

Note I (FWIW): I'm not particularly interested in the scavenged power aspect; batteries work fine for my intended usage.

Note II: I found this repo on GitHub wherein the author has some working code to implement a SDR using the ADC on a Raspberry Pi Pico:
(https://github.com/luigifcruz/pico-stuff/tree/main/apps/piccolosdr)
This seems a good start to me... Pico chips are available for US$1.00; an entire board for US$4.00; at 500 ksps max, the onboard ADC easily covers your proposed sampling rate.

Note III (Question): RE Varactors - They still seem to be available from several sources, and through distribution. Also, would it make any sense to use a PLL to set the bias on the varactor so that the antenna stays tuned at precisely 60kHz?
The trouble with the world is that the stupid are cocksure, and the intelligent are full of doubt.
~ Bertrand Russell
 

Offline seamusdemora

  • Regular Contributor
  • *
  • Posts: 54
  • Country: us
Re: Decoding WWVB phase modulation
« Reply #34 on: January 31, 2023, 11:45:53 pm »
Millions of cheap WWVB clocks show that you don't need active tuning of the antenna.


But two of them I've owned suggest you need something more... They work for a while, and then they don't, they work in one location, but not another. My expectations were that the signal was only available in the late PM or early AM, but even that was wishful thinking in my experience. If not a tuned antenna, what's your opinion on how best to improve reception?
The trouble with the world is that the stupid are cocksure, and the intelligent are full of doubt.
~ Bertrand Russell
 

Offline seamusdemora

  • Regular Contributor
  • *
  • Posts: 54
  • Country: us
Re: Decoding WWVB phase modulation
« Reply #35 on: February 01, 2023, 04:25:57 am »
Of course you need a tuned antenna, just not actively tuned.  By all means use a trim cap to get it on frequency.

To improve reception, use a physically larger antenna, point it in the right direction, and possibly add an RF amp.

Well, it's a very narrow-band signal, and as you know the S/N is not great. A larger antenna (larger than this ferrite core antenna) will likely be impractical in the application that I have in mind, and an rf amp will amplify both noise and signal AFAIK. What am I missing in your suggestion?

The trouble with the world is that the stupid are cocksure, and the intelligent are full of doubt.
~ Bertrand Russell
 

Offline seamusdemora

  • Regular Contributor
  • *
  • Posts: 54
  • Country: us
Re: Decoding WWVB phase modulation
« Reply #36 on: February 01, 2023, 04:28:51 am »
the missing antenna picture (?? I hope)
The trouble with the world is that the stupid are cocksure, and the intelligent are full of doubt.
~ Bertrand Russell
 

Offline seamusdemora

  • Regular Contributor
  • *
  • Posts: 54
  • Country: us
Re: Decoding WWVB phase modulation
« Reply #37 on: February 01, 2023, 07:58:44 pm »
You said that you wanted to build a receiver, and that's how you would go about it.  Now it seems like you've decided to build a clock, with some specific constraints you haven't mentioned, so I don't know if what you want is even possible  :-//


I haven't changed my mind, but you apparently made an assumption. Wrt constraints, and being possible, it seems to be possible as there are many clocks - even wrist watches - available. I replied to your post hoping to get some clarification on your recommendations, but it seems to have come across to you as something else. My apologies then - no offense was intended.
The trouble with the world is that the stupid are cocksure, and the intelligent are full of doubt.
~ Bertrand Russell
 

Offline jmwTopic starter

  • Frequent Contributor
  • **
  • Posts: 284
  • Country: us
Re: Decoding WWVB phase modulation
« Reply #38 on: February 02, 2023, 04:21:55 am »
To get an idea of the noise you'll see in a direct sampling receiver, here is WWVB sampled at 192 kHz on a PC. Hardware is a tuned loopstick antenna and my preamp (https://eevblog.com/forum/rf-microwave/wwvb-preamp-help/ with some changes as suggested in the thread) that was wired to a 3.5 mm phono plug.

For a long time I thought the preamp didn't work at all, and then I tried starting the recording at various times and I got this a little after midnight. This is a screenshot in Audacity, the light purple is the RMS amplitude, and there's only about 3 dB difference between the peak and trough levels. Quite a bit worse than the advertised 17 dB difference in transmission levels. The duration of the dips are pretty consistent at .2 and .5 s as expected from the code. Some nights I'd get a clear signal like this for a good hour or so, and then it would disappear, and some nights get nothing at all.

I tried putting the recording into a GNU radio workflow for BPSK demodulation and never got anything meaningful out, but I guess others on this thread say it requires sampling at least 4x the frequency (is this result documented somewhere like the Nyquist theorem?) and my PC tops out at 192 kHz.


 
The following users thanked this post: seamusdemora

Offline gnuarm

  • Super Contributor
  • ***
  • Posts: 2218
  • Country: pr
Re: Decoding WWVB phase modulation
« Reply #39 on: February 02, 2023, 06:46:32 am »

I have mind designed a direct conversion WWVB receiver for some time now.  I would sample with a 1 bit ADC at 240 kHz.  The input signal can be mixed with an LO that consists of the pattern 0, 1, 0, -1 without multiplies.  Every other sample can be used as the I and Q signals, giving phase.  The amplitude can be approximated by adding the I and Q signals. 

For this to work, the sampling rate has to be pretty close to 240 kHz.  A VCO can be used by initially syncing it to a reference like a 32,768 kHz crystal (I was trying to keep the design minimal power).  240 kHz crystals exist, but are hard to find.  The phase samples should be averaged over 50 ms periods to extract the signal phase.  An offset to the VCO can be measured and subtracted out.  The VCO should be adjusted to minimize the phase drift.  I was going to use a set of binary valued capacitors to trim the VCO.  Or, if you can still find them, a varactor would do the job (tuning diode).  I think LEDs might make adequate tuning diodes.  The DC value on the diode can be adjusted using a 1 bit DAC (sigma delta). 

<<snip>>

I should still do this.  It would make for a radio controlled clock that could be powered by scavenged energy.

I agree 100%... you should still definitely do this!  :-+

At the moment, I have a sizable contract in negotiation.  If I get that, I'll be pretty busy for at least 6 months, maybe 9 months.


Quote
Some notes:

Note I (FWIW): I'm not particularly interested in the scavenged power aspect; batteries work fine for my intended usage.

Note II: I found this repo on GitHub wherein the author has some working code to implement a SDR using the ADC on a Raspberry Pi Pico:
(https://github.com/luigifcruz/pico-stuff/tree/main/apps/piccolosdr)
This seems a good start to me... Pico chips are available for US$1.00; an entire board for US$4.00; at 500 ksps max, the onboard ADC easily covers your proposed sampling rate.

I'm a minimalist at heart, so I have a lot of interest in finding ways to do this using as little as possible.  The synchronous sampling at 4x the carrier frequency automatically down converts to DC.  The trick is to keep the sample rate stable and synchronous.


Quote
Note III (Question): RE Varactors - They still seem to be available from several sources, and through distribution. Also, would it make any sense to use a PLL to set the bias on the varactor so that the antenna stays tuned at precisely 60kHz?

I don't think it is important to tune the antenna in real time.  You can tune it on the bench, and it should remain pretty stable.  My idea is to tune the local VCO for the LO to be mixed with the incoming signal.  That will drift and needs to be updated in real time. If you run from a crystal, you still get some tens or even hundreds of ppm error, unless you go to lengths to stabilize them.  I can't remember off the top of my head how stable it needs to be, but maybe 200 ppm is not a problem.  I didn't want to use a fast crystal oscillator because it sucks down power.  32.768 kHz can be pretty light. That can be compared to 240 kHz at 128 Hz. 
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
 
The following users thanked this post: seamusdemora

Offline gnuarm

  • Super Contributor
  • ***
  • Posts: 2218
  • Country: pr
Re: Decoding WWVB phase modulation
« Reply #40 on: February 02, 2023, 06:52:42 am »
Millions of cheap WWVB clocks show that you don't need active tuning of the antenna.


But two of them I've owned suggest you need something more... They work for a while, and then they don't, they work in one location, but not another. My expectations were that the signal was only available in the late PM or early AM, but even that was wishful thinking in my experience. If not a tuned antenna, what's your opinion on how best to improve reception?

Tuned antenna, yes.  Just not real time adjustment of the tuning.  Unless your set up see extremes of temperatures, you won't have issues with the antenna tuning.  It's sharp, but not that sharp.

I know ham sets can have issues with tuned "magnetic" loops, where the bandwidth of the loop is more narrow than the voice signal being received!  Still, that's 4 kHz and you only need some tens of Hz.  The signal changes on 100 ms boundaries, with a minimum pulse spacing of 200 ms.  So 40 or 50 Hz bandwidth should be plenty.  I think you'll have a hard time getting your loop stick or even a large loop that narrow.  So if it drifts, you will still be in the tuning range.
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
 
The following users thanked this post: seamusdemora

Offline gnuarm

  • Super Contributor
  • ***
  • Posts: 2218
  • Country: pr
Re: Decoding WWVB phase modulation
« Reply #41 on: February 02, 2023, 07:03:13 am »
No one is challenging Nyquist.  I use 4x because that can be worked to give me I and Q to get phase (essentially Fs = 2 x BW for two signals).  The sampling at 2x trick only works if you are doing direct conversion, because it automatically down converts to DC.

In theory, you can demodulate the phase at a lower SNR than you can distinguish the amplitude changes.  That's why they added the phase modulation.  Then someone they were working with patented a receiver design.  No one (or very few) has produced a chip to demodulate the phase.  If you consider the market for most of these clocks, if the chip costs $0.50 more, it won't get used.  It's a bit like the Beta vs. VHS issue, Beta was better, but not demonstrably so.  How would you market the clock with the slightly better receiver? 
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
 
The following users thanked this post: seamusdemora

Offline jpanhalt

  • Super Contributor
  • ***
  • Posts: 3398
  • Country: us
Re: Decoding WWVB phase modulation
« Reply #42 on: February 02, 2023, 11:19:05 am »
@jmw (post#40)
Attached are images of what my analog signal looked like.  That was easily cleaned up easily with a PIC12F683/12F1840.

Unfortunately, I "finished" that project in 2014, and it is now buried in other papers.  Where in the US are you?
Edit: Corrected year
« Last Edit: February 02, 2023, 11:23:04 am by jpanhalt »
 
The following users thanked this post: seamusdemora

Offline jmwTopic starter

  • Frequent Contributor
  • **
  • Posts: 284
  • Country: us
Re: Decoding WWVB phase modulation
« Reply #43 on: February 02, 2023, 03:29:51 pm »
Central San Francisco, so there are probably lots of noise sources nearby at all times. I also have one of the Everset ES100 kits, and it is often able to get the time in the middle of the day, so the BPSK signal is definitely more robust than the AM signal.
 
The following users thanked this post: seamusdemora

Offline gnuarm

  • Super Contributor
  • ***
  • Posts: 2218
  • Country: pr
Re: Decoding WWVB phase modulation
« Reply #44 on: November 26, 2023, 10:18:01 pm »
Central San Francisco, so there are probably lots of noise sources nearby at all times. I also have one of the Everset ES100 kits, and it is often able to get the time in the middle of the day, so the BPSK signal is definitely more robust than the AM signal.

San Francisco is also relatively close to the WWVB transmitter, so easier to decode than much of the US, such as the east coast.   
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
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf