This project is a DIY smart plug strip based on ESP-12F. It uses the Blinker IoT platform of Lighting Technology. It has three-way five-hole sockets with a total power of up to about 2000W. You can use the Lighting APP for remote control switches, timer switches, voice switches, etc. You can use common voice assistants (such as Xiaomi Xiaoai) for voice control.
There are four files in the project, one schematic file and three PCB files. Excluding the PCB file corresponding to the schematic diagram, the remaining two are component properties, which can be seen during welding, and the other is the back cover of the housing. Please read the document clearly when making it to avoid mistakes.
There are two Excel files related to BOM in the attachment. The one with LCSC at the end of the file name is the component purchased by Lichuang Mall. You can directly upload this file to order in Lichuang Mall; the one with TB at the end of the file name is the component purchased by Xubao. Devices, the links inside are for reference only. Of course, you can replace the components in the BOM file with components with the same parameters. You don’t have to buy exactly the same ones. This project does not have such strict requirements on components. You can also buy them at Aobao. For example, the main control chip can be replaced by ESP-12E. ( I didn’t put the pin row in the BOM )
First download and install BlinkerAPP, create an account or log in, add an independent device, select network access, select Alibaba Cloud, and there will be a key. Copy this key and paste it into the array corresponding to the program;
Return to my device, click Modify in the upper right corner, add three button components, click on a button component, set the data key name, it should be consistent with the data key name in the program, set the button type to switch button, and the other two are similar. See the figure below for reference examples.
APP button setting example
The style of each component can be modified, it depends on personal preference.
As for how to connect to the voice assistant, you can read the official development documentation for this part, which contains detailed tutorials.
Dian Deng Technology Development Documents
I will attach the source program. The program is very simple and mainly uses the Blinker library. Note: The first is the data key name. This must be consistent with the data key name of the button component in the Lighting APP. As long as it is the same, it can be called anything. There are also three character arrays, which are the device key, the name and password of the WIFI to be connected. , just fill in your own; the voice assistant used in the source program is Xiaoai. If you use other voice assistants, remember to refer to the development documentation of Dian Deng to modify it.
After the program is compiled and there is no problem, just use the ESP8266 burner to burn the program to the chip ( the burner is available in Kaiyuan Square ). Of course, you can also solder it to the PCB board and then burn it. I have reserved the burning interface.
Proof the two PCB files. After proofing, weld them, and then upload the pictures.
Empty board front and back
The Chinese characters for Zero FireWire in the picture are wrong and backwards. They have been corrected in the open source files.
Since I didn’t take any pictures when I was doing it, the board and the case were connected together after welding, so the pictures after welding are only of the back inside the case...
Solder the reverse side
Precautions when welding: Weld the low-voltage power supply part first, and use a multimeter to test it before continuing; then weld the rest of the low-voltage part, and weld the terminals with the wiring side facing inwards ( I did it facing out) Yes, the wire is too difficult to plug in, I plugged it in for a long time... ), power on and test the function, and continue after it is normal; solder all the other components except the socket, and put a big lump of tin on the front window part. Be careful not to block the soldering pads of the socket, but also use a multimeter to check whether there is a short circuit or anything.
The shell is a simple model drawn with SW software and then 3D printed, as shown in the picture below.
3D printed shell preview
I got free printing from a certain store and only paid postage. After printing, the finished product was white. I personally like black, so I put a black wallpaper on it. There are four small round holes on the shell , which are used to place 3mm LED indicator lights. The installation and welding of the indicator lights are described below.
The red LED installed in the middle on the left is the power indicator light; the three green LEDs installed below are the switch status indicator lights. First, cut the pins of the four LEDs short, stick them in the corresponding holes, connect the positive poles of the LEDs together with wires, and lead out a female DuPont wire interface, corresponding to the 5V pin header on the PCB board; connect the three green The negative electrode of the LED is led out with a DuPont wire, which corresponds to D1, D2, and D3 from left to right; the negative electrode of the red LED is led out, corresponding to D-. The length of the 5 lead wires is appropriate.
Insert all three sockets into the housing, making sure they are in the wrong direction;
Plug the DuPont wires from the 5 LEDs into the corresponding positions on the PCB board;
Put the PCB board into the shell ( I have designed the position and size so that it can be closed perfectly ), and use M3*6+16 single-pass copper posts to fix the PCB;
Solder the pins of the socket and put a big dollop of tin on the windowed part;
Insert the power cord through the hole on the side of the casing, and connect the live wire, neutral wire, and ground wire to the terminals on the PCB board. Be careful not to connect them incorrectly;
Put the back cover on and tighten the screws.
Now you're done, you can plug it in and play.
What is demonstrated in the video is the remote control switch of the lighting APP, and the voice control is not demonstrated. Finally, DIY is risky, so please pay attention to safety.
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