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