https://github.com/liebman/esp32-gps-ntp
https://github.com/liebman/esp32-gps-ntp
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/liebman/esp32-gps-ntp
- Owner: liebman
- License: mit
- Created: 2020-12-26T17:57:13.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-02-06T19:48:02.000Z (over 4 years ago)
- Last Synced: 2025-07-26T11:03:42.384Z (11 months ago)
- Language: C++
- Size: 1.12 MB
- Stars: 18
- Watchers: 3
- Forks: 7
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# This is an ESP32 NTP Server with DS3231 synched to GPS PPS signal
**NOTE: This is functional but *very much* a work in progress at the moment.**
This is an [esp-idf](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/index.html) app using [platformio](https://platformio.org/).
## Some details
Synching the DS3231 to the GPS is done with a small high level (level 5) interrupt handler in assembly. This generates a timestamp and offset in microseconds tracking the active edges of the GPS PPS and RTC SQW signals. This data is then fed in to a PID algorithm that will generate an offset value used to speed up and slow down the DS3231 RTC. This keeps the DS3231 synced with the GPS to within a couple of microseconds. As a side benifit it also tunes the DS3231's ocilator to reduce drift when GPS is unavailable.
- [main](main) Contains the code
- [kicad/esp-gps-ntp](kicad/esp-gps-ntp) contains the schematic and board designs in KiCad.
- [kicad/display-adapter](kicad/display-adapter) contains the schematic and board design for a small adapter to config a single inline header connector to an IDC connector (for ribbon cable connection of display)
The display I'm using is [here](https://www.amazon.com/gp/product/B073R7BH1B)
## Schematic
