How titaniumc-wwt/3.7inch-eink works
Project Type and Core Purpose
• This is an embedded hardware project centered around a handheld electronic book device. It combines hardware design (PCB, 3D printed parts, BOM) with embedded firmware development (code for ESP32, display drivers, sensor interfacing).
• The README details that the device includes an ESP32 (WROOM32UE), an e-ink display, audio amplifier, clock chip (RX8025), temperature/humidity sensor (SHT30), and user input (physical buttons).
File Structure to Determine Key Modules
• There are separate directories for:
– PCB and 3D printing files (“PCB_Make_Dir” and “3D_PrintFile”) that represent the physical hardware design.
– Source code (“Code” folder and the compressed archive Code.7z) which contains the firmware (main.cpp, peripheral headers like WifiConnect.h, SDcardcontrol.h, and display fonts/assets).
– Additional ZIP files that bundle PCB design (Altium files, ProProject...) and hardware libraries (mhetesp32devkit.7z).
• The presence of BOM.xlsx reinforces the details of component selection, vital for the hardware sub-architecture.
Out the Main Components
a. Hardware Platform:
– ESP32 WROOM32UE: The central microcontroller managing device logic.
– Peripheral Circuits: Include audio (MAX98357 amplifier and the 1511 speaker), clock (RX8025T), environmental sensor (SHT30), e-ink display (OKRA 3.7-inch black/white), battery management (TP4055 with battery), and user input (three physical buttons).
b. Firmware/Software:
– Main application code (main.cpp) which orchestrates system behavior.
– Peripheral driver modules (captured in files like SDcardcontrol.h, WifiConnect.h) that facilitate hardware interfacing.
– Graphics and font rendering (referenced from _u8g2_font_wqy15_t_gb2312.c and img.h).
c. Supporting Assets:
– PCB design files (from PCB_Make_Dir, Altium zip) and 3D printing files for the casing.
– BOM that acts as a blueprint for component selection and physical layout.
Relationships and Interactions in the Architecture
– Data/control lines to the e-ink display (graphics update, refresh signals).
– Audio controls feeding into the MAX98357 amplifier and out to the speaker.
– Communication with the RX8025T RTC module for timekeeping.
– Sensor data reading from the SHT30.
– Battery management circuits and charging module communications (TP4055, battery status).
– Physical input devices (the three buttons) interacting with the ESP32.
• Additionally, denote how the firmware components interact with these hardware interfaces. For example, illustrate that main.cpp calls routines in WifiConnect.h (if WiFi features are used), SDcardcontrol.h (for storage access), and display routines linked to the graphics library.
Architectural Patterns and Design Principles
– Physical hardware components versus the firmware software stack.
– Modular design of the code (how drivers and main application logic are separated).
• Design choices that optimize power (long standby in clock mode) and the integration of multiple roles (ebook display, audio playback, sensor monitoring).
Detailed Elements
• For the firmware side, include modules such as a “Display Driver,” “Audio Module,” “Sensor and RTC Controller,” and “System Manager/Main Loop.”
• External files and design documents (PCB designs, 3D printing files, BOM) as ancillary documentation modules or layers that support the physical assembly.
– Begin by outlining the overall project: a small handheld eBook device combining embedded hardware with firmware functions.
– Detail every major hardware module (ESP32, display, sensors, audio, power management, input) and map out the firmware layers/modules contained in the Code directory.
– Separate hardware and software, but also illustrate how design files (PCB, 3D printing) and BOM contribute to the system.