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

0 Members and 2 Guests are viewing this topic.

Offline AndrewBCNTopic starter

  • Frequent Contributor
  • **
  • Posts: 571
  • Country: fr
Re: Yet another DIY GPSDO - yes, another one
« Reply #25 on: June 03, 2021, 06:36:38 pm »
You have shot way over my head.  I was hoping for a way to build one of these but at this point I think I will give up.  It would have been nice to have a module that could substitute for the 10 MHz time base of my counter but alas, I have been left in the dust.

While I understand the basic idea of programming, and have even done some of it, the plethora of languages and complexity of installing (and running) code has me totally wiped out.

Bob,
I have been using the Arduino IDE to develop the STM32 GPSDO firmware, it's very user-friendly and can be learned in one afternoon (and it's totally free). But you don't need to learn it to flash the firmware to the MCU module, that's something that requires one-click and 30 seconds! As for assembling the STM32 GPSDO: you can put it together on a breadboard in a couple of hours as long as you have the essential parts at hand. In terms of hardware, I believe the STM32 GPSDO is the simplest design ever: the barebones configuration requires just three modules and a few passive components:
  • The GPS module.
  • The 10MHz OCXO.
  • The STM32F411CEU6 Black Pill module.
  • Two 10uF capacitors and two 20k resistors.
 

Offline bob91343

  • Super Contributor
  • ***
  • Posts: 2675
  • Country: us
Re: Yet another DIY GPSDO - yes, another one
« Reply #26 on: June 03, 2021, 08:30:59 pm »
Okay Andrew I won't give up yet.  Give me a schematic diagram and parts list and instructions and I will give it a go, if I think I can do it.
 

Offline AndrewBCNTopic starter

  • Frequent Contributor
  • **
  • Posts: 571
  • Country: fr
Re: Yet another DIY GPSDO - yes, another one
« Reply #27 on: June 04, 2021, 12:47:23 am »
Okay Andrew I won't give up yet.  Give me a schematic diagram and parts list and instructions and I will give it a go, if I think I can do it.

Bob, the first thing you should do is to install the Arduino program on your computer, because that's what you will need to interface to the STM32 GPSDO and flash the STM32F411CEU6 Black Pill board. It's free software, you can download it from here: https://www.arduino.cc/en/software
 

Offline bob91343

  • Super Contributor
  • ***
  • Posts: 2675
  • Country: us
Re: Yet another DIY GPSDO - yes, another one
« Reply #28 on: June 04, 2021, 02:54:46 am »
I did that some time ago.
 

Offline AndrewBCNTopic starter

  • Frequent Contributor
  • **
  • Posts: 571
  • Country: fr
Re: Yet another DIY GPSDO - yes, another one
« Reply #29 on: June 04, 2021, 06:22:09 am »
I did that some time ago.
Good, now the second step: install the STM32 Core 2.0 from GitHub, instructions here: https://github.com/stm32duino/Arduino_Core_STM32/#getting-started

That takes a few minutes as the installation process fetches the ARM compiler and various other packages and installs them.

The next step after that is buying a WeAct STM32F411CEU6 "Black Pill" on AliExpress (WeAct Studio WeiXing Store), and a USB C cable to program it. Total cost less than US$ 8 + shipping.
« Last Edit: June 04, 2021, 09:32:36 am by AndrewBCN »
 

Offline bob91343

  • Super Contributor
  • ***
  • Posts: 2675
  • Country: us
Re: Yet another DIY GPSDO - yes, another one
« Reply #30 on: June 04, 2021, 06:11:24 pm »
I went to that link but it's unclear to me how to proceed.  I will see about buying that thing from AliExpress.
 

Offline AndrewBCNTopic starter

  • Frequent Contributor
  • **
  • Posts: 571
  • Country: fr
Re: Yet another DIY GPSDO - yes, another one
« Reply #31 on: June 04, 2021, 06:37:47 pm »
I went to that link but it's unclear to me how to proceed.  ...

