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

0 Members and 3 Guests are viewing this topic.

Offline AndrewBCNTopic starter

  • Frequent Contributor
  • **
  • Posts: 574
  • Country: fr
Re: Yet another DIY GPSDO - yes, another one
« Reply #50 on: June 11, 2021, 07:21:08 am »
I am unsure of the role the OCXO plays.  I would think the GPS signal would enable creation of the 10 MHz without the need for a separate oscillator.  I guess that isn't the case.
No, the GPS gives us a 1PPS (1Hz pulse) signal, which is used to precisely measure the frequency of the OCXO every second. It is the OCXO that gives us a stable 10MHz square wave signal.
So if the OCXO is locked within 10 ppb, how does that help get the unit within 1 ppb?

That's a very good question.

Let's assume we have assembled the STM32 GPSDO on a breadboard with a 5V square wave OCXO that was bought on AliExpress. These are used, recycled OCXOs that cost <$10. They have a frequency control pin that allows adjusting the frequency by around +/- 20Hz by varying the voltage applied to that pin between 0 and 4V. We call that voltage Vctl.

So roughly speaking the frequency of the OCXO can be varied around 10MHz by adjusting Vctl, with a slope of 10Hz per Volt, or 0.01Hz (1ppb) per millivolt. Calibration means finding the Vctl(e) that sets the OCXO to 10MHz +/- some arbitrary error e. This Vctl(e) is unique to each and every OCXO, so it has to be determined experimentally.

What the auto-calibration procedure does is, in 30 seconds, it finds the correct value for Vctl that brings the OCXO within 0.2Hz (20ppb) of its nominal 10MHz frequency; we can call it Vctl(20ppb). At this stage the FLL (frequency locked loop) takes over and further fine-tunes Vctl to bring the OCXO within 0.01Hz (1ppb) or 0.001Hz (0.1ppb) (when used with the 16-bit PWM software DAC) of its nominal 10MHz frequency. This fine-tuning process can take up to 2 or more hours, but it would take much longer without the prior auto-calibration.
« Last Edit: June 11, 2021, 07:31:59 am by AndrewBCN »
 

Offline AndrewBCNTopic starter

  • Frequent Contributor
  • **
  • Posts: 574
  • Country: fr
OCXO pictures and pinout
« Reply #51 on: June 11, 2021, 09:34:08 am »
This is the CETC CTI OSC5A2B02 10MHz square wave OCXO that I am using, usually available for < $10 on AliExpress.

Top and bottom pictures with pinout and a datasheet in Chinese.

 

Online MIS42N

  • Frequent Contributor
  • **
  • Posts: 520
  • Country: au
Re: OCXO pictures and pinout
« Reply #52 on: June 11, 2021, 11:43:00 am »
This is the CETC CTI OSC5A2B02 10MHz square wave OCXO that I am using, usually available for < $10 on AliExpress.
I bought 10 used ones on ebay for $40AU (about $3 ea US). I've used 4 and all are better than 10MHz+-0.001Hz (0.1ppb) after a week burn in. They are about 0.1V/Hz pulling which means with a 16 bit DAC the control is in steps of 0.07 ppb. There's not much point in using a better OCXO unless using better than a 16 bit DAC (with suitably stable power). I think they are great value.
 
The following users thanked this post: AndrewBCN

Offline bob91343

  • Super Contributor
  • ***
  • Posts: 2675
  • Country: us
Re: Yet another DIY GPSDO - yes, another one
« Reply #53 on: June 11, 2021, 07:18:51 pm »
This stokes me up once again.  But I am still intimidated by the project.  All advice and other kinds of help appreciated.
 

Online MIS42N

  • Frequent Contributor
  • **
  • Posts: 520
  • Country: au
Re: Yet another DIY GPSDO - yes, another one
« Reply #54 on: June 11, 2021, 09:57:40 pm »
This stokes me up once again.  But I am still intimidated by the project.  All advice and other kinds of help appreciated.
Wait until you are building. At the moment it's like trying to get you to learn to drive a car when all you have is a picture of a car. Much easier with you sitting in the car. At worst you are going to blow $100 and end up with a lemon. But you will learn a lot along the way. At best you love your hand built GPSDO because it does what is supposed to do and you built it.

