Author Topic: Yet another DIY GPSDO - yes, another one  (Read 150384 times)

jozefch and 1 Guest are viewing this topic.

Offline bob91343

  • Super Contributor
  • ***
  • Posts: 2675
  • Country: us
 

Offline bob91343

  • Super Contributor
  • ***
  • Posts: 2675
  • Country: us
Re: Yet another DIY GPSDO - yes, another one
« Reply #251 on: September 18, 2021, 11:39:32 pm »
Wonder of wonders!  The black pill finally arrived!  Packaging was messed up but the part seems intact.  It took three months and finally it's here.

Assuming it's functional, what do I do next?
 
The following users thanked this post: MIS42N

Offline AndrewBCNTopic starter

  • Frequent Contributor
  • **
  • Posts: 571
  • Country: fr
Re: Yet another DIY GPSDO - yes, another one
« Reply #252 on: September 19, 2021, 04:21:09 am »
Wonder of wonders!  The black pill finally arrived!  Packaging was messed up but the part seems intact.  It took three months and finally it's here.

Assuming it's functional, what do I do next?
Bob,
1. Solder the two 20-pin headers that came in the same anti-static pouch as the Black Pill and insert the Black Pill at the edge of a breadboard, as shown in one of my latest posts. Then please take pictures of your setup and the parts you have available, and post them here. Be careful with this step because if you mess up the soldering, you'll destroy the Black Pill. Note: don't solder the 4-pin header for the SWD interface, only the two 20-pin headers along the sides of the Black Pill.
2. Install the Arduino IDE on your computer, install the STM32 package, and post a screenshot here. If your PC is running Windows (any version) I can't help you with this installation, so you'll need help from somebody else.
3. Make sure you have a USB C cable, connect it to the STM32, download the "blink" example from your PC to your Black Pill, and post a screenshot here.
4. Wire the GPS module on the breadboard and post a screenshot here. That involves 4 wires but they have to be correctly setup, otherwise you could destroy your GPS module and/or the Black Pill.
5. Test the GPS module with the example code that I will post here for you, once we have confirmed steps 1, 2, 3 and 4 above.

After step 5 we'll be around 50% done. Let's see how long that takes.

« Last Edit: September 19, 2021, 03:47:20 pm by AndrewBCN »
 

Offline bob91343

  • Super Contributor
  • ***
  • Posts: 2675
  • Country: us
Re: Yet another DIY GPSDO - yes, another one
« Reply #253 on: September 19, 2021, 05:31:51 am »
Thanks Andrew!  That is quite a procedure and I gave a big gulp upon reading it.  However I will try to follow the instructions, but not tonight.  I put all the parts in a little box so I don't misplace any (I am good at that!).  It has been suggested to me not to solder all the pins of the headers, but just the ones in use, to make life easier should replacement be necessary.
 

Offline AndrewBCNTopic starter

  • Frequent Contributor
  • **
  • Posts: 571
  • Country: fr
Re: Yet another DIY GPSDO - yes, another one
« Reply #254 on: September 19, 2021, 07:53:54 am »
Ah yes, one last thing I just thought of: hide all the parts for this project from your cats, specially the one you suspect stole one of your crystals!  :o

Seriously, I was going to suggest you get somebody to help you with the soldering part, and to double check with me here before you heat up your soldering iron. This soldering step is critical and the MCU board can easily be ruined with bad soldering.

For the soldering iron: use the thinnest tip you have, a blunt tip will just ruin the soldering job here, and you would need to order another Black Pill and possibly wait another 3 months to get it. If you use the same mains-connected 100W soldering iron you use to solder wires around the house, you'll most certainly destroy your Black Pill sample.
« Last Edit: September 19, 2021, 09:30:49 am by AndrewBCN »
 

Offline bob91343

  • Super Contributor
  • ***
  • Posts: 2675
  • Country: us
