https://github.com/desiFish/EPaper-Display-Weather-Clock
E-Paper Display based ultra efficient mini personal weather station
https://github.com/desiFish/EPaper-Display-Weather-Clock
18650-battery arduino bh1750 bme680 bms ds3231-arduino e-paper e-paperdisplay esp esp32-c3 esp32-c6 gxepd2 icr ifr26700 lifepo4-battery tmp117 tp5000 weather-station xiao-esp32-c3 xiao-esp32c6
Last synced: about 2 months ago
JSON representation
E-Paper Display based ultra efficient mini personal weather station
- Host: GitHub
- URL: https://github.com/desiFish/EPaper-Display-Weather-Clock
- Owner: desiFish
- License: gpl-3.0
- Created: 2024-06-07T08:23:14.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-02-25T07:10:03.000Z (3 months ago)
- Last Synced: 2025-03-17T10:21:31.792Z (2 months ago)
- Topics: 18650-battery, arduino, bh1750, bme680, bms, ds3231-arduino, e-paper, e-paperdisplay, esp, esp32-c3, esp32-c6, gxepd2, icr, ifr26700, lifepo4-battery, tmp117, tp5000, weather-station, xiao-esp32-c3, xiao-esp32c6
- Language: C
- Homepage: https://iotthings.pythonanywhere.com/
- Size: 36.1 MB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
๐ A beautiful, eco-friendly weather station powered by E-Paper display! ๐ฑ> โ ๏ธ **IMPORTANT**: Please read the [Notes & Warnings] section carefully before proceeding with this project. It contains crucial safety information about battery configuration, charging, and sensor placement.
### ๐ Smart โข Efficient โข Eco-Friendly ๐
---
## ๐ ๏ธ Hardware Components
๐ฏ Tested On
โข Seeed Studio XIAO ESP32 C3
โข Seeed Studio XIAO ESP32 C6
๐ Display
Waveshare 4.2inch TriColor 400x300 E-paper (15s refresh)
๐ก๏ธ Sensors
โข TMP117 (Temperature)
โข BH1750 (Light sensing)
โข DS3231 (Time keeping)
โข BME680 (Humidity & pressure)
๐ Power
LFP 2x4000mAh (8000mAh total) Lithium Iron Phosphate Battery (IFR26700)
๐ Other
2xBMS, capacitors, resistors, connectors, etc.
## ๐ฑ Key Features & Updates
### ๐ Latest Version
[**v0.3.2**](https://github.com/desiFish/ESP32-ePaper-Display-Weather-Clock/releases/tag/v0.3.2)
- ๐ง Enhanced overall system efficiency
- ๐ Improved power management algorithms
- ๐พ Improved readability
### ๐ฏ Coming Soon
- ๐ฑ Web browser integration
- ๐ Enhanced weather data graph
- ๐จ New display layouts
## โญ Core Features
๐ก๏ธ Medical-grade Temperature | ๐ง Humidity & Pressure | ๐ Smart Battery | ๐ Weather Data
:-------------------------:|:-------------------------:|:-------------------------:|:-------------------------:
ยฑ0.1ยฐC Precision | Real-time Monitoring | Intelligent Power Mgmt | Global Forecasting
`TMP117 Sensor` | `BME680 Sensor` | `2000+ Cycles` | `OpenWeatherMap`### ๐ฎ Smart Features
โข ๐ Moon Phase & Day/Night Tracking
โข ๐ Auto WiFi Configuration
โข โฐ Power-efficient Sleep Modes
โข ๐ Environmental Monitoring## โก Power Performance
### ๐ Power Optimization Results


๐ Coming Soon: Ultra-Low Power Mode
Using SparkFun TPL5110 Timer + Power Management Board:
Sleep Current Draw: 20ยตA โ 35nA
That's a 571,328% reduction in sleep power consumption!๐ก How it works
The TPL5110 completely cuts power to the system between updates, reducing standby current to near-zero levels. This improvement will dramatically extend battery life!
> ๐ **Performance Metrics**
>
> After recent code optimizations, power efficiency has significantly improved:
>
> | Mode | Duration (Awake) | Status |
> |------|----------|---------|
> | Active-Active | ~22s |  |
> | Sleep-Active-Sleep | ~20s |  |
> | Sleep-to-Sleep | <1s |  |
>
> โจ **Key Improvements**:
> - CPU power thoroughly monitored and conserved
> - Optimized mode transitions
> - Minimal wake time in sleep cycles## ๐ Battery Performance
> ๐ **Note**: Historical data below is from testing with Li-ion ICR batteries. The shorter duration in cycles 2 and 3 (49 and 48 days vs 73 days) was due to incomplete charging (batteries not reaching full 4.2V). New performance data with 8000mAh LFP batteries (which are more cost-effective) is being collected.
### ICR Battery Data
Cycle
Duration
Details
First Cycle
73 Days
06/05/2024 - 17/07/2024 (2 months 12 days)
Second Cycle
49 Days
~7 weeks
Third Cycle
48 Days
~7 weeks
### LFP Battery Data (Ongoing)
Cycle
Full Charge Date
Battery Dead Date
Duration
First Cycle
January 09, 2025
Coming Soon
Ongoing
๐ Battery Life Trend (ICR Battery Data)
First: โโโโโโโโโโโโโโโโโโโโ 73 days
Second: โโโโโโโโโโโโโ 49 days
Third: โโโโโโโโโโโโโ 48 days### Current Consumption
> โ ๏ธ **Note**: Precise current consumption measurements for the entire project are not available due to equipment limitations. Please refer to the Battery Performance section above for real-world usage data and longevity estimates.## ๐ธ Gallery
![]()
Clock Normal Mode
![]()
Clock Power Conserved Mode
![]()
Side View 1
![]()
Back View
![]()
Side View 2
![]()
Top View
![]()
ESP32 Compared
![]()
Testing
![]()
Integration
![]()
Mainboard Front
![]()
Internal 1
![]()
Internal 2
![]()
Facelift Clock
![]()
LiFePO4 Cell 4000mAh
![]()
Mainboard Back
## ๐ฑ Eco-Friendly Features
- ๐ฑ E-Paper Display (no backlight needed)
- ๐ LiFePO4 Batteries (Lithium Iron Phosphate)
- โ Cobalt-free chemistry, reducing environmental impact
- โ 2-3x longer lifespan than traditional Li-ion
- โ Non-toxic and more stable chemistry
- โ Better recyclability due to simpler composition
- ๐ฆ Recycled cardboard construction
- ๐ก Smart light sensor for power saving## ๐ซ Technical Specifications
๐ง Core System
### Core Components
- ๐ป **XIAO ESP32 C6** (Recommended)
- 32-bit RISC-V single-core CPU up to 160MHz
- 320KB SRAM, 4MB Flash
- WiFi 6 & Bluetooth 5.0
- Ultra-low power consumption: ~14ยตA in deep sleep ([Source](https://sigmdel.ca/michel/ha/xiao/xiao_esp32c6_intro_en.html#deep_sleep))
- Note: 14-15ยตA deep sleep current only achievable when power is supplied through battery pins (BAT+ and BAT-)
- 11 Digital/Analog pins
- USB-C interface
- โ ๏ธ May experience reduced WiFi range due to integrated PCB antenna
- Consider ESP32 C3 variant with external antenna for better signal strength
- Signal strength highly dependent on enclosure material and placement### Pin Differences Between C3 and C6
### Power Consumption Comparison
- โก **Deep Sleep Current**:
- XIAO ESP32 C6: ~25ยตA total
- 14.3ยตA from ESP32C6 core ([Source](https://sigmdel.ca/michel/ha/xiao/xiao_esp32c6_intro_en.html#deep_sleep))
- ~11ยตA from all peripheral devices in standby (RTC, sensors, etc.)
- XIAO ESP32 C3: Higher deep sleep current (~43ยตA, tested)
- XIAO ESP32 S3: Potentially lower deep sleep current (~11.9ยตA, untested)
- Not used due to project's modest performance needs
- Could be viable alternative for maximum battery life๐ก Sensors & Connectivity
### Sensors
- ๐ก๏ธ TMP117 High-Precision Temperature Sensor
- ยฑ0.1ยฐC (max) from -20ยฐC to +50ยฐC
- 16-bit resolution (0.0078ยฐC)
- Low power: 3.5ยตA in shutdown mode
- Temperature range: -55ยฐC to +150ยฐC
- ๐จ Bosch BME680 Environmental Sensor
- Humidity: ยฑ3% accuracy
- Pressure: ยฑ0.6 hPa absolute accuracy
- Gas sensor for air quality
- Temperature range: -40ยฐC to +85ยฐC
- ๐ก BH1750 Light Sensor
- 1 - 65535 lux range
- 16-bit resolution
- Spectral responsivity close to human eye
- Low power: 120ยตA active mode
- โฐ DS3231 RTC Module
- Accuracy: ยฑ2ppm (ยฑ0.432 sec/day)
- Temperature compensated crystal
- Battery backup support
- -40ยฐC to +85ยฐC operating rangeโก Power System
### Power & Display
- ๐ IFR26700 LiFePO4 Battery
- Nominal voltage: 3.2V
- Capacity: 4000mAh (8000mAh total with 2 cells)
- Cycle life: >1000 min. cycles
- Size: 26mm ร 70mm
- Max discharge current: 8A
- Operating temperature: -20ยฐC to +60ยฐC
- Self-discharge rate: <3% monthly
- Battery critical threshold: 30%
- Higher threshold significantly increases battery lifecycle ([Source](https://batteries.intercel.eu/knowledge-center/battery-technology/lithium-batteries/lifepo4-batteries/#:~:text=LiFePO4%20batteries%20last%20more%20than,continue%20where%20other%20batteries%20stop.))
- Urges to recharge at 30% remaining capacity
- Preserves cell health for longer service life
- Implemented in firmware via critBattPercent constant- โก TP5000 Charging Module
- Input voltage: 4.5-8V
- Charging current: 1000mA (adjustable)
- Charging accuracy: ยฑ1.5%
- LiFePO4 mode: 3.6V cutoff
- Over-voltage protection
- Temperature protection
- Short circuit protection- ๐ Waveshare 4.2" E-Paper Display
- Resolution: 400ร300 pixels
- Three colors: Black, White, Red
- Active area: 84.8mm ร 63.6mm
- Refresh time: 15 seconds
- Viewing angle: >170ยฐ
- Operating voltage: 3.3V
- Ultra-low power consumption
- No backlight needed
- SPI interface๐ Display & Ghosting
### E-Paper Display Ghosting
- ๐ป **Ghosting Issue**: Even after using full scan/update mode, ghosting can occur
- Red lines may appear over black background
- Occurs when same elements stay static for extended periods
- ๐ก๏ธ **GhostProtek Mode**
- Automatically inverts display colors periodically
- Activates after predetermined number of boots
- Prevents static elements from burning in
- Helps maintain display longevity
- Experimental feature to reduce ghosting artifacts## ๐ง Setup & Configuration
### Initial Setup
1. ๐ฑ Power on the device
2. ๐ Connect to `WCLOCK-WIFI-MANAGER` WiFi network
3. ๐ Navigate to the IP address shown on the display
4. โ๏ธ Enter your WiFi credentials
5. ๐ Device will restart and connect to your network### API Configuration
- ๐ OpenWeatherMap API key required
- ๐ Custom API support for personal weather station
- ๐ Configurable location (latitude/longitude)### Debug Mode
- ๐ Enable via DEBUG_PIN (D6)
- ๐ Shows network diagnostics
- ๐ Displays detailed error messages### Power Management
- ๐ Battery voltage monitoring
- โก Configurable sleep intervals (default: 15 mins)
- ๐ Night mode with reduced updates
- ๐ Low battery failsafe mode### Display Modes
1. Normal Mode
- Full weather data
- Temperature, humidity, pressure
- Moon phase and weather icons
- Sunrise/sunset times
2. Limited Mode (Low Battery)
- Basic temperature display
- Battery status
- Time and date
3. Night Mode
- Display sleeps when dark
- 5-minute wake intervals
- Power saving features### Software Updates
- ๐ **Current Update Method**:
- No OTA (Over-The-Air) updates due to memory constraints
- Manual update process required:
1. Turn OFF the clock using flip switch
2. Press and HOLD the debug button (D6)
3. While holding debug button, turn ON the clock
4. It will disable sleep
5. Release debug button when display starts to refresh
6. Display will show temperature and then "DEBUG MODE" (No need to wait for this)
7. Connect to PC via USB-C cable
8. Upload new code using Arduino IDE## ๐ฟ Environmental Impact
### ๐ Power Efficiency
- ๐ฑ No backlight needed
- ๐ค Smart sleep modes
- โก Low power sensors
- ๐ Ambient light detection### โป๏ธ Sustainability
- ๐ฑ Eco-friendly batteries
- ๐ฆ Recycled materials
- ๐ Long lifecycle
- ๐ Low carbon footprint## โ ๏ธ Important Notes & Warnings
### ๐ DS3231 Battery Safety โก
Most DS3231 modules are sold with CR2032 or similar cells which are not rechargeable. If you are using a non-rechargeable cell then **REMOVE** either the resistor or the diode marked in the above image.### ๐ TP5000 Charging Configuration โก
**IMPORTANT**: There are some misinformation over internet regarding the charging mode of TP5000. If you are using LiFePO4 cells with TP5000 then **DO NOT** short the above marked area with caption F.### Battery Configuration Safety
- ๐ **Parallel Cell Configuration**: While this project uses two LiFePO4 cells in parallel, this is generally not recommended with TP5000 or similar charging circuits
- Currently safe due to verified cell balance
- Long-term balance cannot be guaranteed
- Only implemented due to ultra-low current draw### Power Management Considerations
- โก **Current Draw**: This project's extremely low current consumption (well below rated cell capacity) makes the parallel configuration safer
- ๐ก๏ธ **Protection**: Always use proper BMS protection for your cells
- ๐ **BMS Setup**: Due to limited 1S LiFePO4 BMS availability:
- Using 4.2V BMS for 2.5V cutoff protection (Low Discharge Cutoff)
- TP5000 connected directly to cells for proper 3.6V charging
- This is a temporary solution until better 1S LFP BMS options become available### USB Charging Safety
- โก **USB Connection Warning**: Disconnect battery when connecting USB to ESP32C6
- XIAO modules are designed for LiPo/Li-ion batteries (4.2V charging)
- Not compatible with LFP battery charging (3.6V required)
- Dedicated USB-C module recommended
- Connect USB-C module output to TP5000 input
- Detailed schematics will be provided later
- Simple setup despite complex explanation### Voltage Compatibility
- โ **Operating Range**:
- All components work perfectly with LFP's lower voltage
- Tested operational down to 2.8V
- No impact on battery life or performance
- LFP cells maintain stable 3.2V for extended periods
- 6+ months of testing
- Components designed for wide voltage range operation### Enclosure Design
- ๐จ **Ventilation Requirements**:
- Proper air vents are crucial
- Ensures accurate sensor readings
- Prevents heat buildup
- Essential for environmental monitoring
- ๐ง **Sensor Orientation**:
- TMP117 and BME680 must be mounted horizontally
- Sensors should face downward
- Prevents dust and particle accumulation
- Ensures accurate long-term readings> โ ๏ธ **Please consider these points carefully before replicating this setup. Battery safety is crucial!**
## ๐ค Contributing
[](http://makeapullrequest.com)
[](https://github.com/desiFish/ESP32-ePaper-Display-Weather-Clock/graphs/contributors)## ๐ License & Credits
### ๐ License
GNU General Public License v3.0
- โ Freedom to use commercially
- โ Freedom to modify
- โ Freedom to distribute
- โ Must be open source
- โ Must preserve copyright
- โ Must use same license> ๐ **Attribution Request**: If you use this code in your project, please include a link to this repository. Your support through attribution helps maintain and grow our open-source community. Thank you!
>
> ```markdown
> Based on [ESP32 E-Paper Weather Clock](https://github.com/desiFish/ESP32-ePaper-Display-Weather-Clock) by desiFish
> ```### ๐ Credits
- ๐จ Weather icons by SeBassTian23
- ๐ GxEPD2 Library
- ๐ป Community Contributors---
### Made with ๐ and โป๏ธ materials
[](https://github.com/desiFish/ESP32-ePaper-Display-Weather-Clock/stargazers)