Or you can skip the learning, go buy a ready built unit.

In reply to your 'is an OCXO required' - no, there are GPS modules that will output 10MHz directly. It has a lot of short term jitter, good enough to calibrate a counter with a long gating period but could not be used as the frequency base for a transmitter. The job of the OCXO is like a flywheel, smoothing the short term jitter. The fun bit is seeing how well those jitters can be eliminated. Andrew and I are using completely different methods to achieve the same end. Swings and roundabouts.
 

Offline bob91343

  • Super Contributor
  • ***
  • Posts: 2675
  • Country: us
Re: Yet another DIY GPSDO - yes, another one
« Reply #55 on: June 12, 2021, 01:01:59 am »
Since all the BOM items are sourced from AliExpress, I went there and tried to find the parts.  I had mixed success.  In some cases (notably the  MCP4725) the shipping cost exceeded the item price.  In a few cases, the 10 MHz oscillator was offered as a package of two, tempting me to go that route to avoid later trouble in case of failure.  Or offering a replacement module for some other gear.

What does the display show?  Is it something good to have?  Same question about bluetooth.  The temp and humidity and current/voltage and pressure sensors don't seem to add much to the functionality.

I have all the parts for the power supply as well as a bunch of LEDs and a great assortment of capacitors and resistors.
 

Offline AndrewBCNTopic starter

  • Frequent Contributor
  • **
  • Posts: 574
  • Country: fr
Essential components
« Reply #56 on: June 12, 2021, 08:04:19 am »
Since all the BOM items are sourced from AliExpress, I went there and tried to find the parts.  I had mixed success.  In some cases (notably the  MCP4725) the shipping cost exceeded the item price.  In a few cases, the 10 MHz oscillator was offered as a package of two, tempting me to go that route to avoid later trouble in case of failure.  Or offering a replacement module for some other gear.

What does the display show?  Is it something good to have?  Same question about bluetooth.  The temp and humidity and current/voltage and pressure sensors don't seem to add much to the functionality.

I have all the parts for the power supply as well as a bunch of LEDs and a great assortment of capacitors and resistors.

Bob,
The OLED display (picture on first page of this topic explaining what it shows), all the sensors, the MCP4725 DAC and the Bluetooth module are all OPTIONAL meaning the STM32 GPSDO will operate with or without them. It's up to you to decide if you want to spend another $10~$15 for these parts or not.
The essential can't-do-without parts are:
  • The WeAct STM32F411CEU6 Black Pill development board. Around $7 + shipping.
  • The 10MHz 5V square wave OCXO. Around $10 + shipping.
  • The u-blox Neo-M8 GPS module and an antenna. Around $9 + shipping.

And of course a standard breadboard and the wires to assemble the GPSDO, and you'll also need a USB C cable to program the MCU.

Again, the first and most essential part you need to buy as a first step is the STM32F411CEU6 development board, and then install on your PC both the Arduino IDE and the STM32 Core 2.0 package and make sure you can upload the program to the MCU. That's 90% of putting together this project in these simple steps that should take you no more than 10 minutes of your time.
« Last Edit: June 12, 2021, 10:17:00 am by AndrewBCN »
 

Offline bob91343

  • Super Contributor
  • ***
  • Posts: 2675
  • Country: us
Re: Yet another DIY GPSDO - yes, another one
« Reply #57 on: June 13, 2021, 03:45:13 am »
Okay Andrew that seems simple enough.  I will order the parts I need.  Probably will get them in July sometime.  I have a USB C cable.

I am particularly interested in the OCXO and likely will get two of them.
 

Offline bob91343

  • Super Contributor
  • ***
  • Posts: 2675
  • Country: us
Re: Yet another DIY GPSDO - yes, another one
« Reply #58 on: June 13, 2021, 04:10:24 am »
I ordered the OCXO and the STM32 but can't locate the U-blox Neo-M8 module with antenna.  Help please.
 

Offline AndrewBCNTopic starter

  • Frequent Contributor
  • **
  • Posts: 574
  • Country: fr