Re: Yet another DIY GPSDO - yes, another one
« Reply #255 on: September 19, 2021, 06:24:57 pm »
I never lost a crystal due to a cat.  However I am still looking for a nail file and a nanoVNA stylus that is probably in the hidden stash of one of the cats.

I will be careful with soldering.  I am not exactly a newbie so don't worry about it; with all my experience I am certain I will have no trouble screwing it up.

When mindset is correct, the assembly will begin.  One unsure step is the downloading of the software.  Not my first time, but still...
 

Offline AndrewBCNTopic starter

  • Frequent Contributor
  • **
  • Posts: 571
  • Country: fr
Re: Yet another DIY GPSDO - yes, another one
« Reply #256 on: September 19, 2021, 08:32:50 pm »
...
It has been suggested to me not to solder all the pins of the headers, but just the ones in use, to make life easier should replacement be necessary.
That's complicating things unnecessarily right at the first step of the assembly. Just no, don't:--  :--  :--

I would suggest you follow my instructions to the letter.
Of course, suit yourself, but imho that's the best way to ruin the headers alignment and the entire solder job. A big risk for essentially zero gain.

Please watch this video and proceed similarly, as you can see it's a 3 minutes solder job tops.

« Last Edit: September 19, 2021, 09:30:45 pm by AndrewBCN »
 

Offline FriedLogic

  • Regular Contributor
  • *
  • Posts: 115
  • Country: gb
Re: Yet another DIY GPSDO - yes, another one
« Reply #257 on: September 21, 2021, 07:46:43 am »
Well, let's assume your control loop has locked on the GNSS timepulse, which you would typically detect by monitoring the phase between your timepulse output and the GNSS timepulse (or the selected edge of the 10MHz output), finding that it stays within the GNSS time uncertainty for a longer period of time (like, multiple times your control loop time constant).

What do you mean by GPS time uncertainty here? How would you measure if it has been exceeded?

Quote
You can then be sure that the timepulse derived from the OCXO is more accurate and stable than the timepulse from the GNSS itself.

That's a very broad statement.

I'm not suggesting that a GPSDO can't be made very stable, just that for a standard DIY one with a $20 Ebay OCXO, and operating in a domestic rather than controlled lab environment, it's not so simple. Things as simple as opening a window or turning on a heater can cause significant phase errors.

Jackson Labs did a presentation a few years ago which shows some interesting phase plots:
https://www.gps.gov/cgsic/meetings/2017/jackson.pdf
Page 5 has a plot of the 'LN Rubidium Ultimate' version of their GPS-3500 GPSDO along with their Lab GPS. It is certainly an improvement, but it is a commercial rubidium GPSDO costing a fair few thousand dollars.
 
The following users thanked this post: AndrewBCN

Offline AndrewBCNTopic starter

  • Frequent Contributor
  • **
  • Posts: 571
  • Country: fr
Re: Yet another DIY GPSDO - yes, another one
« Reply #258 on: September 21, 2021, 09:50:25 am »
...
Jackson Labs did a presentation a few years ago which shows some interesting phase plots:
https://www.gps.gov/cgsic/meetings/2017/jackson.pdf
Page 5 has a plot of the 'LN Rubidium Ultimate' version of their GPS-3500 GPSDO along with their Lab GPS. It is certainly an improvement, but it is a commercial rubidium GPSDO costing a fair few thousand dollars.

Thank you for the link to this interesting presentation. And indeed, commercial rubidium GPSDOs cost upwards of $3,000 and so does the FacePlant GPSDO "Time Machine". Of course their absolute performance differs from DIY GPSDOs that rely on inexpensive recycled OCXOs pulled out from decommissioned telecoms equipment.

But the question is, what is the intended application? And how is the raw information from the rubidium oscillator handled? A GPSDO does nothing by itself, in its most basic form it just provides a 10MHz signal with a specified accuracy and stability, and in many commercial applications the advantages of OCXO-based GPSDOs (smaller, cheaper, more mechanically robust and less power-hungry, so less heat dissipation issues, etc) makes them the better choice vs rubidium-based GPSDOs.

