https://github.com/desiFish/EPaper-Display-NTP-Clock
E-Paper Display based efficient NTP Clock
https://github.com/desiFish/EPaper-Display-NTP-Clock
32650 arduino arduino-ide bh1750 bms clock ds3231 e-paper e-paperdisplay esp32 lifepo4 lifepo4-battery ntp smart-clock temperature-sensor tp5000 usbc waveshare-epaper xiao-esp32-c3 xiao-esp32c6
Last synced: about 2 months ago
JSON representation
E-Paper Display based efficient NTP Clock
- Host: GitHub
- URL: https://github.com/desiFish/EPaper-Display-NTP-Clock
- Owner: desiFish
- License: gpl-3.0
- Created: 2024-06-07T07:11:10.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2025-01-29T05:08:25.000Z (4 months ago)
- Last Synced: 2025-02-13T22:17:44.895Z (3 months ago)
- Topics: 32650, arduino, arduino-ide, bh1750, bms, clock, ds3231, e-paper, e-paperdisplay, esp32, lifepo4, lifepo4-battery, ntp, smart-clock, temperature-sensor, tp5000, usbc, waveshare-epaper, xiao-esp32-c3, xiao-esp32c6
- Language: C++
- Homepage: https://iotthings.pythonanywhere.com/
- Size: 21.9 MB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
> ๐จ **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.
๐ฏ System Specifications
๐ฅ๏ธ Core Components
๐ง Microcontroller
Xiao ESP32 C3 (Compatible with most ESP32 boards)
๐บ Display
3.52" BiColor E-paper (360x240)
๐ Power Source
LiFePO4 6000mAh 3.2V
โก Power Specifications
Operating Voltage
~3.2V
Sleep Duration
60 seconds
Battery Thresholds
๐ High: 3.4V
๐ Low: 2.9V
๐ Communication
I2C Speed
400kHz (Fast Mode)
NTP Server
asia.pool.ntp.org
Time Offset
19800 (India, UTC+5:30)
## ๐ ๏ธ Hardware Components ๐ฉ Parts List
Component
Specifications
Details
Xiao ESP32 C3
โข MCU: ESP32-C3 RISC-V
โข Clock: 160MHz
โข RAM: 400KB SRAM
โข Flash: 4MB
โข WiFi: 2.4GHz
โข Bluetooth: BLE 5.0
โข GPIO: 11 pins
โข Size: 21x17.5mm
โข Deep Sleep: ~43ยตA (when powered via BAT pins)
โข Note: Deep sleep current specified when battery connected to BAT pins
Ultra-compact IoT controller with low power consumption and built-in wireless capabilities. ESP32 C6 variant achieves ~14ยตA in deep sleep.
Waveshare 3.52" E-Paper
โข Resolution: 360x240
โข Colors: BiColor
โข Refresh: 1.5 secs
Display unit with low power consumption
BH1750
โข I2C Address: 0x23
โข Mode: ONE_TIME_HIGH_RES
โข Precision: 1-65535 lux
Ambient light sensor for night mode
DS3231
โข Accuracy: ยฑ2ppm
โข Temperature comp.
โข Battery backup
Real-time clock for timekeeping
IFR32650 LiFePO4
โข Model: IFR32650
โข Capacity: 6000mAh
โข Voltage: 3.2V nominal
โข Chemistry: LiFePO4
โข Cycle Life: >2000 cycles
โข Size: 32x65mm
โข Max Discharge: 2C
โข Temperature Range: -20ยฐC to 60ยฐC
โข Self-discharge: 3% per month
High-capacity, safe chemistry battery with long cycle life and stable voltage output
TP5000
โข Input: 5V USB
โข Output: 3.2V
โข Current: Up to 2A
Battery charging module
USB-C Breakout
โข USB 2.0 Compatible
โข 5V Input
โข Data lines available
Power input and debugging interface## ๐ซ Key Features โจ
โก๏ธ
Power Efficient
๐
Night Mode
๐
Auto Update
๐
Battery Monitor
60s Deep Sleep
Light Sensor Based
Daily NTP Sync
Voltage Tracking
## ๐ System Architecture ๐
```mermaid
graph TD
A[Wake Up] --> B{Check Light}
B -->|Dark| C[Sleep Mode]
B -->|Light| D[Update Display]
D --> E{Battery OK?}
E -->|Yes| F[Update Time]
F --> G[Update Display]
G --> H[Deep Sleep]
```## ๐ Quick Start ๐ฏ
Prerequisites
```yaml
Required Libraries:
- Check header section inside .ino file
- OEM Display Libraries (Included)
```Installation Steps
1. Clone repository
2. Configure WiFi:
```cpp
const char *ssid = "Your_SSID";
const char *password = "Your_PASSWORD";
```
3. Update pins in `src/epdif.h`
4. Upload code## ๐ Battery Performance โก
๐ Battery Life Analysis - Test #1 (With ESP32 C3)
Start Date
End Date
Runtime
Status
June 6, 2024
November 1, 2024
4 months 27 days
โ Completed
Performance Metrics
๐ Initial Voltage: 3.6V
๐ Final Voltage: ~2.84V
๐ก๏ธ Temperature Range: 17-38ยฐC
๐ Battery Life Analysis - Test #2
Start Date
End Date
Runtime
Status
November 1, 2024
Coming Soon
In Progress
โณ Running
Performance Metrics
๐ Initial Voltage: 3.6V
๐ Final Voltage: TBD
๐ก๏ธ Temperature Range: Monitoring...
๐ Battery Life Analysis - Test #1 (With ESP32 C6)
Start Date
End Date
Runtime
Status
Coming Soon
Coming Soon
Coming Soon
Coming Soon
Performance Metrics
๐ Initial Voltage: 3.6V
๐ Final Voltage: TBD
๐ก๏ธ Temperature Range: Coming Soon
## ๐ธ Gallery ๐ผ๏ธ
Front 1
Side 1
Back
Front 2
Inside 1
Inside 2
Inside 3
ESP32 C3 & C6
## โ๏ธ Development ๐ง
Build Requirements
- ๐ป Arduino IDE 2.3.x or newer (tested)
- ๐ฆ ESP32 Board Support Package
- ๐ง USB-C cable for programming
- ๐ Required libraries (see Prerequisites)Debug Tips
- ๐ Serial Monitor: 115200 baud
- ๐ Test points available for voltage monitoring (just lift the cover)## ๐ Connectivity ๐ก
- ๐ก WiFi6 2.4GHz
- ๐ NTP synchronization
- ๐ Daily updates
- ๐ค Auto sleep when inactive## ๐ฌ Technical Details ๐
- ๐ ADC Resolution: 12-bit
- โก I2C Speed: 400kHz
- ๐ Power Modes:
- ๐ข Active
- ๐ค Deep Sleep## โ ๏ธ 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 โก
There are some misinformation over internet regarding the charging mode of TP5000. If you are going to use LiFePO4 cell with TP5000 then **DO NOT** short the above marked area with caption F.### ๐ Battery Configuration Safety ๐ก๏ธ
### Power Management Considerations
- โก **Current Draw**: This project's extremely low current consumption (well below rated cell capacity) makes the cell 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 the cell 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 ESP32C3
- 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> โ ๏ธ **Please consider these points carefully before replicating this setup. Battery safety is crucial!**
---## ๐ License ๐
GNU General Public License v3.0
This project is licensed under the GNU GPL v3.0 - see below for details:
- โ Commercial use
- โ Modification
- โ Distribution
- โ Patent use
- โ Private use#### Limitations
- โ ๏ธ Liability
- โ ๏ธ Warranty
- โน๏ธ License and copyright notice required
- โน๏ธ State changes
- โน๏ธ Disclose source
- โน๏ธ Same license[Read full license](/LICENSE)
## ๐ค Contributing ๐ฅ
We welcome contributions! Here's how you can help:1. ๐ Fork the repository
2. ๐ฟ Create your feature branch (`git checkout -b feature/AmazingFeature`)
3. ๐พ Commit your changes (`git commit -m 'Add some AmazingFeature'`)
4. ๐ Push to the branch (`git push origin feature/AmazingFeature`)
5. ๐ Open a Pull Request### Pull Request Guidelines
- โ Clear description of changes
- โ Test your changes thoroughly
- โ Update documentation if needed
- โ Follow existing code style
- โ Add comments where necessary
---Made with โค๏ธ and โป๏ธ materials by ๐ Earth-conscious developers