Please follow the instructions with screenshots here: https://github.com/stm32duino/wiki/wiki/Getting-Started
 

Offline bob91343

  • Super Contributor
  • ***
  • Posts: 2675
  • Country: us
Re: Yet another DIY GPSDO - yes, another one
« Reply #32 on: June 04, 2021, 09:26:26 pm »
Wow that is involved!  What does deprecate mean here?

I am hesitant to do this, as I really have no idea what is going on.
 

Offline MIS42N

  • Frequent Contributor
  • **
  • Posts: 511
  • Country: au
Re: Yet another DIY GPSDO - yes, another one
« Reply #33 on: June 04, 2021, 10:05:08 pm »
Wow that is involved!  What does deprecate mean here?

I am hesitant to do this, as I really have no idea what is going on.
Deprecate means that was what you did before, it may still work, but the line above is the one you should use. Since you are starting out, ignore the deprecated line.
 

Offline bob91343

  • Super Contributor
  • ***
  • Posts: 2675
  • Country: us
Re: Yet another DIY GPSDO - yes, another one
« Reply #34 on: June 04, 2021, 10:30:58 pm »
I went to that link and read the instructions a few times.  It still leaves me uncertain; some of the language is strange to me.  (Maybe it was written outside the USA.)  This whole thing is way outside my level of competence.  I can generally get by with this computer stuff but when it gets into the nitty gritty of programming and its ancillary activities, I am lost.

I think what I will do is try to find someone who feels comfortable with this.  Unless you want to get the chip and load it for me.  I will of course pay you for your trouble and hardware.
 

Offline AndrewBCNTopic starter

  • Frequent Contributor
  • **
  • Posts: 571
  • Country: fr
Re: Yet another DIY GPSDO - yes, another one
« Reply #35 on: June 05, 2021, 01:41:33 pm »
Bob, I can if you want send you a Black Pill with the program flashed, but I can't really recommend that. First because then the MCU becomes a black box for you, and second because the STM32 GPSDO software is evolving very rapidly, and freezing it in time is a really bad idea.

I know at first sight installing the Arduino IDE and the STM32 Core package may seem daunting, I have been through that too.But in the end it's really simple to install the STM32 Core package in the Arduino IDE, just take your time  :popcorn: and try to understand the sequence of instructions in the last link I sent you, the one with the screenshots. And don't worry about doing something wrong, there is zero chance of this breaking your PC or starting a fire.  :-BROKE

If you really can't find anybody to help you get over this hurdle, I suggest you wait for when I am ready to put together a couple of kits for people to assemble this GPSDO, with a proper PCB and proper instructions. By then I hope the firmware will have stabilized a little bit...
 

Offline AndrewBCNTopic starter

  • Frequent Contributor
  • **
  • Posts: 571
  • Country: fr
A quick update on the software for the STM32 GPSDO
« Reply #36 on: June 05, 2021, 01:51:33 pm »
So I am working right now on the STM32 GPSDO firmware Version v0.04e, and what's new? Plenty!
1. All the measured voltages are now filtered through a 10 samples moving average.
2. The Bluetooth serial and USB serial outputs are now identical, and consists of the following:

Wait for GPS fix max. 1 second

$GNGSA,A,3,27,10,23,26,18,15,,,,,,,2.30,1.91,1.28*13
$GNGSA,A9,76,38,268,,77,23,327,,84,05,085,,85,57,052,23*61
$GLGSV,3,3,09,86,53,308,*5F
$GNGLL,4833.66284,N,00746.88237,E,134626.00,A,A*72
$GNRMC,134627.00,A,4833.66358,N,00746.88039,E,2.527,,050621,,,A*64
$GNGGA,134627.00,4833.66358,N,00746.88039,E,1,07,1.91,137.7,M,47.3,M,,*46


Fix time 889mS
Uptime: 000d 00:28:44
New GPS Fix:
Lat: 48.xxxxxx Lon: 7.xxxxxx Alt: 137.7m
Sats: 7 HDOP: 1.91
UTC Time: 13:46:27 Date: 5/6/2021

