Close

Second prototype

A project log for ESP GPS NTP Server

A simple NTP server using GPS

liebmanliebman 01/27/2018 at 14:250 Comments

   I've moved to an ESP32, and renamed the project. I had too many issues with software serial on the ESP8266 failing to read properly at 9600 baud. Also I'm now using esp-idf instead of Arduino.  I've added a small OLED display to show status and current UTC time.

Its running 3 "tasks":

  1. gps_task - It's detects when the GPS unit is valid and uses the PPS signal as an interrupt, with 4us to 32us latency, to track current time in seconds once the time is set from one of the GPS records. Microseconds are interpolated based on measured internal microseconds between each PPS interrupt.  A timer used as "watchdog" detects any missing PPS interrupts and invalidates the time.
  2. ntp_task - listening on port 123 (NTP port) and responding to requests with current time.
  3. dsp_task - manages the OLED display.  It receives a "display" message from gps_task at each second interrupt and refreshes the display.

Discussions