## CUB+2812 IoT Colorful Lights
### **1 Introduction**
IoT mobile phone remote control colorful lights made with Tuya CUB chip. Used in daily life, it has practical value in livening up the family atmosphere.
## **2 Knowledge Points**
(1) Learn the design ideas and methods of smart home products;
(2) Learn how to use Tuya smart networking CUB chip;
(3) Learn the voltage conversion principle and drive circuit;
(4) Understand the Tuya remote control structure;
(5) Understand the selection and use of electret microphones;
(6) Understand the principles behind the operation of the Internet of Things;
(7) Learn to use EasyEDA to design schematics and PCB diagrams;
(8) Learn the composition of PCB boards and factory production processes;
(9) Practice welding skills and master the use of tools such as multimeters and soldering irons.
## **3 Introduction to onboard resources**
(1) Onboard USB power supply interface;
(2) Onboard WS2812 LED 4, which can be used during debugging or connected to an external colorful light strip;
(3) Using Tuya networking chip, the firmware is automatically generated on the Tuya IOT platform and can be used without code development;
(4) Provides three-way buttons for flexible device control.
## **4 Circuit function analysis**
The circuit design is simple and mainly consists of: USB interface circuit, WS2812 driver circuit, and three-way button control circuit.
## **4.1** USB interface circuit
** Use USB to power the device. This charging cable is very common in the market and is safe and convenient**. Use a patch fuse to protect the circuit.
### ![image.png]

**4.2** The WS2812 driver circuit
uses WST3400S as the driver to increase the 3.3V voltage output by the microcontroller to 5V for WS2812 use.
### ![image.png]

### 4.3 Three-way button control circuit
Lead out 3-way buttons from Tuya CUB to facilitate function expansion.
![image.png]