This project is developed based on Tuya IoT module
Use Tuya module WBR3, the configuration parameters are in the attachment!
Proofing selection - 6-way switch -
It can realize 6-way relay control. I originally wanted to use 7-way, but the board is too big and exceeds 10*10. So it was changed to 6-way. My original purpose was to control the lights, and it was simple and quick to use relays. Let's analyze the schematic.
The most fun thing is that it can be controlled directly with Siri, which is convenient.
First look at the actual picture
This is a relay welded and connected to test whether it works.
The switch is connected as a dual control, so that both the original button and my module can control the switch. Approximate drawings
Power supply section
The power supply part is a 220v step-down 5v power supply module purchased directly from Taobao. I drew a package myself and plugged it directly into the board. However, it is a bit bulky.
Next, let’s take a look at how the circuit diagram is drawn.
AC220v enters the 5v step-down module through the fuse. One channel of the output 5v supplies power to the relay, and the other channel supplies power to LM1117-3.3 after passing through the 1n5819 diode (anti-reverse connection). There are two filter capacitors for the input and output, both of which are selected according to the data sheet. Yes, the performance of 1117 is quite good, and the output overshoot is small at the moment of power-on. It is very friendly to microcontrollers. Unlike the ht7733, the power supply voltage is directly output due to overshoot on power-on.
graffiti module
This is a Tuya module. There is not much to say. The key point is that the enabled 10k resistor must be connected, otherwise it will not work. The rest of the module is drawn according to the official circuit diagram. The firmware configuration of the module must be based on the schematic diagram, otherwise it will not work. It doesn't work anymore and I can't download the firmware myself, which is very troublesome.
Relay part
According to the configuration of the module firmware, select the initial power-on level as low level. The relay is driven by SS8050 and must have two S transistors, which can work with 1.5A current. Of course, the relay coil current is only about 0.5A. Freewheeling diodes must be added to both ends of the relay coil , otherwise the relay coil will generate a high induced electromotive force when the triode is turned off, which will break down the triode. As for why induced electromotive force is generated, students who are interested can go to Baidu
.
Buttons and lights
There’s not much to say. When you draw your own drawings, pay attention to the pin numbers of the buttons, because some buttons have 1 and 2 pins and some have 1 and 3 pins. Don’t forget the 10k pull-up resistor on the button. Without this resistor, the module will abnormally turn off and turn on all relays.
How to use: Very simple, plug in the power, click the distribution button on the Changan board, wait until the indicator light flashes quickly and click on the Tuya app to discover the device. If you cannot connect, please use the hotspot distribution mode, which is available in the app Detailed explanation and introduction. This module only supports 2.4G routers.
Video presented
Regarding the configuration of the firmware , you need to enter the Tuya platform. If you don’t have an account, register one first. 1. Enter the Iot platform in the upper right corner, 2. Click to create a product, 3. Select the power strip, (choose code-free development) and select WiFi+ for the communication protocol; Bluetooth, and then select the 7-way power strip (upgraded version). 4. Next, you will be asked to enter the product name and version number. Enter the one you like. 5. Click to create a product. 6. Select the plug-in function. I selected all functions. 7. Confirm and go to the next step to select the device panel. I chose the public version. 8. Continue to the next step of hardware development, select the WB3S WiFi&BLE dual-protocol module, 15 yuan , click the selection on the right, and the interface for configuring firmware information will pop up. At this time, open the firmware information I uploaded and fill in the comparison. Click to generate firmware and a window will pop up for you to check the firmware information. After confirmation, you can place an order. Then you can do your own research on other things, and it will be fine by default!
The last step is to set up Siri. The first step is to open the app, click on Intelligence at the bottom, then click on the plus sign in the upper right corner, select one-click execution, select the operating device, then select the WiFi switch, and then select the Siri you want to turn on. Switch, select a good state, such as on, then next step, save. Then return to the one-click execution interface. There is "Add to Siri" in the lower right corner. Click once, select the operation to be added, then record a command, click Finish, and then you can use Siri to control home appliances.
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