他们逼我做卧底

IoT RGB color-changing lamp based on WB3S and Tuya Smart

 
Overview

This thing is enough for me to brag to my college classmates for a semester! An IoT RGB color-changing lamp verification based on WB3S and Tuya Smart can realize functions such as turning on, off, timing, sleeping, and adjusting brightness using a mobile phone. It can be expanded to make some low-power light products such as night lights and bedside lamps. The design is relatively simple. Using the Tuya smart platform, lamps and socket products can basically be developed without writing code. It's quite convenient

QQ screenshot 20201126081620.png

---- -First version of test, overturned

For the initial module, after welding it and powering it on, the LED would not light up. Others such as voltage and resistance are normal. Tuya APP can search for product names. At first I thought it was Tuya's configuration that was wrong (signal pull-down), then I connected the flying cable and changed it to pull-down power. After comparing the circuit diagram in the picture below, we found that there is nothing wrong with the design, except for the pull-up power. But the light still doesn't come on. After replacing two WB3S modules, I searched for the product names, indicating that there was no problem with the board (power supply). After discussion in the group, I discovered that the problem was that the module sent was not the same product as the board I made; Wan Duzi , and quickly reissued 3 WB3S modules. As of December 5, we are still waiting for the module. . . .MVIMG_20201205_180241.jpgMVIMG_20201205_180317.jpg

--- -Second test, successful

After a long wait (SF Express is quite fast), I got the new module on the morning of the 6th and immediately welded it for testing. The test was successful! The small light lights up normally!image.png

Let’s talk about the details of the design.

The first is the power supply part. A linear voltage regulator ( AMS1117-3.3 ) is used to convert the 5V voltage into 3.3V. The AMS1117 series is relatively stable.

5V comes in and a switch is connected. It only needs to be used to reset the module (need to redistribute the network)image.png

Then there is Tuya’s WB3S module

image.pngThe peripheral circuit of the module is also relatively simple. It should be noted that before designing the module circuit diagram, you must select the module firmware on Tuya Smart! Choose good module firmware! Choose good module firmware! Say important things 3 times! In the module firmware settings, check clearly whether the setting is "pull-up power" or "pull-down power"~~~ If you choose the wrong one, you will have to install "flying wires" after the board is ready. Although it is not troublesome, it is ugly. ah! ! ! !

After the firmware is completed, the only thing left is the "RGB light"

image.pngThe circuit of the lamp is also relatively simple. It should be noted that the LED RGB lamp is a common anode or a common cathode. This should be paid attention to when selecting components. I personally prefer the common anode (although they are similar). Because the module firmware selects a pull-up power, the circuit diagram of the lamp is also a pull-up power design (if you make a mistake, just fly the wire) ~ The bottom path of the lamp uses MOS model AO3400A . As for the role of MOS, please ask Ask Du Niang (Baidu). When welding, you should pay attention to the pin direction of the RGB lamp. For people like me who don’t read the specifications, the first time you solder, you will definitely solder it wrong! ! !

test part

Power-on test, the light is on, but not flashing (I remember the firmware setting is flashing), I thought there was a problem, so I went back and looked at the firmware setting of Tuya Smart. The firmware setting is to configure the network for the first time and turn on the light. It's always on. image.pngThen open the Tuya Smart APP, search for the device, add the device normally, and then test it, perfect!

4P pin headers are reserved for external RGB light strips. The test is also perfect. There is a test video below

Summarize

In this training, I learned about the access method of Tuya Smart, as well as the ideas and methods involved in LED RGB lights. Personally, I feel that using Tuya Smart to make IoT smart home products is much more convenient than the 8266 module. Tuya’s lights basically don’t require writing code (unless you want to cause trouble), which is a bonus for lazy people and those who don’t know how to program (microcontrollers)! The most valuable thing is to use Tuya Smart to make a circuit breaker (remote switching relay) or a smart switch socket. These are the simplest, and you don’t need to know programming (microcontroller) to do it. Finally, I wish Lichuang will get better and better! Awesome Plus!

参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-06-19 15:32:07

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
community

Robot
development
community

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号