DIY ESP32 E-Paper Clock: A Cost-Effective Open Source Project

DIY ESP32 E-Paper Clock: A Cost-Effective Open Source Project

Project Name: [LiClock] E-Paper Clock

Project Author: lxy0423

Introduction

Today, I found a very beginner-friendly, fully functional, and cost-effective E-Paper open-source project!

Project Description

I created a 2.9-inch E-Paper weather clock based on ESP32, with all circuit codes open source!

The E-Paper screen is developed using PlatformIO/Arduino!

DIY ESP32 E-Paper Clock: A Cost-Effective Open Source Project

Why do I say it is fully functional?

How to design hardware and software to achieve the ideal effect?

What are the precautions for replication?

What is the specific cost?

Scroll down to unlock the answers!

Project Features

The project feature introduction is divided into – basic features, secondary development features, and safety “guarantee” features.

Basic Features (9)

Display Weather

Get local weather through the Color Cloud Weather API

Left image: main page, shadow part shows precipitation

Right image: warning information, press any key to return

DIY ESP32 E-Paper Clock: A Cost-Effective Open Source Project
DIY ESP32 E-Paper Clock: A Cost-Effective Open Source Project

Display Time

Use the internal RTC of ESP32 to provide clock signals, with linear offset compensation through two NTP synchronizations, achieving a daily error of less than 2 seconds

Built-in Web Server

For configuring weather locations, managing internal files, etc.

Built-in GUI Framework

Includes dialog boxes, menus, etc.

DIY ESP32 E-Paper Clock: A Cost-Effective Open Source Project

E-Book

DIY ESP32 E-Paper Clock: A Cost-Effective Open Source Project

Bilibili Follower Display

Once you have the cookies, the rest of the features depend on everyone.

Bilibili QR code login:

DIY ESP32 E-Paper Clock: A Cost-Effective Open Source ProjectSimple Bilibili follower count display interface:

DIY ESP32 E-Paper Clock: A Cost-Effective Open Source Project

Settings Menu

DIY ESP32 E-Paper Clock: A Cost-Effective Open Source Project

Alarm Clock

Built-in Development Environment

Includes dialog boxes, menus, etc.

Automatic Peripheral Detection

Can be used to check if the sensors are soldered correctly.

DIY ESP32 E-Paper Clock: A Cost-Effective Open Source Project

Secondary Development (4)

This project focuses on ease of use and secondary development:

Automatic Identification of Compiled CPP Files

The system framework decouples from the APP, each “App” source code is a single cpp file,copied to the app directory for automatic identification and compilation and added to the APP list without any other modification operations.

TF cards, sensors, and other peripherals are automatically identified on the first boot,managed by the system, and powered off automatically when not in use (sensors enter power-saving mode)

APP Power Consumption is the Same

APP is event-driven with a relatively complete GUI framework, which can quickly realize the desired functions.

Additionally, built-in apps like eBook App consume the same power as when the screen is not refreshed and in shutdown state

Note: The GUI framework will not enter sleep mode while waiting for user input

No Manual Configuration Required

No manual clock setting error correction is required, no manual Bilibili UID configuration (mobile scan login) is needed, just fill in the weather GPS coordinates (GCJ-02) and WiFi password

DIY ESP32 E-Paper Clock: A Cost-Effective Open Source Project

For those who cannot configure the environment, a fully functional binary file is provided, which can be directly burned to run and experience all functions

Built-in Lua Language Interpreter

Built-in Lua language interpreter and Google Blockly development environment

Can write APP using lua language, uploaded via the web can run directly, seamlessly added to the App list, set as the main screen App, etc.

Safety and Stability (3)

In terms of safety and stability:

Power Automatic Switching Circuit

No need to worry about dangers caused by battery cycle charging and discharging

Automatic Shutdown on No Operation

Avoid battery depletion

Only limited to the app selection interface and network reconfiguration interface, other places that require user confirmation will not automatically sleep

Battery Detection Function

If you encounter an infinite reboot situation, press and hold the left key, then press the reset button on the back. This will immediately turn off the device to avoid frequent refreshes burning the screen

Hardware Description

The hardware part is quite simple, mainly showing the schematic diagram:

DIY ESP32 E-Paper Clock: A Cost-Effective Open Source Project

Main Control Schematic

DIY ESP32 E-Paper Clock: A Cost-Effective Open Source Project

E-Paper Schematic

DIY ESP32 E-Paper Clock: A Cost-Effective Open Source Project

Power Schematic

DIY ESP32 E-Paper Clock: A Cost-Effective Open Source Project

USB Schematic

DIY ESP32 E-Paper Clock: A Cost-Effective Open Source Project

Optional Function Schematic

DIY ESP32 E-Paper Clock: A Cost-Effective Open Source Project

PCB Diagram

Software Description
System Composition

DIY ESP32 E-Paper Clock: A Cost-Effective Open Source Project

Overall Block Diagram

① The AppManager class manages the lifecycle of all apps (including Lua Apps).

② The HAL class is for hardware-related functions, providing services such as automatic WiFi connection, NTP synchronization, etc.

