NTP server
At home, I have a lot of connected objects that use an NTP server to set the time. Having your own NTP server can be very useful in the event of an internet outage!
I started from the Elektor project published in the July 2019 issue by Mathias Claussen. This project is accessible on Elektor Labs.
I decided to port the software to a hardware that I know well, since it is the ESP32 thermostat also published on Elektor in the September 2021 issue.
The box used is waterproof and the system can therefore be installed outdoors so that the GPS picks up its signal more easily.
I used the Heltec Wifi 32 processor which incorporates a small OLED display.
I have also attached a second OLED display witch is directly connected to the screen connexion of the board.
The 2 screens use the same I2C port but with different addresses (see jumper on the backside of the second OLED screen).
I also connected an RTC module integrating a DS3231 (which can be found very easily on Amazon or at Adafruit) and I fixed it on the double face behind the circuit.
The GPS module was directly connected to the existing screw terminal block and I therefore supply it with 3V3.
When porting version 1.6 of the software, a bug prevented me from retrieving the NTP time correctly.
After analyzing the Ethernet frames a little more, using WireShark, I noticed a transmission fault for a variable. I patched the software accordingly, and everything works fine now.
I am therefore attaching version 1.7 adapted to my equipment.
This NTP server works perfectly well and the precision is of the order of a second, which is sufficient for all my applications!
It is very practical to be able to modify the NTP time as desired to test different configurations of a system for example.
New firmware V1.71: in order to preserve OLED screens (visible deterioration after about 1 year if they are constantly on), I added a Screen Saver function, when using 2 screens. On power-up, the screens stay on for 10 minutes then turn off. To turn them back on for 10 minutes, just press the button.
I decided to port the software to a hardware that I know well, since it is the ESP32 thermostat also published on Elektor in the September 2021 issue.
The box used is waterproof and the system can therefore be installed outdoors so that the GPS picks up its signal more easily.
I used the Heltec Wifi 32 processor which incorporates a small OLED display.
I have also attached a second OLED display witch is directly connected to the screen connexion of the board.
The 2 screens use the same I2C port but with different addresses (see jumper on the backside of the second OLED screen).
I also connected an RTC module integrating a DS3231 (which can be found very easily on Amazon or at Adafruit) and I fixed it on the double face behind the circuit.
The GPS module was directly connected to the existing screw terminal block and I therefore supply it with 3V3.
When porting version 1.6 of the software, a bug prevented me from retrieving the NTP time correctly.
After analyzing the Ethernet frames a little more, using WireShark, I noticed a transmission fault for a variable. I patched the software accordingly, and everything works fine now.
I am therefore attaching version 1.7 adapted to my equipment.
This NTP server works perfectly well and the precision is of the order of a second, which is sufficient for all my applications!
It is very practical to be able to modify the NTP time as desired to test different configurations of a system for example.
New firmware V1.71: in order to preserve OLED screens (visible deterioration after about 1 year if they are constantly on), I added a Screen Saver function, when using 2 screens. On power-up, the screens stay on for 10 minutes then turn off. To turn them back on for 10 minutes, just press the button.
Discussie (2 opmerking(en))