This project is a simple IoT development board. The development board is equipped with a dual module of WB3S WiFi and Bluetooth. Using a mobile phone to connect to Tuya Smart’s IoT life platform, the color of the RGB light can be remotely controlled. There are also functions such as timer switches. You can also use the buttons to adjust the parameters of the light, such as: brightness, color, etc.
1. Realize the brightness control of the lamp
2. Realize color control of lights
3. The mobile phone can realize timing function
4. The buttons can be successfully controlled
Directly use the official module of Tuya Smart as the main control, without adding an additional main control such as stc or stm, saving costs. The most important thing is that wb3s is officially provided by Tuya. It can realize the function with zero code. You only need to build and process the circuit diagram to use it. It is convenient, fast and low-cost. It is only 15 yuan. Free shipping with SF Express.
Use 1117 to convert the USB input 5V voltage to 3.3V. The output 3.3V is very stable with very small deviation, so I chose this voltage regulator chip.
When I set the function, I chose a button because this module can control the brightness and heating and cooling of the lamp, so I thought it might be more convenient to use the button on a desk lamp, so I added a button to verify the feasibility of the solution.
Choosing this serial port chip is completely redundant. Originally, I thought of using a serial port to realize communication between the module and the computer, because Tuya provides a host computer that can simulate MCU or WiFi module. Later, after the board was soldered, I found that the SDK in the module implemented with zero code cannot realize serial communication, so this is useless.
1. Use the wb3s module to directly connect to the cloud without the need for other masters. All operations are written in the SDK automatically generated by Tuya Smart. You can use it right away.
2. In the design and development stage, it is still necessary to add a CH340 for serial communication debugging and familiarize yourself with the protocol content (later it is found that communication cannot be established)
3. I chose a button. Since the module can control the brightness and heating and cooling of the lamp, I thought it might be more convenient to use the button on a desk lamp, so I added a button to verify the feasibility of the solution. If it is feasible, I can do it myself later. Play with a small desk lamp
During the soldering process, I replaced the RGB pull-down resistor with a 1x4 resistor. I had never soldered this resistor before, so when I got it, I found that it was not something I could solder now, and there were not many tools. , so it is not welded. But fortunately, this didn't have much impact. I barely soldered a necessary resistor, but I didn't solder it if it was necessary. There were no other major problems, and it was successful in the end, as shown in the picture above:
After the board arrives, the soldering is completed. When I turned on the power, I found that there was still something wrong. I was a little stupid at first, thinking that it would work just by plugging it in, and that I could directly connect it to my mobile phone. The result is as you can imagine. Later, when I went to Tuya’s official website, I realized that I had a silly question. I didn’t even need a network, so how could I connect to it? How could I call it a WiFi module if it wasn’t connected to the Internet? But I don’t know how to connect to the Internet, and there is no display on the phone. Finally, I read a lot of Tuya documents and some Tuya network configuration videos. When I finally wanted to configure the network, I found that the module was suddenly detected on the phone. In fact, I later realized that there is Bluetooth and the phone can detect it. It arrived, but the question is why it didn’t exist in the beginning. I saw this sentence in a Tuya manual that said that the SDK cannot be changed after powering on for fifteen minutes. I don’t know if this means that the module needs to be powered on for fifteen minutes. It takes effect after several minutes (I don't know). After I found that the phone found the module, I started trying to configure the network. However, several times the phone and the module failed to match. I took a closer look. I found that I need 2.4G network. I didn’t have a router when I was studying, so I asked my classmates to turn on the WiFi. Finally, I asked him to change the WiFi frequency to 2.4G before I was able to connect successfully. The device was connected several times. Anyway, the final success rate can be controlled by buttons and mobile phones. Finally, I tested the timing function of the mobile phone and it works. Later, I started tinkering with the serial port again, but in the end I found it was in vain, communication could not be established, I don't know why. The excuse I gave myself was that the development-free SDK mode seemed to be unable to communicate through the serial port. Anyway, that’s it. Attached is a simple test video. ~~~~
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