桂花蒸

[Tuya Smart] 6-way light control switch

 
Overview

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

Diodes connected in parallel across the relay

.

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

https://www.bilibili.com/video/BV1ni4y1T7tx?share_source=copy_link&share_medium=iphone&bbid=Z8478A8ABDF9651246749D1E917F4FF586E6&ts=1613719637

 

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.

参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-05-22 22:04:42

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号