NEO-6M GPSIf the GPS signal is lost, the board automatically switches to Wi-Fi and fetches the accurate date and time from an NTP server. This makes it a perfect backup solution for real-time applications!
Watch the video!
Big thanks to Stephan Buth for this great project idea! Check out his Youtube channel!
Step 1: What You Will Need- ESP8266-D1 Arduino Compatible Development Board (Or any other board with WiFi)
- NEO-6M GPS Breakout Module with Antenna
- Breadboard
- LCD I2C 16X2
- Jumper wires
- Visuino software: Download here
- Connect LCD pin [SCL] to ESP8266-D1 pin [SCL]
- Connect LCD Sensor pin [SDA] to ESP8266-D1 pin [SDA]
- Connect LCD Sensor pin [VCC] to ESP8266-D1 pin [5v]
- Connect LCD Sensor pin [GND] to ESP8266-D1 pin [GND]
- Connect NEO-6M GPS module pin [VCC] to ESP8266-D1 pin [5v]
- Connect NEO-6M GPS module pin [GND] to ESP8266-D1pin [GND]
- Connect NEO-6M GPS module pin [TX] to ESP8266-D1 pin [RX]
The Visuino: https://www.visuino.com also needs to be installed. Download Free version or register for a Free Trial.
Start Visuino as shown in the first picture Click on the "Tools" button on the Arduino component (Picture 1) in Visuino When the dialog appears, select "WeMos D1 / R2" as shown on Picture 2
Step 4: WiFi SetupSelect WeMos D1 / R2 board and in the editor Modules>WiFi>Access Points, click on [...] button, so that "Access points " window will open.In this editor drag the WiFi access point to the left side.
- In the properties window Under "SSID" put the name of your WiFi Network
- Under "Password" put the access password for your WiFi network
- Close the "Access points" window
- On the left in editor select Modules>Wifi>Sockets, click on [...] button, so that "Sockets" window will open Drag the TCP/IP Client from right to the left side, then Under Properties window set port: 37 and host: time-c-g.nist.gov
- Close the "Sockets" window
- Add "Liquid Crystal Display (LCD) - I2C" component
- Double click on the "LiquidCrystalDisplay1" and in the Elements window drag "Text Field" to the left side
- In the Elements window drag another "Text Field" to the left side and in the properties window set "Row" to 1, "Initial Value" to ------
- Close the Elements window
- Add "Serial GPS" component
- Add "Digital Multi Source" component, and in the properties window set "Output Pins" to 4
- Add "Digital (Boolean) Inverter (Not)" component
- Add 2X "Date/Time On/Off Switch" component and for both in the properties window set "Send On Enable" to True
- Add 2X "Detect Edge(Digital to Clock)" component and for the first one in the properties window set "On Rising/True" to False
- Add "Internet Time Protocol" component
- Add "Date/Time Multi-Source Merger" component
- Add "Text Value" component
- Double click on "TextValue1" and in the Elements window drag "Set Value" to the left side and in the properties window set "Value" to Internet Time
- drag another "Set Value" to the left side and in the properties window set "Value" to GPS Time
- Close the Elements window
- Connect "GPS1" pin [Out] to WeMos D1 / R2 Serial [0] pin [In]
- Connect "GPS1" pin [Date Time] to "Switch1" pin [In]
- Connect "GPS1" pin [Invalid] to "MultiSource1" pin [In]
- Connect "MultiSource1" pin [0] to "Inverter1" pin [In]
- Connect "MultiSource1" pin [1] to "Switch2" pin [Enable]
- Connect "MultiSource1" pin [2] to "DetectEdge1" pin [In]
- Connect "MultiSource1" pin [3] to "DetectEdge2" pin [In]
- Connect "Inverter1" pin [Out] to "Switch1" pin [Enable]
- Connect "Switch1" pin [Out] to "DateTimeMultiMerger1" pin [0]
- Connect "Switch2" pin [Out] to "DateTimeMultiMerger1" pin [1]
- Connect "DetectEdge1" pin [Out] to "TextValue1" > "Set Value2" pin [In]
- Connect "DetectEdge2" pin [Out] to "TextValue1" > "Set Value1" pin [In]
- Connect "DetectEdge2" pin [Out] to "InternetTime1" pin [Clock]
- Connect "InternetTime1" pin [Out] to "Switch2" pin [In]
- Connect "InternetTime1" pin [Socket] to "WeMos D1 / R2" >TCP Client1 pin [In]
- Connect "DateTimeMultiMerger1" pin [Out] to "LiquidCrystalDisplay1" > "Text Field2" pin [In]
- Connect "TextValue1" pin [Out] to "LiquidCrystalDisplay1" > "Text Field2" pin [In]
- Connect "LiquidCrystalDisplay1" pin I2C Control to "WeMos D1 / R2" I2C In
Before Upload, disconnect pin RX on the board and after the Uploading connect it back.
In Visuino, at the bottom click on the "Build" Tab, make sure the correct port is selected, then click on the "Compile/Build and Upload" button.
Step 8: PlayIf you power the ESP board, the LCD will start to show the GPS Date & Time, if the GPS Signal is lost it will connect to the Internet time server and get the current Date & Time.
Congratulations! You have completed your project with Visuino. Also attached is the Visuino project, that I created for this Instructable, you can download it and open it in Visuino: https://www.visuino.com
Comments
Please log in or sign up to comment.