u-Blox Neo-M8N module
« Reply #59 on: June 13, 2021, 07:13:44 am »
Bob,
Picture of the recommended GPS module attached below. It is available from a number of sellers on AliExpress, a search for "Neo-M8" on AliExpress will quickly show you a dozen results or more.
I cannot recommend any particular seller, but this one seems to have that module for a good price: WAVGAT Official Store. Make sure you order the Neo-M8 module.

Note this module does not come with an antenna, so you also need a GPS antenna with an SMA connector. Search for "GPS antenna SMA" on AliExpress or Amazon. The least expensive antennas usually look like a small "puck" at the end of a coax cable, picture attached below.
« Last Edit: June 13, 2021, 07:21:36 am by AndrewBCN »
 


Offline AndrewBCNTopic starter

  • Frequent Contributor
  • **
  • Posts: 574
  • Country: fr
Re: Yet another DIY GPSDO - yes, another one
« Reply #61 on: June 13, 2021, 06:42:48 pm »
Yes and yes. For the antenna: make sure to choose the one with the gold metallic SMA connector, NOT the one with the plastic blue Farka connector.
 

Offline bob91343

  • Super Contributor
  • ***
  • Posts: 2675
  • Country: us
Re: Yet another DIY GPSDO - yes, another one
« Reply #62 on: June 13, 2021, 07:42:17 pm »
Orders all placed.  I expect delivery in about a month.  Four items, the oscillator, gps module, antenna, and stm module.  I bought an extra oscillator to play with.

When I am ready to program, I will post here for detailed instructions.  I have programmed an arduino once, with some guidance, so it's not entirely strange.
 

Offline bob91343

  • Super Contributor
  • ***
  • Posts: 2675
  • Country: us
Re: Yet another DIY GPSDO - yes, another one
« Reply #63 on: June 14, 2021, 06:22:27 am »
I scanned the entire thread and didn't see the code to upload to the STM.  Where do I find that?
 

Offline AndrewBCNTopic starter

  • Frequent Contributor
  • **
  • Posts: 574
  • Country: fr
STM32 GPSDO source code
« Reply #64 on: June 14, 2021, 07:42:23 am »
I scanned the entire thread and didn't see the code to upload to the STM.  Where do I find that?
Bob,
I am sure I wrote this before, but all the STM32 GPSDO source code is freely available in my GitHub repository, here:
https://github.com/AndrewBCN/STM32-GPSDO

Download the latest release zip file, unzip it and you should be good to compile and flash.

 

Offline bob91343

  • Super Contributor
  • ***
  • Posts: 2675
  • Country: us
Re: Yet another DIY GPSDO - yes, another one
« Reply #65 on: June 14, 2021, 04:23:05 pm »
I downloaded what I think is the program in a zip file, gpsdo.imo.

Once I get the hardware I guess I have to see how to put that file into the unit.  Presumably a USB cable and some steps with the arduino program.

I appreciate your patience with me.  I alternately feel totally lost and happily doing things.

I expect the hardware to arrive in July.  It will be fun to learn a new procedure, especially if it works.

It's kind of reinventing the wheel for me, as my rubidium standard is probably overkill for my needs as it is.  If the two references disagree, I will then have to decide which is closest to the 'right' frequency.
 

Offline bob91343

  • Super Contributor
  • ***
  • Posts: 2675
  • Country: us
Re: Yet another DIY GPSDO - yes, another one
« Reply #66 on: June 29, 2021, 07:13:29 am »
Andrew, did you finish the schematic diagram yet?  I have the oscillator and the gps unit.  The antenna and STM module should be here presently.
 

Offline AndrewBCNTopic starter

  • Frequent Contributor
  • **
  • Posts: 574
  • Country: fr
Re: Yet another DIY GPSDO - yes, another one
« Reply #67 on: June 30, 2021, 08:12:13 pm »
Andrew, did you finish the schematic diagram yet?  I have the oscillator and the gps unit.  The antenna and STM module should be here presently.

Not yet, no, but you won't need a schematic diagram for now.

