WWVB timecode from blue pill

What are you developing?
fredbox
Posts: 211
Joined: Tue Jul 07, 2015 4:44 pm

WWVB timecode from blue pill

Post by fredbox » Mon Mar 11, 2019 10:51 pm

The last couple of months I have worked on a circuit to use a blue pill to create a time signal to set my atomic clocks. Atomic clocks in the US are set from 60 khz time signal that is broadcast from Colorado on 60Khz. That signal is supposed to be fairly strong, but there is enough RF interference that the time signal is rarely received unless I take the clocks outside. My circuit has a short range and successfully set all four of my atomic clocks to Daylight Saving time yesterday. Source code is attached if anyone is interested. Readme.h within the zip file has brief instructions.

Core: fpiSTM official core v1.5.0
Boards: Blue Pill STM32F103 + DS3231 clock module (i tried using the internal RTC but was constantly resetting the time. The DS3231 module has been running for weeks since it was initially set and is still within a second of the actual time.)
Optional: Nokia PCD8544 display

The binary file is just over 40K with SerialUSB enabled. It is about 8K smaller with a USB/Serial dongle connected to UART 1.
Attachments
WWVB_Simulator.zip
(17.75 KiB) Downloaded 11 times

User avatar
ahull
Posts: 2073
Joined: Mon Apr 27, 2015 11:04 pm
Location: Sunny Scotland
Contact:

Re: WWVB timecode from blue pill

Post by ahull » Tue Mar 12, 2019 1:28 am

Neat, I was thinking of doing something like this, but you have saved me a lot of head scratching.

I had a quick look at readme.h

Could you not use a trimmer capacitor on the antenna to get it resonant at the correct frequency, rather than changing the number of coils?
- Andy Hull -

fredbox
Posts: 211
Joined: Tue Jul 07, 2015 4:44 pm

Re: WWVB timecode from blue pill

Post by fredbox » Tue Mar 12, 2019 4:26 am

The capacitor in parallel with my loopstick antenna is 4700pf. Most trimmer caps are < 100pf. The peak at resonance is fairly broad and not too critical.

I wrote a small program to sweep the frequency above and below 60Khz while watching a scope to note the resonant frequency. As long as you get it within a couple of kilohertz it will be close enough and there will be a nice sine wave across the antenna.

Riva
Posts: 59
Joined: Fri May 06, 2016 6:42 am

Re: WWVB timecode from blue pill

Post by Riva » Tue Mar 12, 2019 8:49 am

Slightly off topic as the sketch was for an AVR but I made a similar thing for MSF timecode used in the UK. For the antenna I just used a length or wire attached to the output pin and draping it over the clock is enough to do the job.

User avatar
sheepdoll
Posts: 289
Joined: Fri May 22, 2015 12:58 am
Location: Silicon Valley Vortex
Contact:

Re: WWVB timecode from blue pill

Post by sheepdoll » Tue Mar 12, 2019 8:12 pm

I have an really old WWVB receiver module, I was going to use on a 68HC11 to drive some slave clocks I have.

It sits in a box somewhere. As I recall it has a simple RS232 interface. It was from one of those hobby kits (like propeller or something)

The west coast reception of the signal is not the best. Especially that I live on the northwest side of a range of hills east of San Francisco. (anywhere else these would be called mountains.)

Somewhere I also have the ring charts from when I was collecting clocks. The slave clocks are from my high school (I knew I would be staring at that clock in my english class forever.) These are standard electric AR-3s They take a 24 volt pulse, I think it is one second every minute to advance the ratchet. If there is a power outage a 48V pulse (might be -48V) is sent which releases the counter weights and the hands fall to 6:00 or 6:30. They are then quickly ratcheted to the correct time. Sync pulses can also be sent at the sync hour which will reset the hands.

Somewhere I bought a FET from radio shack. The tricky part was how to release the stepped 48/24v pulses. In the master clocks this was done with cams and relays. I sold the master years ago when I moved. Still have the slave clocks. I rarely run them as they make a loud click every minute when the ratchet pawl is engaged.

User avatar
zoomx
Posts: 835
Joined: Mon Apr 27, 2015 2:28 pm
Location: Mt.Etna, Italy

Re: WWVB timecode from blue pill

Post by zoomx » Wed Mar 13, 2019 8:11 am

I have some radio controlled clock working using DCF77 ( one of then is multistandard) that works at 77,5 kHz.

I too live a bit too far so some of them works perfectly, some others need to be in the north part of my house.

User avatar
ahull
Posts: 2073
Joined: Mon Apr 27, 2015 11:04 pm
Location: Sunny Scotland
Contact:

Re: WWVB timecode from blue pill

Post by ahull » Thu Mar 14, 2019 4:58 pm

I recently acquired an MSF watch. Unsurprisingly it is pretty accurate. ;)

Image

One other project I had considered was converting a really cheap AM radio from fleabay to pick up the MSF signal on 60kHz, and then use the audio output from that to feed a micro-controller.
- Andy Hull -

ag123
Posts: 1322
Joined: Thu Jul 21, 2016 4:24 pm

Re: WWVB timecode from blue pill

Post by ag123 » Thu Mar 14, 2019 7:55 pm

i got too curious after reading about these radio clocks synced to atomic clocks
as it turns out science and electronics advances has come so far today that it goes from this atomic clock
https://www.nist.gov/news-events/news/2 ... -stability
Image

to this atomic clock
https://ieee-uffc.org/download/principl ... ic-clocks/
https://www.microsemi.com/document-port ... user-guide
https://www.digikey.com/catalog/en/part ... -kit/81778
https://www.microsemi.com/product-direc ... clock-csac

atomic clocks you can buy


would anyone want to run your blue pill RTC to
1 in 9,192,631,770 accuracy / precision ?
https://en.wikipedia.org/wiki/Caesium_standard

:lol:
Last edited by ag123 on Fri Mar 15, 2019 5:31 am, edited 1 time in total.

ag123
Posts: 1322
Joined: Thu Jul 21, 2016 4:24 pm

Re: WWVB timecode from blue pill

Post by ag123 » Thu Mar 14, 2019 8:25 pm

the chip scale atomic clock evaluation kit is kind of expensive $928.75
https://www.digikey.com/products/en?mpa ... 000&v=1522
an irony is that it actually cost less than those luxury mechanical watches
:lol:

User avatar
mrburnette
Posts: 3001
Joined: Mon Apr 27, 2015 12:50 pm
Location: Greater Atlanta
Contact:

GPS to 2.4G UDP

Post by mrburnette » Thu Mar 14, 2019 10:58 pm


Post Reply