Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

E-Paper Display based efficient NTP Clock

License

NotificationsYou must be signed in to change notification settings

desiFish/EPaper-Display-NTP-Clock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

82 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚨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
🧠 MicrocontrollerXiao ESP32 C6 (Compatible with most ESP32 boards)
📺 DisplayWaveshare 3.52" BiColor (Black and White) E-paper (360x240)
🔋 Power SourceLiFePO4 6000mAh 3.2V
⚡ Power Specifications
Operating Voltage~3.2V
Sleep Duration~60 seconds
Battery Thresholds 📈 High: 3.4V
📉 Low: 2.9V
🔌 Communication
I2C Speed400kHz (Fast Mode)
NTP Serverasia.pool.ntp.org
Time Offset19800 (India, UTC+5:30)

🛠️ Hardware Components🔩 Parts List

ComponentSpecificationsDetails

Xiao ESP32 C6
• MCU: ESP32-C6 RISC-V
• Clock: 160MHz
• RAM: 512KB SRAM
• Flash: 4MB
• WiFi: 2.4GHz (WiFi6)
• Bluetooth: BLE 5.0
• Size: 21x17.8mm
• Deep Sleep: ~16µA (when powered via BAT pins)
Note: Deep sleep current specified when battery connected to BAT pins

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 SleepLight Sensor BasedPeriodic NTP SyncVoltage 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 in src)
Installation Steps
  1. Clone repository
  2. Configure WiFi:
constchar *ssid ="Your_SSID";constchar *password ="Your_PASSWORD";
  1. Update pins insrc/epdif.h
  2. Upload code

🔋 Battery Performance ⚡

📊 Battery Life Analysis - Test #1 (With ESP32 C3)
Start DateEnd DateRuntimeStatus
June 6, 2024November 1, 20244 months 27 days✅ Completed
Performance Metrics
🔋 Initial Voltage: 3.6V
📉 Final Voltage: ~2.84V
🌡️ Temperature Range: 17-38°C

📊 Battery Life Analysis - Test #2 (With ESP32 C3)
Start DateEnd DateRuntimeStatus
November 1, 2024April 2, 20255 months 2 days✅ Completed
Performance Metrics
🔋 Initial Voltage: 3.6V
📉 Final Voltage: 2.79V
🌡️ Temperature Range: 15-36°C

📊 Battery Life Analysis - Test #1 (With ESP32 C6)
Start DateEnd DateRuntimeStatus
April 6, 2025TBDTBDTBD
Performance Metrics
🔋 Initial Voltage: 3.54V
📉 Final Voltage: TBD
🌡️ Temperature Range: TBD

📸 Gallery 🖼️


Front 1

Side 1

Back

Front 2

Inside 1

Inside 2

New UI

ESP32 C3 & C6

New Sleep UI

Inside 4

Inside 5

Inside 6

Circuit Schematic

⚙️ 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
  • 💤 Auto sleep when dark

🌙 Deep Sleep Implementation with DS3231 RTC

⚠️Important Note: No single source provided a complete working solution for deep sleep with DS3231 RTC. This implementation combines key elements from multiple references to create a reliable solution.

The project implements an efficient deep sleep mode using the DS3231 RTC's external alarm feature. This approach significantly reduces power consumption while maintaining accurate timekeeping.

How it Works

  1. The DS3231 RTC SQW pin is connected to GPIO7 (MTDO) (RTC GPIO)
  2. The RTC alarm triggers a signal on the SQW pin
  3. ESP32-C6 wakes up from deep sleep on the falling edge

Key Implementation Points

  • Wake-up Source:esp_sleep_enable_ext0_wakeup(GPIO_NUM_7, 0)
  • Wake Up Interval: 60 seconds (configurable)
  • Current Consumption: ~16µA in deep sleep (for XIAO ESP32C6 only)

References

These sources were combined to create a working implementation:

  1. ESP32 Wake-Up Using DS3231 RTC - Basic RTC alarm setup
  2. XIAO ESP32C6 Deep Sleep Guide - ESP32-C6 specific wake-up configuration
  3. ESP32 External Wake-Up Implementation - External wake-up pin handling

⚠️ 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 ESP32C6 (Use a switch to cutt-off battery)
    • XIAO modules are designed for LiPo/Li-ion batteries (4.2V charging)
    • Not compatible with LFP battery charging (3.6V required)
    • 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 developer


[8]ページ先頭

©2009-2025 Movatter.jp