As usual, the answer is "It depends..."
 

Offline thinkfat

  • Supporter
  • ****
  • Posts: 2150
  • Country: de
  • This is just a hobby I spend too much time on.
    • Matthias' Hackerstübchen
Re: Yet another DIY GPSDO - yes, another one
« Reply #259 on: September 21, 2021, 11:34:28 am »
Well, let's assume your control loop has locked on the GNSS timepulse, which you would typically detect by monitoring the phase between your timepulse output and the GNSS timepulse (or the selected edge of the 10MHz output), finding that it stays within the GNSS time uncertainty for a longer period of time (like, multiple times your control loop time constant).

What do you mean by GPS time uncertainty here? How would you measure if it has been exceeded?

Quote
You can then be sure that the timepulse derived from the OCXO is more accurate and stable than the timepulse from the GNSS itself.

That's a very broad statement.

I'm not suggesting that a GPSDO can't be made very stable, just that for a standard DIY one with a $20 Ebay OCXO, and operating in a domestic rather than controlled lab environment, it's not so simple. Things as simple as opening a window or turning on a heater can cause significant phase errors.

Jackson Labs did a presentation a few years ago which shows some interesting phase plots:
https://www.gps.gov/cgsic/meetings/2017/jackson.pdf
Page 5 has a plot of the 'LN Rubidium Ultimate' version of their GPS-3500 GPSDO along with their Lab GPS. It is certainly an improvement, but it is a commercial rubidium GPSDO costing a fair few thousand dollars.

One thing a GNSS receiver is particularly good at is estimating uncertainties. So, finding out the uncertainty of the timepulse one can just ask the receiver for its TFOM.

Also, I don't think it's preposterous to say that the OCXO derived timepulse is more stable and accurate than the GNSS timepulse. Certainly, if you expose the OCXO to the environment directly, especially temperature fluctuations, phase shifts are inevitable. But the whole idea of locking an OCXO to a GNSS hinges on the assumption that the OCXO has superior short term stability, and once you have met equilibrium, you oscillator phase will be smack in the middle of the uncertainty window given by the GNSS. Of course it will not stay there, depending on the quality of your system it will drift around until your loop filter finds a correction is necessary. But excluding singularities in the oscillator outputs like phase jumps, the excursions of the OCXO phase will always stay _within_ the uncertainty window of the GNSS, simply because the loop filter has a time constant that is a lot larger than the time between two GNSS timepulses.

Yes, if your system setup is shitty, so will be your output stability. But such is the nature of things.
Everybody likes gadgets. Until they try to make them.
 

Offline AndrewBCNTopic starter

  • Frequent Contributor
  • **
  • Posts: 571
  • Country: fr
Announcing the STM32 Open Timer Server
« Reply #260 on: September 22, 2021, 09:29:25 pm »
Hi,

A few weeks ago I set myself a challenge to develop a "better" project than FacePlant with twice the "performance" and at less than 1/10th the cost. So I am announcing the STM32 Open Time Server, a compact, inexpensive PTP/NTP server that can be plugged into any network and provide accurate timing.

This is basically a combination of the STM32 GPSDO with the UTC aligned 1PPS (which is still under development) and an STM32 development board with Ethernet. The interesting thing about the STM32 development board's onboard Ethernet interface is that it provides for IEEE-1588 hardware timestamping of Ethernet packets. The attached diagram makes clear the basic setup for this project.

I have a couple of STM32 development boards with Ethernet (STM NUCLEO-F429ZI) on their way courtesy of ST Micro, I'll post pictures when I get them.

Btw the code for the PTP server for the STM32 development board already exists, here: https://github.com/mpthompson/stm32_ptpd
« Last Edit: September 22, 2021, 10:46:00 pm by AndrewBCN »
 

Offline bob91343

  • Super Contributor
  • ***
  • Posts: 2675
  • Country: us
