This project is actually a follow-up version of the training camp’s advanced class. I previously participated in the Lichuang Training Camp’s advanced class and designed a power statistics socket based on Alibaba Cloud. However, the relevant knowledge level was not enough, and in the end I was unable to implement the power statistics function. After the training camp, I was busy with work and never had time to update the version. The actual training camp just opened some time ago, so I signed up for the actual training camp again. But I was unlucky. In those few days, the company suddenly became busy with production, and I didn't have time to do it. In addition, my knowledge level was not enough, so I had to learn a lot of things while doing it, so I postponed it until now. This plan refers to some of the plans of students in the advanced class and some circuits recommended by the Tuya platform. Combined with my own experience, it has achieved all the expected functions. There are still a few places that need to be optimized, such as the mobile APP interface, so we will take our time in the future. The power supply part uses an AC-DC isolated switching power supply (220 to 5V). It costs more than five yuan each on Taobao. This power supply is used in large quantities in our company. The performance is good and the price is okay. The 5V voltage output by the switching power supply is isolated by a DC-DC power module. One channel is stepped down by AMS1117-3.3 and supplied to the MCU and WIFI module, and the other channel is stepped down by ME6215C33M5G and supplied to BL0937. The fuel gauge chip uses Shanghai Belling's BL0937. This chip is cheap, less than one yuan at Lichuang Mall, and calibration does not require professional equipment. It can be used with simple calibration. For the current and voltage parts of the power collection circuit, please refer to the circuit recommended by the Tuya platform. The communication part between BL0937 and MCU uses optocoupler for isolation. The relay is Songle 5V relay, which can support a maximum current of 10A. The LED indicator light uses a plug-in two-color LED. When the switch is turned on, the green light is always on. When the switch is turned off, the indicator light goes out. When distributing the network The green indicator light flashes quickly. In low power consumption mode, the green light flashes slowly. When the measured current and voltage are abnormal, the red light is always on. When the network distribution is successful but the router cannot be connected, the red light flashes quickly. The network distribution is successful but the router can be connected but The red light flashes slowly when it cannot go to the cloud. The plastic case was purchased on Taobao for 8 yuan a set, including the plastic case and corresponding hardware. Link
: https://item.taobao.com/item.htm?spm=a1z09.2.0.0.6d962e8deZ0wLs&id=600104275998&_u=scamqh83e6Finally , here are some pictures of the finished product:
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