First things first: you need a 5V power supply, a breadboard, wires and a red or orange LED and a 330R resistor. And a USB C cable and the STM32F411CEU6 Black Pill. Also a PC with the Arduino IDE installed. Also needed for testing: 2 x 4.7k resistors, and an oscilloscope which I believe you have?

Then we can already test the 10MHz OCXO. Tell me when you are ready and we can get started testing things out.
 

Offline bob91343

  • Super Contributor
  • ***
  • Posts: 2675
  • Country: us
Re: Yet another DIY GPSDO - yes, another one
« Reply #68 on: July 01, 2021, 12:46:19 am »
I have everything but the black pill, which should arrive in a day or two.  Oh, and the antenna hasn't arrived either.  I have all the other stuff.
 

Offline AndrewBCNTopic starter

  • Frequent Contributor
  • **
  • Posts: 574
  • Country: fr
Re: Yet another DIY GPSDO - yes, another one
« Reply #69 on: July 01, 2021, 08:54:35 pm »
I have everything but the black pill, which should arrive in a day or two.  Oh, and the antenna hasn't arrived either.  I have all the other stuff.

OK, so you can already test the OCXO. To insert it into the breadboard you need to solder longer leads to the 5 short leads of the OCXO, I suggest adding 5mm long leads. Then power it up (5V) and check that it is generating a square 10MHz TTL signal with your scope.

I posted the pinout of the OCXO here: https://github.com/AndrewBCN/STM32-GPSDO/tree/main/docs/pictures

Please include a picture of your test setup in your next post.
 

Offline bob91343

  • Super Contributor
  • ***
  • Posts: 2675
  • Country: us
Re: Yet another DIY GPSDO - yes, another one
« Reply #70 on: July 01, 2021, 10:20:30 pm »
I have had the OCXO for some time and it has been tested.  I found that it takes 2.36 V to bring it on frequency, and it's both very stable and quick to stabilize.  The square wave has a bit of overshoot but looks good.

These OCXOs do not arrive by themselves.  They are already mounted on a piece of circuit board that has been cut from a larger board.  So connecting is easy, as the pins have been soldered already.

I ran mine on 5V and, when first connected, draws about 660 mA but shortly settles to about 180 mA.
 
The following users thanked this post: AndrewBCN

Offline AndrewBCNTopic starter

  • Frequent Contributor
  • **
  • Posts: 574
  • Country: fr
Re: Yet another DIY GPSDO - yes, another one
« Reply #71 on: July 02, 2021, 09:05:42 am »
Well done. Are you going to desolder the OCXO from the sawed off piece of PCB it came soldered on, or leave it as is?  :-/O
 

Offline bob91343

  • Super Contributor
  • ***
  • Posts: 2675
  • Country: us
Re: Yet another DIY GPSDO - yes, another one
« Reply #72 on: July 02, 2021, 06:32:50 pm »
My inclination is to leave the oscillator on the board fragment.  It gives it more stability and the risk of damage is less.

No mail yet today but I am confident that the STM black pill will arrive shortly.  The antenna as well.
 

Offline AndrewBCNTopic starter

  • Frequent Contributor
  • **
  • Posts: 574
  • Country: fr
Schematic for minimal configuration
« Reply #73 on: July 17, 2021, 11:14:21 am »
OK, so I finally found some time to draw the schematic for the minimal configuration (no OLED display, no sensors, no Bluetooth module, no buffers, etc) for the STM32 GPSDO. This took a lot longer than I thought, because I had to create my own KiCad symbol for the WeAct STM32F411CEU6 "Black Pill" module, and also for the OCXO.  :phew:

Attached is the KiCad schematic exported as a jpeg PDF file.

I'll soon update the GitHub repository with all the KiCad files.
« Last Edit: July 18, 2021, 08:20:51 am by AndrewBCN »
 
The following users thanked this post: enut11

Offline bob91343

  • Super Contributor
  • ***
  • Posts: 2675
  • Country: us
Re: Yet another DIY GPSDO - yes, another one
« Reply #74 on: July 17, 2021, 02:48:16 pm »
The diagram is almost unreadable.  After considerable mofification of contrast etc. I finally got something I can read but the callouts are blurred.  Does the lead on the far right connect to the black pill?  After I build it, what is the next step?
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf