Cheapest Smart Plug || Wemos D1 Mini || Esp8266 || Wifi Plug || Smart Plug || Wmos || Vishal Soni India

by vishalsoniindia in Circuits > Arduino

1138 Views, 3 Favorites, 0 Comments

Cheapest Smart Plug || Wemos D1 Mini || Esp8266 || Wifi Plug || Smart Plug || Wmos || Vishal Soni India

Cheapest Smart Plug || wemos d1 mini || esp8266 || smart plug | wmos | wifi plug | vishal soni india
IMG_20210725_163437.jpg
IMG_20210725_163535.jpg

In this project we will make a cheapest smart plug. The plug works on wifi so you can access any home appliances with your smart phone.

In the Smart plug the Wemos D1 R2 board is used which is based on ESP8266, it provide wifi connectivity to our device. Wemos Board used with relay to control the device works on mains supply.

If you like this project please subscribe to my YouTube channel.

PicsArt_07-25-05.49.06.jpg

Requirements

IMG_20210611_125752.jpg
IMG_20210725_153046.jpg
IMG_20210725_153107.jpg
IMG_20210725_153501.jpg
IMG_20210725_153721.jpg

  1. you need two plugs one of them is big to hold circuit and other is small to control devices.
  2. Wemos D1 R2 Board
  3. 1k Resistor
  4. BC547 transistor
  5. 5v relay
  6. 220v AC to 5v DC converter i am using mobile charger.

Make Some Space

IMG_20210725_153858.jpg
IMG_20210725_153948.jpg
  1. Take a Big Plug.
  2. Open it.
  3. Remove all copper plates inside it.
  4. Remove unnecessary plastic to make some space.
  5. Use cutter and hot soldering iron to remove plastic.

Try to Place All Components

IMG_20210725_154113.jpg
IMG_20210725_154255.jpg
IMG_20210725_154315.jpg

  1. Put all components to make sure there is enough space.
  2. check the cap is closing perfectly.

Connect Ac Terminals

IMG_20210725_154555.jpg
IMG_20210725_154608.jpg
  • Connect Phase , Neutral and earth terminal on plug with help of screw as given in image.

Circuit Diagram for Smart Plug

Smart_socket_circuit.png
  • Here is circuit diagram you can download it from my Github page link given below.
  • the socket in circuit diagram, where you will connect device.

Github :- https://github.com/vishalsoniindia/Smart_Plug_usin...

Connect the Circuit

IMG_20210725_155212.jpg
IMG_20210725_155326.jpg

  • Connect All the circuit as shown in circuit diagram
  • Place All components in Plug and place some hot glue.
  • Make sure mains AC terminal are not touching the components.
  • I also made a hole to program Wemos D1 board with micro usb.

Prepare Small Plug

IMG_20210725_155841.jpg
IMG_20210725_155915.jpg
IMG_20210725_155934.jpg

  1. Take small plug and open it.
  2. Remove all the copper plates,
  3. Take three nuts and bolts we will use it to fix the copper plate shown in next step.

Connect Small Plug With Bigger

IMG_20210725_155951.jpg
IMG_20210725_160018.jpg
IMG_20210725_160036.jpg
IMG_20210725_160055.jpg

  1. Connect Phase, neutral and Earth wire the smaller plug with help of nut and bolts.
  2. The nut and bolt also holding copper plats on smaller plug.
  3. put cap of smaller plug.

Close Everything

IMG_20210725_160449.jpg
IMG_20210725_160537.jpg
  • Close Everything with help of screw and hot glue.

Install CH340 Driver

IMG_20210725_160950.jpg
IMG_20210725_161005.jpg
IMG_20210725_161022.jpg
IMG_20210725_151759.jpg
IMG_20210725_161038.jpg
IMG_20210725_161051.jpg

  1. Download the folder from my Github page.
  2. Click of CH34x file .
  3. On next window click on install.
  4. After few second your driver install success.
  5. To verfy it connect the device with PC.
  6. Open device manager.
  7. here you will see USB SERIAL CH340. it means driver is installed.

Github :- https://github.com/vishalsoniindia/Smart_Plug_using_wifi

Install Wemos D1 Board Library

IMG_20210725_161539.jpg
IMG_20210725_161556.jpg
IMG_20210725_161615.jpg
IMG_20210725_161630.jpg
  • Copy the link given below.

"https://dl.espressif.com/dl/package_esp32_index.json, http://arduino.esp8266.com/stable/package_esp8266com_index.json"

  • Open arduino and go to the file >> preferences.
  • Past the link as shown in image, if you already have a link separate it by comma.

Upload the Code

IMG_20210725_162049.jpg
IMG_20210725_162110.jpg
IMG_20210725_162123.jpg
IMG_20210725_162146.jpg
IMG_20210725_162203.jpg

  1. Open the "Wifi_device_CSS" code.
  2. Here change SSID and password to your Hotspot name and password.
  3. Select board as Wemos D1 R2.
  4. Select port where your device connected.
  5. upload the code.

Find IP Address

IMG_20210725_162426.jpg
IMG_20210725_162445.jpg
IMG_20210725_162526.jpg
IMG_20210725_151759.jpg
IMG_20210725_162426.jpg
IMG_20210725_162613.jpg

  • Open serial monitor
  • Select boadrate 115200.
  • Close serial monitor.
  • now deconnect your device and connect it again.
  • instantly open serial monitor.
  • you will see some ip address note the ip address.

Done

IMG_20210725_163140.jpg
IMG_20210725_162944.jpg
IMG_20210725_163002.jpg
  • Insert your device in mains plug.
  • Insert home appliance in device.
  • Wait a min till it connect to wifi.
  • Type IP address in your browser.
  • Congratulation, Now you are able to control your device.