Skip to content

desiFish/ESP32-ePaper-Display-NTP-Clock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

63 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌟 Minimalistic E-Paper NTP-RTC Clock πŸ•’

Status License GitHub Issues Release

🚨 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 πŸ”„

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]
Loading

πŸš€ Quick Start 🎯

Prerequisites
Required Libraries:
  - Check header section inside .ino file
  - OEM Display Libraries (Included)
Installation Steps
  1. Clone repository
  2. Configure WiFi:
const char *ssid = "Your_SSID";
const char *password = "Your_PASSWORD";
  1. Update pins in src/epdif.h
  2. 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

🀝 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