ESP32 GPS Clock & Weather Station is an open-source project that combines an ESP32 microcontroller with a GPS receiver and environmental sensors to create a satellite-synchronized digital clock and weather monitor. It displays precise time, temperature, humidity, and atmospheric data, making it ideal for DIY electronics enthusiasts, Arduino/ESP32 hobbyists, and IoT developers who need reliable, real-time information. With built-in support for auto-brightness control, OTA updates, and expandable hardware, this project works as both a GPS-based timekeeping alternative to NTP and a compact home weather station.π°οΈ
A different version of this project with physical buttons for better device configuration is available at:
ESP32-GPS-CLOCK-V2
π Time | GPS-synchronized precise timekeeping |
π‘οΈ Environment | Temperature & humidity monitoring |
π Display | Auto-brightness & power saving |
π± Connectivity | WiFi with OTA updates |
β‘ Fast GPS Lock | π Auto Brightness | π OTA Updates |
π± WiFi Manager | π Battery Backup | π‘οΈ Environment Monitor |
Core Components π
Component | Purpose | Notes |
---|---|---|
ESP32 devkit v1 | π§ Controller | DOIT version recommended |
BH1750 | π‘ Light sensor | IΒ²C interface |
BME280 | π‘οΈ Environment | Temperature/Humidity |
GPS Neo 6m | π‘ GPS receiver | UART interface |
ST7920 LCD | π₯οΈ Display | 128x64 pixels |
Buzzer | π Alerts | Active buzzer |
Optional Components π§
- π LiFePO4 AAA 80mAh (GPS backup)
- β‘ TP5000 charging circuit
- π BMS with IN4007 diode
- π οΈ Prototyping materials
Required Libraries π
Library | Source | Notes |
---|---|---|
ASyncTCP | ESP32Async | Latest version |
ESPAsyncWebServer | ESP32Async | Latest version |
βΉοΈ Note: We use the libraries from ESP32Async repository as they are regularly maintained and updated.
Initial Setup and Updates π
Step | Instructions | Notes |
---|---|---|
1. Initial Upload | Upload via USB/Serial first time | Required for initial flash |
2. LittleFS Upload | Generate & Upload HTML binaries | For web interface files |
3. OTA Updates | Enable ElegantOTA updates | For wireless updates |
βΉοΈ Note: After initial USB upload, all subsequent updates can be done wirelessly via OTA.
- π Precise Timekeeping: GPS-synchronized time with battery backup
- π‘οΈ Environmental Monitoring: Temperature and humidity tracking
- π± Smart Connectivity: WiFi enabled with web configuration
- π Adaptive Display: Auto-brightness with power saving
Due to significant accuracy issues, we recommend using BME280/BMP280/TMP117 instead.
π GPS Battery Modification
The NEO-6M GPS modules often come with problematic internal rechargeable batteries that:
- Are frequently dead on arrival
- Fail to hold charge properly
- Only last 15-20 minutes when disconnected
- Cannot be reliably recharged
To resolve this, I've made the following modifications:
- Removed the internal battery and charging diode
- Installed a LiFePO4 battery (AAA size)
- Added TP5000 charging circuit for reliable charging
- Implemented BMS for deep discharge protection
- Added diode to drop voltage to 3V for GPS backup pin
- Keep Original Battery:
- Suitable if clock remains powered most of the time
- No modifications needed
- Modify Battery (Recommended):
- Better for frequent power cycles
- Eliminates 5-10 minute GPS lock delay on cold starts
- More reliable long-term solution

ESP32 GPS Clock Circuit Diagram
π Format | High-resolution PNG |
π Zoom | Click image to enlarge |
πΎ Download | Full Resolution |
- Commercial use
- Modification
- Distribution
- Patent use
- Private use
- License and copyright notice: Include the original license and copyright
- State changes: Document all modifications
- Disclose source: Make source code available
- Same license: Use the same license for derivatives
- No liability
- No warranty
π΄ Fork | π§ Code | π€ Push | π« PR |
If this project helps you, please consider:
β Giving it a star
π Reporting issues
π‘ Suggesting improvements
π€ Contributing code
- Clock favicon created by Those Icons - Flaticon
- π Library maintainers of AsyncTCP and ESPAsyncWebServer
- π The amazing open source community for their contributions and support