③ The Peripheral class manages installed peripherals, while turning on/off peripheral power as needed during app execution (or entering/exiting power-saving mode).

④ The Lua interpreter interprets and runs Lua Apps, enabling dynamic addition and deletion of apps.

⑤ FreeRTOS is the real-time operating system provided by ESP-IDF, mainly used here to implement multithreading.

System Tasks

The system mainly runs the following three tasks:

DIY ESP32 E-Paper Clock: A Cost-Effective Open Source Project

① AppManager: Used for executing App code, determining the next sleep time

② HAL: Automatically updates time and battery voltage, and processes button events

③ Lua Debug: Creates while debugging Lua on the web, facilitating immediate termination of program execution when needed, while preventing the Lua process from blocking the web server

The system initialization steps are as follows:

DIY ESP32 E-Paper Clock: A Cost-Effective Open Source Project

Blockly IDE Tutorial

The purpose of developing this feature is to solve the problem of customizing dials.

Code can be modified at any time, share projects with each other, reduce the compilation upload time required for debugging.

The web version (you can directly edit Lua code on the right):

DIY ESP32 E-Paper Clock: A Cost-Effective Open Source Project

Lua running results:

DIY ESP32 E-Paper Clock: A Cost-Effective Open Source Project

The created Apps can be uninstalled or installed from the TF card, and they work just like the built-in Apps (the built-in Apps are based on C++).

App Creation:

DIY ESP32 E-Paper Clock: A Cost-Effective Open Source Project

File Management:

DIY ESP32 E-Paper Clock: A Cost-Effective Open Source Project

Preview “lbm” image files:

Essentially it is the lbm binary version, which can be saved as XBM using GIMP, and then use the xbm to lbm tool in the tools directory of the GitHub project.

DIY ESP32 E-Paper Clock: A Cost-Effective Open Source Project

① Lua has implemented relative directories:If you need to access resource files, please place them in the webtmp folder, which will be copied during App creation, supporting . to represent the current directory, but not supporting .. folders.

② SD card mounts to /sd/, built-in littlefs mounts to /littlefs.

③ The buzzer supports playing .buz files: The python program for converting midi to buz is also placed in the tools directory on GitHub.

More Lua functions are being added, and everyone is welcome to contribute their code or project files.

DIY Precautions

① This BOM is very complete, you can buy directly!If you see a 10k resistor in a 0402 package, it means I wrote it wrong, you need to buy 0603!!

If you want cost-effectiveness: The schematic diagram “optional functions” only needs to solder the TF card and buzzer parts, the two large tantalum capacitors can also be left unsoldered, ESP32 can use the ESP32-solo-1 module, 4MB of Flash space is enough.

③ Do not connect the FPC with cold soldering, do not reverse the battery, finally measure the ESP32 power supply is normal before soldering the ESP32.

After soldering, burn the program, and follow the OOBE configuration, no need to register any additional accounts (registering a Lichuang account and giving a thumbs up is also okay).

The compiled firmware may be released later. Other files are all open source, copy the link to get the open source information:
https://oshwhub.com/lxu0423/ESP32-duo-gong-neng-mo-shui-ping#

DIY ESP32 E-Paper Clock: A Cost-Effective Open Source Project

Cost Description

The minimum cost can be around 40 yuan.

Prerequisite: Only solder the necessary components, buy the screen from dismantling on Xianyu, excluding common capacitors and resistors, buying from Taobao costs 28 yuan with free shipping, the screen on Xianyu costs 6 yuan without shipping.

The maximum estimate is over 70 yuan.

Prerequisite: All sensors and high-precision clock chips are soldered.

The cost does not include the price of batteries and 3D printed cases.

Because the battery used now is a dismantled battery bought for two yuan.

This project participated in the Spark Plan activity of the Lichuang open-source hardware platform, with materials such as components and SMT reimbursed by the platform.

Open Source Description

This project is publicly released for the first time and is my original project. The project has not won awards in other competitions.

The hardware part open source protocol is CC-BY-SA 3.0, where:

CC: Abbreviation for Creative Commons license. BY: Attribution, you must give appropriate credit, provide a link to this license, and indicate if changes were made. SA: ShareAlike, if you remix, transform, or build upon this work, you must distribute your contributions under the same license as the original.

The source code open source protocol is GPL-3.0, allowing commercial use under open source conditions, but please indicate the original author and project link, and do not sell the source code or publish it as a closed-source project.

Additionally, according to the requirements of the GPL-3.0 protocol, any code derived from this project must also be open-sourced under GPL3.0.

This open source means that anyone can freely and freely obtain, modify the source code and (or) hardware project source files.

More Exciting Recommendations
DIY ESP32 E-Paper Clock: A Cost-Effective Open Source Project
DIY ESP32 E-Paper Clock: A Cost-Effective Open Source Project
DIY ESP32 E-Paper Clock: A Cost-Effective Open Source Project

*This article is a reprint of user creation from the “Lichuang Open Source Hardware Platform”, if there is any infringement, please contact to delete

If you are watching, please give me a thumbs up!
DIY ESP32 E-Paper Clock: A Cost-Effective Open Source Project
Click here to view the original project

Leave a Comment

×