The introduction of IoT socket is as follows:
The specific debugging steps are as follows (2020-8-14):
This board initially looks okay, and the layout and wiring are also okay. Next, we are going to prepare for welding and debugging. 2. First start welding from the power circuit and download circuit. Prioritize welding the CH340E and microUSB here. A horseshoe-shaped soldering iron tip is used here. Do not add too much tin when welding, as it is easy to cause joint welding. Rosin is also essential; secondly, welding Power chip AMS1117, switches, resistors, capacitors and other small components, how to solder these components smoothly? I used Huanghua soldering iron 907S, and the soldering temperature was adjusted to about 300°C. Finally, after the soldering of this part of the circuit is completed, do a visual inspection Is there a short circuit? Then use a multimeter to measure the open short circuit. After it is correct, power on and measure whether the voltage is normal. What I measured here is 3.36V, and the voltage is normal (PS: I don’t know why this picture is turned upside down).
After the power supply is normal, connect the computer and the board to see if the CH340E can be correctly recognized. The premise is that the CH340E driver has been installed. Here my device can be recognized by the computer, so it is normal. 3. Solder the ESP12f module and its necessary resistors and capacitors, and then test whether the firmware can be downloaded normally.
Through the test, the download is normal, and we can know that the ESP12f can run normally. 4. When welding other external components, priority is given to welding patch type components. I welded them in order from small to large, which is more convenient. The last welding includes relays, sockets, and connectors such as DHT11.
The above is a picture of the whole board that has been welded. Overall, it is good. After the welding is completed, measure the open and short circuits and the voltages at various important points again to see if they are normal.
Next, start debugging the program. The program is programmed using Arduino. Because Arduino has corresponding library files, it is more convenient to use. The code written is not that complicated. The program flow chart is as follows.
This project uses Alibaba Cloud Smart APP, which is easy to configure. You only need to drag and drop to build the APP.
Note:
When creating a product, select the cellular networking method for the underlined part above.
When selecting the authentication module, choose Hezhou Air202. Only if you choose these two steps correctly can you use the cloud smart APP network configuration normally.
2. This project has a network distribution function, which can be configured through Anxinke’s WeChat network (you can follow the official account of Anxinke Technology to obtain it); the network cannot be successfully configured using the one-click network distribution method that comes with the Cloud Intelligence APP, because the ESP12f does not have Certification.
This project enables Tmall Genie to control the opening and closing of sockets (only 1 channel can be controlled).
Project summary:
Project link: https://oshwhub.com/txiaomi/dan-lu-wu-lian-wang-cha-zuo .
NOTE: This optimized version of the IoT socket contains 3 versions , which can be viewed in version switching. The main difference lies in the processing of the power circuit and the size of the PCB board. The differences between each version are as follows:
master ( this version has been verified, the following pictures and videos demonstrate this version ):
V1.0:
V2.0:
This version is a modification for the master version, the power circuit is the same, and some buttons are deleted;
The PCB size for this version is 50mm x 55mm.
The core chips of the download board in the picture above use CH340E and AMS1117, which can download ESP12f and ESP01s. NOTE: After clicking download, follow the steps below:
Press Boot -> Press Rst -> Release Rst -> Release Boot
The picture below shows the normal operation of the IoT socket. For a project demonstration, see the attached IoT socket optimized version demonstration.
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