111 is based on Tuya's power statistics and switch control socket module based on Tuya's smart WR3 module and Shanghai Belling's BL0937 metering chip. Use the smart socket solution provided by Tuya Smart to verify the timing switch control of the socket, accurately count power consumption, and query historical power records. Crow intelligent Internet module's power statistics and switch control socket module. It can control the timing switch of the socket, accurately count the power consumption, and query the historical power records through the app.
· 1. Goal: Using the Tuya Smart Platform , you can control socket switches and power statistics through the Cloud Smart APP.
· 2.Wifi module: Tuya Smart WR3 module.
· 3. Switch control: Choose a 5V driven relay. Because the power module supplies 5V voltage.
· 4. Power statistics: Shanghai Belling BL0937 metering chip
5. Implement functions: 1) Socket switch control of buttons on the circuit board. (Local control, no need to connect to the Internet)
· 2) The mobile app controls the switch of the socket, countdown control, and timing control. (remote control, WIFI networking)
· 3) The mobile app can query and monitor voltage, current, and power data in real time, and perform power statistics.
4) On-board LED light indicates relay on-off status
· 1. Do not lay copper on the strong current parts, and pay attention to the safe distance between strong current and strong current, strong current and weak current (try to 3mm, consider digging if it is less than 2mm, but the PCB strength issue must be considered); open the strong current circuit Window, so that tin can be hung to increase the passing current.
· 2. The relay is connected to an external 220V terminal, which is firm and safe;
· 3. Insulate high-voltage areas to avoid danger;
1. Physical PCB
front:
Reverse side:
2. APP interface
Four: Project Summary
This project is only half successful, realizing the app-controlled socket switch, timing, and countdown switch functions. It is a pity that the power statistics function cannot be fully implemented.
1. Analysis of failure reasons:
1) I designed the metering circuit according to the technical manual of Shanghai Belling BL0937 chip, but failed to design the circuit according to the schematic diagram of Tuya Smart's recommended solution. As a result, this solution only realized the switch control function and failed to fully realize the power statistics function. 2) This electricity statistics chip requires the high voltage and low voltage to share the same ground. Since the self-sufficient power module is used, it causes isolation, resulting in no common ground, so the metering chip cannot work properly. Later, I modified the flying wire by myself and connected the live wire to low-voltage GND. Although the value can be displayed, the leakage of the metering chip caused a hidden safety hazard. The flying wire cannot be used with the same ground, and a dedicated power circuit must be designed.
**Follow-up improvement plan: **As a practical attempt, I gained a lot of experience. In the next design, the power circuit and metering circuit will be designed according to the plan provided by Tuya; the 220V circuit will be optimized to isolate strong and weak electricity; and an insulating shell will be designed.
2. Experience gained from this design:
1.) This metering circuit requires high and low voltage common ground wires and cannot be isolated. Operations must be cautious and safety first! Safety first! Safety first! 2.) The circuit design must strictly follow the schematic diagram provided by the manufacturer. Understand the principles and then design. The circuit must be designed strictly in accordance with the principles. 3.) Familiar with the process of Tuya Smart Free Development and Circuit Design. 4.) Due to time constraints, I was unable to design the casing. The appearance should be considered in advance as a redesign the next time. 5.) Although program-free development is simple and convenient, it is very inconvenient to find the cause without a program after a problem occurs. Free development is only suitable for existing mature design solutions. In the end, the power statistics function failed to be debugged. 6.) There are regrets in this product, but in the future, we should consider more principles and practical applications when designing, and slowly work hard to make a mature design. I also gained a lot of experience from this failure and can avoid many detours in the future, which is also a good thing.
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