Re: Yet another DIY GPSDO - yes, another one
« Reply #261 on: September 23, 2021, 01:03:16 am »
I ran into my first stumbling block.  I was careful to purchase perfboard that has holes on 0.100" conters.  The OCXO has pin spacing of 0.75" so I am pondering drilling out a few holes so it will fit.
 

Offline AndrewBCNTopic starter

  • Frequent Contributor
  • **
  • Posts: 571
  • Country: fr
Re: Yet another DIY GPSDO - yes, another one
« Reply #262 on: September 23, 2021, 09:00:50 am »
I ran into my first stumbling block.  I was careful to purchase perfboard that has holes on 0.100" conters.  The OCXO has pin spacing of 0.75" so I am pondering drilling out a few holes so it will fit.
Bob,
I recommend that you first assemble the STM32 GPSDO on a breadboard. But then again, suit yourself.
I wrote this three months ago:
...you need to solder longer leads to the 5 short leads of the OCXO, I suggest adding 5mm long leads.
See the attached picture. That takes 2 minutes and is the solution I found to use these OCXOs with a breadboard.
« Last Edit: September 23, 2021, 02:03:46 pm by AndrewBCN »
 

Offline AndrewBCNTopic starter

  • Frequent Contributor
  • **
  • Posts: 571
  • Country: fr
PIC programmer
« Reply #263 on: September 23, 2021, 11:39:58 am »
The K150 PIC programmer just arrived! Now to check whether it survived shipping from China and try to program a couple of PIC12F675s with it.  :-/O

BTW if anybody is curious I found an open-source Python program that allows using the K150 under Linux, as explained here: https://eliasandrade.wordpress.com/2015/01/20/como-usar-o-gravador-pic-k150-no-linux/

Note the Python picpro.py program requires installing Python 2.7 which is deprecated in 2021. It doesn't work with Python 3.4 (I tested).

Edit 1: tested the K150 PIC programmer with picpro.py and it seems it managed to flash a picDIV correctly, but I'll only be able to test the picDIV tomorrow.
Edit 2: tested the picDIV running pd11.hex and it generates a 100µs pulse @ 1Hz frequency, as designed. See attached DSO trace.
« Last Edit: September 25, 2021, 07:18:21 pm by AndrewBCN »
 

Offline bob91343

  • Super Contributor
  • ***
  • Posts: 2675
  • Country: us
Re: Yet another DIY GPSDO - yes, another one
« Reply #264 on: September 23, 2021, 05:30:42 pm »
Okay I will solder leads to the OCXO and see how to secure the unit so as not to stress the solder.  I don't want to use my glue gun, as the unit runs warm enough that the glue is likely to soften.  So maybe a wire strap or epoxy or super glue or something else.

I removed the OCXO from the bit of PC board it was on.  I want to apologize for my incompetence here.  I used to be pretty good with this stuff but it's been a while and I don't have the visual acuity or steady hand I used to have.  I had my 89th birthday last month.
 

Offline AndrewBCNTopic starter

  • Frequent Contributor
  • **
  • Posts: 571
  • Country: fr
Re: Yet another DIY GPSDO - yes, another one
« Reply #265 on: September 23, 2021, 06:34:42 pm »
...
I removed the OCXO from the bit of PC board it was on.  I want to apologize for my incompetence here.  I used to be pretty good with this stuff but it's been a while and I don't have the visual acuity or steady hand I used to have.  I had my 89th birthday last month.

Bob,
I understand.
I just think you should get somebody to help you with the soldering, assembling and programming for this project. I myself have problems with my sight, so soldering small parts can be quite a challenge.
 

Offline bob91343

  • Super Contributor
  • ***
  • Posts: 2675
  • Country: us
Re: Yet another DIY GPSDO - yes, another one
« Reply #266 on: September 23, 2021, 08:02:45 pm »
I have soldered leads to the OCXO and am pondering the next step.

