Write in front:
I am very honored to participate in the second training camp of Tuya Smart and Lichuang EDA. However, it is a pity that due to personal reasons, I did not have much time to complete this project (it is even more regrettable that RTT did not complete it due to lack of time), so this This work was submitted very late...I just came after more than 300 big bosses had submitted the project. This time the work is a desktop ornament, inspired by the famous open source project Awtrix. I am also trying to save money as much as possible, so I decided that an 8*24 dot matrix is enough. The circuit has been basically drawn.
This project is mainly divided into two parts:
1. WS2812 8*24 dot matrix display principle
In fact, it is very simple to arrange the light string that was originally strung into a dot matrix, as shown in Figure 1; then you can use instructions to light up the corresponding LEDs to display any numbers, letters, and patterns (because the dot matrix There are few lines, so only simple graphics or text can be displayed), as shown in Figure 2:
![]() |
![]() |
2. Schematic analysis
As for the lamp beads, I chose WS2812E. The overall circuit part is still very simple. I will explain it by dividing it into four parts according to the schematic layout:
2.1 Power supply part, temperature and humidity sensor, light collection part, buzzer part
As for the power supply, because WS2812 has a 5V voltage, I use 5V power supply, and then use an ordinary LDO A MS1117 for the microcontroller and Tuya module. | The temperature and humidity sensor uses a SHT30 digital temperature and humidity sensor, IIC communication, and a pull-up resistor. | I used a photoresistor to collect light, and then collected it with the microcontroller ADC after dividing the voltage. | The buzzer selected a chip of 85dB and was driven by an S8050 NPN transistor. | This LED is mainly used for debugging when writing programs. |
![]() |
2.2 Tuya module, STM32, user buttons
The Tuya module I chose is WB3S , because it has the same package as the ES12 series, so I also adapted it. In this era of 32mm skyrocketing, you can also use ESP for dot matrix driving. | For MCU, I still chose STM32F103C8T6 (cannot afford the series). Although I cannot afford it, I decided to remove some of the previous boards and use them... Environmentally friendly | This is a simple button. There are 2 buttons set, and the functions can be added through the program. |
![]() |
2.3 Microcontroller peripheral circuit
The first part is the button battery part, which is used to provide RTC power to the microcontroller. | There is nothing much to talk about later, it is all a common process, and the boot can select the program running mode through a resistor. | |
![]() |
2.4 Extend some circuits
The gyroscope uses MPU6050 , IIC communication | The audio amplification uses an inverse amplifier with an adjustable gain of 0-50 to amplify the signal. The signal source can be switched between the microphone and the audio input through SW1. | This touch button uses an AM01B single-channel touch chip |
![]() |
It can be found that in the schematic diagram, there are two chips (SHT30 and MPU6050) that communicate through IIC, so we need to find the address of each chip in the data sheet , as follows:
Page 9 of the SHT30 data sheet lists a table. When the ADDR pin is low, the address is 0x44 (default); when it is high, the address is 0x45. I am grounding here, so when writing the program, the slave address is 0x44. . | On page 15 of the MPU6050 data sheet, when the AD0 pin is low, the address is 0x68, and when it is high, the address is 0x69. In my schematic, it is grounded, so when writing the program, the address is 0x68. |
![]() |
![]() |
3. PCB design
![]() |
![]() |
PCB bottom layer | PCB top layer |
![]() |
![]() |
3D front | 3D back |
4. Physical construction
Below is a board that was soldered years ago. WS2812 was attached using 183° solder paste and a heating table.
Add tin paste to solder pad | On the heating table | Finished product |
![]() |
![]() |
![]() |
5. Tuya Intelligence
The Tuya module uses WB3S to directly obtain the network time. The reference protocol is as follows:
MCU sends | MCU receives | |
![]() |
![]() |
![]() |
Problems encountered during the process:
Attachment description:
The program is written based on the STM32CubuMX HAL library
The welded board display was a video recorded years ago before the Tuya module arrived, so the Tuya module has not been soldered yet.
The effect shown in the video is: time + temperature + humidity display and touch button control display mode is disco mode
There are not many functions yet. Due to my own problems, the project has been delayed for too long. In the days to come, I will complete the debugging of its functions.
All reference designs on this site are sourced from major semiconductor manufacturers or collected online for learning and research. The copyright belongs to the semiconductor manufacturer or the original author. If you believe that the reference design of this site infringes upon your relevant rights and interests, please send us a rights notice. As a neutral platform service provider, we will take measures to delete the relevant content in accordance with relevant laws after receiving the relevant notice from the rights holder. Please send relevant notifications to email: bbs_service@eeworld.com.cn.
It is your responsibility to test the circuit yourself and determine its suitability for you. EEWorld will not be liable for direct, indirect, special, incidental, consequential or punitive damages arising from any cause or anything connected to any reference design used.
Supported by EEWorld Datasheet