Project Description
[Many thanks to LCSC EDA for their Spark Program]
ColorfulClock, also known as ColorfulPixel, is inspired by the AWTRIX pixel clock, but differs from AWTRIX in that it supports WiFi, ML302 (4G_MODULE), offline operation, and satellite E108-GN02D (BDS/GPS/GLONASS), etc. The display uses a WS2812 + 1.14' TFT dual display for text, animated images, and other functions.
[Note: This project is currently implemented using the Arduino library, so you can call me a novice library builder~~ O(∩_∩)O]
[***This project will continue to be developed, and ESP-IDF will be used later***] 2023/09/13
Open Source License
GPL-3.0
Project Functionality
ColorfulClock's main function is as a desktop clock that can change the clock display state based on the user's actual geographical location (achieved through a roughly approximate location via IP address) and weather conditions. For example: When the weather is sunny: a 4x4 mini sun symbol is displayed in the upper right corner; rainy or snowy weather displays thumbnails of the corresponding weather icons, etc.
The TFT screen on the left can display more detailed content, such as: real-time weather status, weather icons, personal memos, date, countdown, lunar calendar, etc. [Additions can be made according to your needs].
WiFi: As the main interface for obtaining relevant information, the reception duration, information type, etc. can be customized.
ML302 (4G_MODULE): When WiFi fails to update data multiple times, it automatically calls and obtains relevant information to wait for WiFi connection. [In actual use, the 4G power consumption seems higher than WiFi? This may be due to some settings issues.]
E108-GN02D (BDS/GPS/GLONASS): When WiFi fails to update data multiple times, it automatically calls and obtains relevant information to wait for WiFi connection. [Like the 4G module, it uses serial communication, only the command set is different.] !! Another useful satellite module has been discovered, which can be used for time synchronization [positioning using multiple satellite systems, compensating for the inaccuracy of IP positioning]!
Audio: A 4Ω 3W speaker has been added, using I2S to play audio (audio can be customized, played offline, and played online) [it can play independently, but not when integrated].
SD Card: Since it uses an ESP32S3 N16R8 module, its storage space is sufficient for general operations, so the SD card function has not been greatly expanded, only basic functions have been implemented.
Project Attributes :
This project is being publicly disclosed for the first time and is my original work. This project has not won any awards in other competitions.
Project Progress:
Hardware design is complete, and no bugs have been found after verification.
Code integration is complete.
It is open source; the attached compressed package contains all the materials for this project.
Design principles
for a fully functional desktop ornament? (A novice's self-redemption
attempt using the ESP32S3 (a domestically produced mainstream IoT controller with built-in WiFi and BLE), periodically acquiring necessary information via WiFi, parsing it, and displaying it through a WS2812 matrix. A TFT screen is used for auxiliary display (the actual 1.14" screen is found to be too small; a larger screen may be designed later).
The China Mobile ML-302 module communicates with the ESP32S3 using AT commands, automatically switching and acquiring data when WiFi fails.
!!! Another useful satellite module was discovered, which can be used for time synchronization [multiple satellite systems for positioning, compensating for the inaccuracy of IP positioning]!!! --> E108-GN02D (BDS/GPS/GLONASS)
The ESP32S3 has 16M Flash and 8M PSRAM built-in, which can store some local documents for offline use.
An SD card circuit was also designed in this project to read SD cards . The text, video, and audio functions on the card only implement basic functions and are not extended.
I tried using the built-in I2S to output and play audio (I'll add online audio playback functionality later, similar to an online karaoke system?). It plays independently, but not when integrated; perhaps my inexperienced library tuning method is failing??? ---
The software
code is open source; see the attachment for details.
I used Clion for development, using the PlatformIO + Arduino framework. Crazy library tuning!
I'm a library tuning novice!
There's a problem with the ESP-IDF driver for the ST7789V; it only displays the backlight, not the image, possibly due to a configuration error…%¥@ (
Let's verify with PlatformIO + Arduino for now…)
Special reminder!!!
Because I'm such a novice, I cannot completely guarantee that the program code will be bug-free during the library tuning process and after integration. After all, code and people… If one of them works, great! QvQ 3D
physical demonstration.
Rendered back panel (Don't ask me why the display panel
wasn't removed from the edge of the process panel ; the one on the right is the 1.14" small screen (too small). RGB unordered verification . Effect after RGB + LVGL integration: Boot screen with all LEDs lit, gradient color display, rainbow transition color display, random LED gradient display, temperature display , left icon + clock display, right icon + clock display , clock display, night clock display , secondary screen bar chart display, secondary screen system status display, secondary screen calendar display, secondary screen weather status display. Design Notes: ColorfulClock can also be called ColorfulPixel, so the two are equivalent. Note!!! Try not to light up all LEDs at once unless you are using a 5V4A power supply!!!! Rechargeable batteries can be purchased on Taobao for RMB 2.5 each (In actual use, it was found that the battery drains quickly after the main power supply is cut off, and cannot provide enough backup power for the DS3231; I don't understand why yet?). TFT screens can be purchased on Taobao, but currently, 1.14" (RMB 8.5) is a bit too small and strains the eyes TAT. Other
Project includes the following files:
ColorfulClock (also known as ColorfulPixel)
README -> File Description
ColorfulPixel_Firmware -> Source Code [Developed using Clion]
MyFont_Resources -> Text TTF Library
MyUi_Resources -> Squareline LVGL Library
QWeatherUi_Resources -> Weather Library
RelatedLibraries -> Software Related Libraries
RelatedResources -> Hardware Related Files
ColorfulPixelSCH -> Schematic Related Files
WS2812B_Pixel -> Pixel Generation Principle [Beginner-Friendly Version]
ColorfulPixel_3D -> 3D Model and Shell Files
Other -> Project Related Files
Project Attachment Size: 238MB [Exceeds the maximum upload size, so only the source code and pixel generation principle are included on this page for easy download]
Project Attachment Address: Link: https://pan.quark.cn/s/144b9535601e Extraction Code: mLDf
Enjoy It's finished!
Hooray! *★,°*:.☆( ̄▽ ̄)/$:*.°★* .
Once again, a huge thank you to LCSC EDA for their Spark Program.