As for getting help, that isn't readily available due to the pandemic, and to the fact that most of my friends aren't local.  So I will take my time.

I will report progress, however slight.  I appreciate your patience.
 

Offline AndrewBCNTopic starter

  • Frequent Contributor
  • **
  • Posts: 571
  • Country: fr
Re: Yet another DIY GPSDO - yes, another one
« Reply #267 on: September 23, 2021, 08:33:15 pm »
Bob,
Take as much time as you want/need. And don't hesitate to post about your progress and any issues or questions. And of course, most importantly: stay safe.  :-+
« Last Edit: September 23, 2021, 08:35:57 pm by AndrewBCN »
 

Offline bob91343

  • Super Contributor
  • ***
  • Posts: 2675
  • Country: us
Re: Yet another DIY GPSDO - yes, another one
« Reply #268 on: September 24, 2021, 04:05:13 am »
Thanks for all you are doing, Andrew.  I ran the arduino software but was unable to load it into the black pill.  As luck would have it, I have a house guest, my grandson, who is a computer guy.  I sat him down here and he did not have an easy time of it, having to download stuff and all, but he managed finally to flash the STM and now it's sitting here flashing.

So I have done step 3.  I haven't finished soldering the headers so I will do that next.  I have the wires soldered to the OCXO.  What I think I need now is the stuff you wrote to make all of this play together.  I have taken no pictures yet.  When I get it all lashed together I will do that.
 

Offline AndrewBCNTopic starter

  • Frequent Contributor
  • **
  • Posts: 571
  • Country: fr
Re: Yet another DIY GPSDO - yes, another one
« Reply #269 on: September 24, 2021, 09:42:52 am »
Thanks for all you are doing, Andrew.  I ran the arduino software but was unable to load it into the black pill.  As luck would have it, I have a house guest, my grandson, who is a computer guy.  I sat him down here and he did not have an easy time of it, having to download stuff and all, but he managed finally to flash the STM and now it's sitting here flashing.

So I have done step 3.  I haven't finished soldering the headers so I will do that next.  I have the wires soldered to the OCXO.  What I think I need now is the stuff you wrote to make all of this play together.  I have taken no pictures yet.  When I get it all lashed together I will do that.

Well done, both you and your grandson!  :-+

I'll be awaiting the pictures.
« Last Edit: September 24, 2021, 10:21:01 am by AndrewBCN »
 

Offline AndrewBCNTopic starter

  • Frequent Contributor
  • **
  • Posts: 571
  • Country: fr
The STM32 Nucleo boards have arrived!
« Reply #270 on: September 24, 2021, 10:23:17 am »
The STM32 Nucleo boards have arrived!

I'll be creating a separate thread for the STM32 Open Time Server project, this one will continue as the thread specifically for the STM32 GPSDO.

Edit:
the new thread for the STM32 Open Time Server project is https://www.eevblog.com/forum/projects/stm32-open-time-server/
« Last Edit: September 26, 2021, 06:54:25 am by AndrewBCN »
 

Offline AndrewBCNTopic starter

  • Frequent Contributor
  • **
  • Posts: 571
  • Country: fr
Schematic version 0.6
« Reply #271 on: October 02, 2021, 10:50:40 am »
Hi,
Attached is the STM32 GPSDO KiCad schematic PDF file, version 0.6, sheets 1 to 3. The main difference is the addition of an optional picDIV on sheet 3 which should provide a 1PPS synchronized to UTC / GPS time within +/- 100ns. The other sheets have small modifications to accommodate the addition of the picDIV.

Synchronization within +/- 100ns is supposed to be achieved in two steps:

1. After OCXO warmup and GPS lock acquisition, the Arm input of the picDIV is held low for 1.3s. The next 1PPS rising edge will sync the 1PPS output from the picDIV to the 1PPS from the GPS receiver within  (at least in theory) 500ns (400ns is the uncertainty in the picDIV and 100ns is jitter from various sources).

