What is ESP8266 module and how to program it

What is ESP8266 Module?

ESP8266 module is a wifi module that is utilized as electronic gadget control by means of the web both utilized independent or to work together with a microcontroller.

When you have aced the instructional exercise to get to this ESP8266, you will have the information to control relay, for example, transfers through the web any place you are.

Furthermore, this is frequently call name as Internet of Things (IoT).

This module is made by the manufacturer Espressif Systems.

On the market there are several types of ESP8266 family in circulation, but the most widely used and easily searched in the world are the types of ESP-01, ESP-07, and ESP-12.

Function is almost the same but the difference lies in the GPIO (General Purpose Input Output) pin of each type.

module family of esp8266

The chip initially went to the consideration of Western creators in August 2014 with the ESP-01 module, made by an outsider maker Ai-Thinker.

ESP-01 Module

This tutorial will discuss about the ESP-01 module to control LEDs via the internet in a simple way.

ESP-01 is a module that allows accessing a microcontroller via the internet.

This module is classified as Stand Alone or System on Chip which does not always need a microcontroller to control the Input Output that is normally done on Arduino.

Because ESP-01 can act as a mini computer, but with a limited number of GPIO conditions.

If you want to be combined with Arduino it is also very possible as a connecting bridge Arduino is accessed via the internet in this case through wifi communication.

Pin-Out ESP-01

ESP-01- ESP8266 module

Information :

  • GPIO-0 – GPIO-3: Input Output
  • VCC: Input voltage is 3.3 Vdc
  • GND: Ground
  • Reset
  • Chip Enable

The specifications of ESP-01

  • Large 96 kB RAM, 64 kB RAM instruction
  • 32-bit RISC CPU
  • External Q SPI flash :  512 KByte to 4 MByte
  • 3.3 Vdc input working voltage
  • WiFi network at 802.11 b / g / n
  • In 802.11b mode the power output is + 19.5dBm
  • Uses a Wi-Fi Direct (P2P) system, soft-AP
  • Power down leakage current of 10uA
  • Wake up and transmit packets in <2ms
  • Integrated TCP / IP protocol stack
  • Standby power consumption of <1.0mW (DTIM3)
  • SDIO 1.1 / 2.0, SPI, UART
  • 10-bit ADC
  • Interface: SPI, I²C
  • STBC, 11 MIMO, 21 MIMO
  • A-MPDU & A-MSDU aggregation & 0.4ms guard interval

Tutorial 1 ESP8266 (esp-01) – Blinking LED Built in

Materials needed are:

  • Module ESP-01
  • CH340E mini USB TTL board
  • Board Adapter Flashing ESP-01
  • Computer + Arduino IDE Software

Circuit schema

Circuit Schema ESP8266 Module


ESP-01 Adapter Flashing - ESP8266

Bill of Materials Adapter Flashing ESP-01 :

  • Pin Header 5 pin
  • Led 0805 red
  • Resistor 0805 330Ω, 10KΩ (3x)
  • Capacitor 0805 100nF (2x), 10uF (2x)
  • AMS1117-3.3v
  • Female Header double 5pin
  • Push button tactile 4*4*2mm

You can make pcb use this file : FILE

Board View ESP-01 Adapter flashing

The first steps to do are installing library before programming :

  • Download and install the Arduino IDE software (according to the Operation System)
  • Open the Arduino IDE
  • After that, select and click the file menu -> preferences
  • In the “Additional Boards Manager URL’s” section enter the link below:


Preferences Software Arduino IDE

  • And click “OK”
  • After that, click on “Boards Manager” on the tools menu -> board -> boards manager
  • “filter your search” -> esp8266
  • Then click install, and wait a few seconds for the process to finish
  • Finally select close
  • And for installing the ESP8266 library, it’s done
  • End process, click on Tools > board > Generic Esp8266 Module
  • Ready to Programming

Programming code

Tutorial 2 ESP8266 (esp-01) – Module Relay 1 Channel

This WiFi relay is primarily based on ESP-01 WiFi module,using GPIO0 to output pin control the relay with logic low. It’s easy to make control any device electric by your smarphone.

Materials needed are:

  • Module ESP-01s
  • CH340E mini USB TTL board
  • Board Adapter Flashing ESP-01
  • Lamp 220VAC
  • Module Relay 1 Channel for ESP-01 –> You can buy via aliexpress or amazon or ebay
  • Computer + Arduino IDE Software

Circuit schema

Circuit Schema ESP8266 - Relay

Specification Module Relay – ESP-01

  • Relay output: Max 10A / 250VAC or 30VDC
  • Relay function: Normal Closed (NC) or Normaly Open (NO)
  • There is a Reset Button
  • 5 Volt power input
  • using type ESP-01 or ESP-01s
  • Current ≥250mA
  • Maximum distance transmission about 400m
  • Size board : 37 * 25 mm

Programming code : FILE

Tutorial 3 ESP8266 (esp-01) – Weather DHT11

In this undertaking you’ll create a standalone web server with an ESP8266 that shows the temperature and humidity with a DHT11 sensor using the Arduino IDE. The net server you’ll construct can be accessed with any device that has a browser on your local network.

Materials needed are:

  • Module ESP-01s
  • CH340E mini USB TTL board
  • Board Adapter Flashing ESP-01
  • Module DHT11 for ESP-01
  • Computer + Arduino IDE Software

Circuit schema

Circuit Schema ESP8266 - Weather DHT11 ESP01

Specification Module DHT11 ESP-01

  • Measuring range temperature 0-100 ℃ and Humidity 10-90% RH
  • Measuring accuracy : Temperature ±2℃ and Humidity ±5% RH
  • Working voltage : 3.7 – 12Vdc

Library DHT.h needed, how to install it :

  • Open the Arduino IDE that has been installed
  • Make sure the computer or laptop is connected to the internet
  • Then click Sketch > Include Library > Manage Library
  • Type in the search box “DHT”
  • Click install “DHT Sensor Library” by Adafruit
  • Done

Programming code : FILE

Enjoy it! thanks

Leave a Reply

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