ESP8266 Standalone WiFI Relay Control

AIM

  • To control a relay switch using esp8266 in standalone mode(without arduino,pic or any other Micro-controller) via Web-UI
  • The ESP broadcasts its own SSID.It does not connect to a router.local IP address of esp is 192.168.4.1

ESP8266 Standalone WiFI Relay Control

Step 1: Gather Hardware

  1. ESP 8266 (There are a lot of variants available in the market.for this tutorial lets just use the esp-01).If you are curious about the different variants click this link.
  2. 3.3v/5v power supply (depending on your module.My esp 01 uses 3.3v.Its very important that you have and external power source.More on this later),12 v power supply
  3. Any WI-Fi enabled device.
  4. FTDI USB to TTL adapter like this
  5. Bread Board
  6. Some connecting wires
  7. DC-DC Buck converter(optional.To power the module.)
    1. 1N5408 diode(optional)
    2. A multi meter (optional)
  8. Relay Driver(3v in my case) I recommend you to get the one withoptocouple like this
    1. you can build the relay driver on your own if you wish to with an npn transistor and a relay,the circuit is provided here.but i recommend you get a relay driver

Step 2: Gather Software

  1. Node MCU FlasherNode_MCU.7z
  2. ESPlorer(The IDE to load Lua script to the module) – ESPlorer.7z

Step 3: Setting Up Power Supply

This step is important.

Some FTDI USB to TTL converters have a 3.3 v power supply build into it.To avoid unnecessary confusions.Don’t try to power the module from the power supply of the USB to TTL converter. It Just wont work guys

Methods to power it:

  • Use a 3.7 v battery from your old phone.(an additional 0.4v wont damage your module)
  • Use a DC to DC buck converter like this

Calibrating the Buck Converter

Make connections as shown in the Diagram

  • Connect a 12v power supply to the input via a diode(protection)
  • Switch to DC voltage measurement in you multi meter and connect it to the output of the Buck converter
  • adjust the variable resistance on the buck converter till the multi meter reads 3.3v

Read more: ESP8266 Standalone WiFI Relay Control


About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter

Leave a Comment

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

Scroll to Top