Voltages:
Vctl: 1.97  DAC: 2404
VctlPWM: 1.81  PWM: 35751
Vcc: 5.02
Vdd: 3.29

Frequency measurements using 64-bit counter:
64-bit Counter: 17215439735
Frequency: 10000000 Hz
10s Frequency Avg: 10000000.0 Hz
100s Frequency Avg: 9999999.99 Hz
1,000s Frequency Avg: 9999999.997 Hz
10,000s Frequency Avg: 0.0000 Hz

BMP280 Temperature = 26.6 *C
Pressure = 1020.0 hPa
Approx altitude = 57.3 m
AHT10 Temperature: 23.57 *C
Humidity: 76.48% rH


This is repeated once per second. The above is with Verbose NMEA option enabled.
« Last Edit: June 05, 2021, 11:55:24 pm by AndrewBCN »
 

Offline bob91343

  • Super Contributor
  • ***
  • Posts: 2675
  • Country: us
Re: Yet another DIY GPSDO - yes, another one
« Reply #37 on: June 05, 2021, 06:06:04 pm »
Andrew, thank you for your patience with this incompetent hobbyist.  I did ask a friend for help but so far he hasn't done anything.  We shall see.

What I like best is your intent to create a kit to build one of these.  My needs are not critical and I am very willing to wait for a more polished setup.  As I mentioned, I do have a rubidium standard which suffices for now, although I have no way to verify its accuracy.

I also wonder about the permanence of GPS.  They require some maintenance and there may be periods of down time over the years.  Also, someone may devise a new, better system.

Nothing is forever.
 

Offline MIS42N

  • Frequent Contributor
  • **
  • Posts: 511
  • Country: au
Re: Yet another DIY GPSDO - yes, another one
« Reply #38 on: June 05, 2021, 10:05:33 pm »

I also wonder about the permanence of GPS.  They require some maintenance and there may be periods of down time over the years.  Also, someone may devise a new, better system.

Nothing is forever.
I think GPS will outlive us. There are now systems put up by the USA, European union, Russia and China. Any one of them would be adequate. The satellites get replaced when they fail, and each system has redundant satellites. Only 4 satellites are required for a fix, my system rarely has less than 10 in view, usually 12.

I think it will be like the Internet. It is based on concepts more than 50 years old, just gets modified to accommodate new things.
 

Offline bob91343

  • Super Contributor
  • ***
  • Posts: 2675
  • Country: us
Re: Yet another DIY GPSDO - yes, another one
« Reply #39 on: June 05, 2021, 10:28:58 pm »
That is encouraging.  After all, WWV has lasted for many decades and isn't dead yet.
 

Offline AndrewBCNTopic starter

  • Frequent Contributor
  • **
  • Posts: 571
  • Country: fr
Re: Yet another DIY GPSDO - yes, another one
« Reply #40 on: June 06, 2021, 12:01:10 am »
Andrew, thank you for your patience with this incompetent hobbyist.  I did ask a friend for help but so far he hasn't done anything.  We shall see.
...

Bob, don't worry about it. I know it takes a few tries to get over these hurdles, but the main reward is that you learn something new. Which is really my main motivation for this project, it has given me the opportunity to learn so many new things. And I hope it can be likewise for other people: build it and learn lots!
 

Offline bob91343

  • Super Contributor
  • ***
  • Posts: 2675
  • Country: us
Re: Yet another DIY GPSDO - yes, another one
« Reply #41 on: June 06, 2021, 03:23:35 am »
Andrew, you keep encouraging me and that isn't a bad thing.  But first I need a BOM and a schematic.  Once I have that, I can see where I need to buy and where I already have what I need.

Then I can review the procedure until I understand it or ask for help.  The actual circuit board would be good.
 

Offline AndrewBCNTopic starter

  • Frequent Contributor
  • **
  • Posts: 571
  • Country: fr
Re: Yet another DIY GPSDO - yes, another one
« Reply #42 on: June 06, 2021, 10:48:31 am »
Andrew, you keep encouraging me and that isn't a bad thing.  But first I need a BOM and a schematic.
...
Bob, you already have the BOM. https://github.com/AndrewBCN/STM32-GPSDO/blob/main/STM32%20GPSDO%20-%20BOM.pdf  :phew:

A KiCad schematic will be available ASAP. However, note that even if you wire the STM32 GPSDO on a breadboard or put it together on a proper PCB from a kit, without the firmware it makes for a rather poor doorstop and nothing else.  :-//

There is no way around it: you'll have to learn at least a tiny bit of the Arduino IDE for this project to be of any use to you. Take your time to do it, but do it!  :)
 

Offline bob91343

  • Super Contributor
  • ***
  • Posts: 2675
  • Country: us
Re: Yet another DIY GPSDO - yes, another one
« Reply #43 on: June 06, 2021, 04:59:51 pm »
Well okay it seems the hardware parts add up to a bit over $50.  As for my learning experience, it will be fun.  I did go through a similar project recently but without success.  I need to review the job I did and see if the problem lies with me or the software/firmware (written by someone else).  So my confidence level is not too high right now.
 

Offline AndrewBCNTopic starter

  • Frequent Contributor
  • **
  • Posts: 571
  • Country: fr
Five minutes YouTube video on the STM32 GPSDO
« Reply #44 on: June 07, 2021, 03:46:01 pm »
A very simple video I just uploaded on YouTube about the STM32 GPSDO:
 

Offline bob91343

  • Super Contributor
  • ***
  • Posts: 2675
  • Country: us
Re: Yet another DIY GPSDO - yes, another one
« Reply #45 on: June 07, 2021, 06:09:01 pm »
Unfortunately the audio is too weak and I cannot hear what you are saying.  But it appears rather complicated with all the boards and wires.

Perhaps I should forget about it.  I have too many uncompleted projects already.
 
The following users thanked this post: Badwater

Offline AndrewBCNTopic starter

  • Frequent Contributor
  • **
  • Posts: 571
  • Country: fr
Re: Yet another DIY GPSDO - yes, another one
« Reply #46 on: June 07, 2021, 06:17:37 pm »
Unfortunately the audio is too weak and I cannot hear what you are saying.
...
Bob, that's what the captions are for on YouTube videos.
 

Offline bob91343

  • Super Contributor
  • ***
  • Posts: 2675
  • Country: us
Re: Yet another DIY GPSDO - yes, another one
« Reply #47 on: June 07, 2021, 09:31:58 pm »
Thanks Andrew!  I hadn't enabled captions so now I understand what you are saying.

I may purchase the OCXO and see how that works.  As for the rest, well my confidence level is low right now.  I still would be willing to purchase a working system from you and figure out how it works later.
 

Offline AndrewBCNTopic starter

  • Frequent Contributor
  • **
  • Posts: 571
  • Country: fr
GPSDO auto-calibration implemented
« Reply #48 on: June 10, 2021, 09:54:01 am »
I have just uploaded to GitHub version v0.04g of the STM32 GPSDO firmware, and the big news is that this version implements an auto-calibration algorithm for the OCXO.
In previous versions of the firmware, any new OCXO had to be tested/characterized first before the firmware was compiled with an initial Vctl so that the frequency locked loop wouldn't take ages to reach 10MHz +/- 1ppb.

This auto-calibration takes just 30 seconds to run and calculates an approximate initial Vctl for 10MHz +/- 10ppb.  :-+
 

Offline bob91343

  • Super Contributor
  • ***
  • Posts: 2675
  • Country: us
Re: Yet another DIY GPSDO - yes, another one
« Reply #49 on: June 11, 2021, 05:39:29 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.

So if the OCXO is locked within 10 ppb, how does that help get the unit within 1 ppb?
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf