Skip to content

Commit

Permalink
README.md enhanced
Browse files Browse the repository at this point in the history
  • Loading branch information
xSnowHeadx committed Jan 19, 2024
1 parent 7f833c4 commit 5c6d39c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@ The company [PV Electronics](https://www.pvelectronics.co.uk) from UK sells nice
Unfortunately these clocks have only a crystal for time accuracy and no DST-automatic. To get the exact time you can buy a [NTP-client](https://www.pvelectronics.co.uk/index.php?main_page=product_info&cPath=10&products_id=188) from the same company for $40 or you make one by yourself for $2 and with better features.
## Function
The FakeGPS requests the local Time from a NTP-Server and the timezone offset from [IP-API](http://www.ip-api.com) over WiFi and Internet and generates a GPRMC-Message in the GPS-Format NMEA-0183 as required from the Clock.
The local timezone is retrieved from the public IP. If you're using a foreign Proxy this will cause a wrong timezone. In this case use a fix timezone entry as described in the [IPAPI-Doc](https://www.ip-api.com/docs/api:newline_separated) at line 25 in TimeClient.cpp.

The APIsr generate a timestamp in local time considering the DST-state. So the clock can be set on a UTC-difference of 0 and don't need any configuration or switching for DST on the clock.
The Program generates a timestamp in local time considering the DST-state. So the clock can be set on a UTC-difference of 0 and don't need any configuration or switching for DST on the clock.

On first usage or if the module can't connect to the local WiFi-network it starts as accesspoint named "FakeGPS-AP" with no password. Connect to this AP and configure the SSID and Key of your local network as described [here](https://github.com/tzapu/WiFiManager). Then the module will connect to your network, act as GPS-Time-Server and keep the access-data for the next start.
## Hardware
* Like the original we use a [ESP8266 NodeMCU](https://www.aliexpress.com/item/1PCS-ESP8266-NodeMCU-V3-Lua-WIFI-module-memory-32M-Flash-USB-serial-CH340G/32820380705.html).
* For the connection to the clock we only need one addtional part, a [3.5mm Stereo-plug](https://www.aliexpress.com/item/H143-3-5-pairs-of-3-5-channel-stereo-audio-plug-plug/32691597552.html) with cable like from old headphones.
* To protect the PCB a [minimal case](https://www.thingiverse.com/thing:2842012) should be sufficient. The linked one can be printed with a 3D-Printer.

The serial signal comes from Pin TXD1 (GPIO2, D4) of the NodeMCU with 9600 baud. Connect the audioplug to 5V, GND and Signal as described in the assembly instructions of the clock and configure the timereceiver of the clock for GPS-Format and 9600 Baud.

Expand All @@ -27,11 +29,11 @@ Because the NodeMCU is Arduino-compatible it can be programmed with any IDE for
##### Standard libraries
* DNSServer
* Wire

##### Special libraries
* from [ESP8266-core](https://github.com/esp8266/Arduino)
* ESP8266
* ESP8266WebServer
* ESP8266WiFi
* [WiFiManager](https://github.com/tzapu/WiFiManager)
* [ArduinoJson](https://www.arduinolibraries.info/libraries/arduino-json)

* [NTPClient](https://github.com/arduino-libraries/NTPClient)

0 comments on commit 5c6d39c

Please sign in to comment.