DIY

We make from an ordinary outlet – “smart”

Making from a regular outlet - & laquo; smart '' src =

 We make from a regular outlet - In this article, we will learn how to make a cheap smart plug. The device works over Wi-Fi, so you can use it to access any home appliances from your smartphone.
The smart plug uses Wemos D1 R2 board based on ESP8266, it provides connection to the device via Wi-Fi …
Tools and materials: -Two sockets-adapters;
-Wemos D1 R2 board;
-Resistor 1 kOhm;
-BC547 transistor;
-Relay 5V;
-Network adapter 5В; -Screwdriver; -Pliers; -Soldering iron;
We make from an ordinary socket -  We make from a regular outlet - We make from an ordinary socket -  We make from a regular socket - We make from an ordinary socket - Step one: preparing a large outlet
There are two outlets in total. One socket, the larger one, will house all the electronics and it will be connected to the network, and the second, smaller one, is intended for connecting peripheral devices.
The large adapter must be disassembled and all contact plates and plug removed. The plastic partitions must be partially dismantled.
Making from a regular outlet - & laquo; smart '' src =  We make from a regular outlet - All electronic components must fit into the adapter housing and the lid must close.
We make from an ordinary socket - We make from an ordinary socket -  We make from a regular outlet - The plug must be replaced.
We make from an ordinary socket -  We make from a regular outlet - Step two: scheme
Further, according to the above diagram, it is necessary to mount all the details in the socket housing. Cut a hole in the case on the line of the micro usb connector of the Wemos D1 board.
Making from a regular outlet - 'smart' We make from an ordinary socket -  We make from a regular outlet - Step three: small adapter
Now we need to disassemble the small adapter. The adapter plug must be removed and the screws must be installed in its place. According to the diagram, connect the power wires to the screws (via the relay). Fix the two housings together with a screw.
 We make from an ordinary socket - 'smart' We make from an ordinary socket -  We make from a regular outlet - We make from an ordinary socket -  We make from a regular socket - We make from an ordinary socket -  We make from a regular outlet - We make from an ordinary socket -  We make from a regular outlet - Step four: programming
Now we need to program Wemos.
Download the folder from the Github page. Click the CH34x. In the next window, click “Install”.
After a few seconds, the driver should load. To check, we connect the device to a PC. Open the device manager. The manager must have a “USB SERIAL CH340” device.
We make from an ordinary socket - We make from an ordinary socket -  We make from a regular outlet - We make from an ordinary socket -  We make from a regular socket - We make from an ordinary socket - Now you need to install the Wemos D1 board library.
Copy the links below.

  & # 34; https & # 58; //dl.espressif.com/dl/package_esp32_index.json, http & # 58; //arduino.esp8266.com/stable/package_esp8266com_index.json"  

Open arduino ide and go to the file & gt; & gt; settings.
Insert links as shown in the photo, separating them with a comma.
We make from an ordinary socket - We make from an ordinary socket -  We make from a regular socket - We make from an ordinary socket - Next, open the “Wifi_device_CSS” code. In the code, we change the SSID and password to our own. We choose the board as Wemos D1 R2. We select the port to which the device is connected. Loading the code.
Doing from an ordinary socket - 'smart' Making from a regular outlet - & laquo; smart '' src =  We make from a regular outlet - Making from a regular outlet - & laquo; smart '' src =  We make from a regular outlet - To find the IP address of the device, you need to do the following.
Open the serial monitor.
Select the baud rate 115200.
Close the serial monitor.
Now, disconnect the device and reconnect it. Open the serial monitor and the IP address of the device will be registered there.
We make from an ordinary socket -  We make from a regular outlet - We make from an ordinary socket -  We make from a regular socket - We make from an ordinary socket -  We make from a regular outlet - Everything is ready. We install the device into an outlet. We connect a household appliance to it. We are waiting for a couple of minutes until it connects to Wi-Fi. Enter the IP address in the gadget browser. Now you can remotely control home appliances.
Making from a regular outlet - & laquo; smart '' src =  We make from a regular socket -  We make from a regular outlet - A demonstration of the work of such a smart socket, as well as the process of its assembly, can be seen in the video.

Source:

usamodelkina.ru

Show More

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button