An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

        


๐ŸŒก๏ธ Minimalistic E-Paper Weather Station









Status
License
GitHub Issues
Release



๐ŸŒˆ 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
![Optimization](https://img.shields.io/badge/Power-Optimized-success?style=for-the-badge)
![CPU](https://img.shields.io/badge/CPU-Monitored-blue?style=for-the-badge)
![Efficiency](https://img.shields.io/badge/Efficiency-Enhanced-green?style=for-the-badge)

๐Ÿš€ 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 | ![Status](https://img.shields.io/badge/22s-Normal-blue) |
> | Sleep-Active-Sleep | ~20s | ![Status](https://img.shields.io/badge/20s-Expected-green) |
> | Sleep-to-Sleep | <1s | ![Status](https://img.shields.io/badge/<1s-Optimal-success) |
>
> โœจ **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 Normal Mode




Clock Power Conserved Mode

Clock Power Conserved Mode




Side View 1

Side View 1






Back View

Back View




Side View 2

Side View 2




Top View

Top View






ESP32 Compared

ESP32 Compared




Testing

Testing




Integration

Integration






Mainboard Front

Mainboard Front




Internal 1

Internal 1




Internal 2

Internal 2






Facelift Clock

Facelift Clock




LiFePO4 Cell 4000mAh

LiFePO4 Cell 4000mAh




Mainboard Back

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



Source: sigmdel.ca


### 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

[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)
[![Contributors](https://img.shields.io/github/contributors/desiFish/ESP32-ePaper-Display-Weather-Clock.svg?style=flat-square)](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


[![Star This Project](https://img.shields.io/github/stars/desiFish/ESP32-ePaper-Display-Weather-Clock?style=social)](https://github.com/desiFish/ESP32-ePaper-Display-Weather-Clock/stargazers)