2. The phase difference between the 1PPS output from the picDIV and the 1PPS from the GPS receiver is monitored/measured by Erik's version of Lars' 1ns resolution TIC with 1µs range, and the OCXO frequency is then adjusted to keep the phase difference < 100ns.

That's the theory. Now I have to program the above and test it on my latest "rewired" breadboard prototype. As usual, the code will be available on GitHub.

And again: this is optional, like the OLED display, the sensors, the low-ripple/noise power supply, the output buffers, the square to sine filter and the Bluetooth interface. Don't want it, don't use it.
« Last Edit: October 02, 2021, 11:01:57 am by AndrewBCN »
 

Offline enut11

  • Frequent Contributor
  • **
  • Posts: 933
  • Country: au
  • Love building/modifying/restoring test equipment
Re: Yet another DIY GPSDO - yes, another one
« Reply #272 on: October 11, 2021, 07:24:30 am »
Hi AndrewBCN
I have collected most of the items needed for the basic GPSDO project:
1) 10MHz OCXO
2) STM32 Black Pill
3) 8v power supply incl 317 regulator
4) GPS aerial
5) NEO 8 GPS module
6) 4725 DAC

I was looking at your schematic diagrams and wondering how you generate Vdd (3.3v) for optional circuits.
Or, does the micro output 3.3v from Vcc (5v) input?
an electronics nut from wayback...
 

Offline AndrewBCNTopic starter

  • Frequent Contributor
  • **
  • Posts: 571
  • Country: fr
Re: Yet another DIY GPSDO - yes, another one
« Reply #273 on: October 11, 2021, 09:49:55 am »
Hi AndrewBCN
I have collected most of the items needed for the basic GPSDO project:
1) 10MHz OCXO
2) STM32 Black Pill
3) 8v power supply incl 317 regulator
4) GPS aerial
5) NEO 8 GPS module
6) 4725 DAC

I was looking at your schematic diagrams and wondering how you generate Vdd (3.3v) for optional circuits.
Or, does the micro output 3.3v from Vcc (5v) input?

Hi enut11,
Yes, the STM32F411CEU6 "Black Pill" can provide 3.3V at up to 100mA or so to the I2C MCP4725 DAC, the I2C SSD1306 OLED display and the various I2C/SPI temperature/pressure sensors. The 3.3V pins on the Black Pill are power output pins. Also note that the NEO-M8 GPS module has its own 5V to 3.3V regulator, so even though it interfaces at 3.3V logic levels, you must supply 4.8~5V to it.

As for Bob, I suggest that the very first step when you are building the STM32 GPSDO is to program the STM32 Black Pill itself, so you'll need a USB C cable and then you can familiarize yourself with that process first, if you are not familiar with it already.

A good test is to simply compile and download the "Blinky" example program to the STM32 Black Pill. If you get a 1Hz blinking LED you know your Arduino IDE is correctly setup for STM32 programming work, and your STM32 Black Pill is working correctly.

The next step is to download the STM32 GPSDO sketch from GitHub and familiarize yourself with the dozen or so lines of #defines that determine the various optional modules installed. If you have any doubts about this step do not hesitate to check with me in this thread.  :-+
« Last Edit: October 11, 2021, 09:53:03 am by AndrewBCN »
 
The following users thanked this post: enut11

Offline enut11

  • Frequent Contributor
  • **
  • Posts: 933
  • Country: au
  • Love building/modifying/restoring test equipment
Re: Yet another DIY GPSDO - yes, another one
« Reply #274 on: October 11, 2021, 06:14:33 pm »
Thanks AndrewBCN. I will proceed as you suggest. Looking forward to when I box this project, I expect the OCXO to generate a fair amount of heat in an enclosure. Are there any heat sensitive components/ modules that need to be thermally isolated so as not to compromise performance?

Does the type of 5v power supply make any difference, ie linear vs SMPS?
enut11
« Last Edit: October 11, 2021, 06:31:40 pm by enut11 »
an electronics nut from wayback...
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf