Skip to content

An experimental GPSDO using an STM32 MCU and a u-Blox Neo-M6/M7/M8 GNSS module.

License

Notifications You must be signed in to change notification settings

felixd/STM32-GPSDO

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

License: GPL v3 License: CC BY-SA 3.0

An STM32 GPSDO

Designing, assembling, programming and testing an ultra-low-cost GPS-disciplined oven controlled crystal oscillator / lab clock based on an 100 MHz STM32 32-bit ARM microcontroller

Keywords: STM32, GPS, GPSDO, OCXO, 10MHz, crystal oscillator, frequency standard, atomic clock

Introduction

I have been following the thread by the late Lars about his inspirational DIY Arduino GPSDO project. And I checked the dozen or so GPSDO projects published on the net. Then I decided to join the party and design and build my own.

I didn't quite know what I was getting into, but after a couple of months waiting for the parts to come from China, and then another couple of months writing the firmware, I have a working, blinking, timekeeping and happily and precisely oscillating GPSDO.

Like with Lars' design, any OCXO, DOCXO or even rubidium source can be used, but the recommended oscillator is an inexpensive used square wave 10MHz 5V OCXO, which is what I am using in the breadboard prototype. These OCXOs are available from various sources on the net, recycled from decommissioned telecom equipment and sometimes still soldered onto a piece of PCB, for around 10€ or less (< US $12). The OCXO is the most expensive part in this GPSDO.

For Lars' design check following links:

The second most expensive part is the GPS receiver module. I strongly recommend a u-blox Neo-M8 GPS module with an SMA antenna connector. With a u-blox Neo-M8, I am still getting 5~9 satellites even indoors in my basement lab. The much cheaper Neo-M6 struggles to get a fix in the same conditions.

Features

I have decided to build my own version of a 10MHz GPSDO with the following features:

  • Very low cost i.e. < 30 EUR ($35), short and easily purchased BOM.
  • Acceptable performance (+/- 1ppb) "out of the box", can be fine tuned over time.
  • Uses an 100 MHz STM32F411CEU6 "Black Pill" microcontroller module, programmed in C/C++ using the Arduino IDE (STM32duino).
  • Requires only a 5V @ 1A power supply, supplied through a USB C cable.
  • Compact and portable.
  • Optionally battery powered (allows taking it outdoors for optimal satellite signal reception).
  • Optional modules
    • BMP280 for atmospheric pressure and temperature monitoring,
    • AHT10 for temperature and humidity monitoring,
    • INA219 for OCXO power consumption monitoring,
    • HC-06 for wireless communication with a PC/mobile using Bluetooth UART.
  • Extensive logging of various operating parameters to allow further software tuning.
  • An optional small OLED displaying room temperature, UTC time, uptime, operating status, measured frequency.
  • New! Optional UTC-aligned 1PPS output using a picDIV.
  • It uses a digital FLL (Frequency Locked Loop),
    • New! It can also use a PLL (Phase Locked Loop).
  • OXCO Voltage control using a 16-bit DAC provided by a 2kHz PWM output pin on the STM32F411CEU6

Resolution of 10MHz

10 MHz 1 ppm (10^-6) 1 ppb (10^-9)
10000000 Hz 1E+06 ppm 1E+09 ppb
10 Hz 1 ppm 1000 ppb
1 Hz 0,1 ppm 100 ppb
0,1 Hz 0,01 ppm 10 ppb
0,01 Hz 0,001 ppm 1 ppb
0,001 Hz 0,0001 ppm 0,1 ppb

Schematics

Latest (0.6.2 revision) schematics are available here: EDA/Schematics-STM32-GPSDO-0.6.2.pdf

The first breadboard prototype

GPSDO Breadboard Prototype

GPSDO Two Breadboard Prototypes

In normal operation this is displayed on the small OLED: OLED display

Oscilloscope 10MHz Square Wave

You can see it in action on YouTube video (click image below):

https://www.youtube.com/watch?v=mgoK4KuVDhw

A $35 DIY GPSDO - with an STM32F411CEU6 MCU

Links

License

  • Software: GPL-3.0
    • License: GPL v3
  • Hardware: CC BY-SA 3.0
    • License: CC BY-SA 3.0

Authors

  • André Balsa, April 2021

About

An experimental GPSDO using an STM32 MCU and a u-Blox Neo-M6/M7/M8 GNSS module.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 100.0%