Login

ESP8266

Objective

  • Learn about ESP8266 and ESP8266 based IOT Platforms

Let’s begin!

Arduino Boards (UNO, Nano, Mega, Due) can be connected to a network by interfacing it to a WiFi Shield. This is inconvenient when space is a constraint. ESP8266 serves as a much better alternative.

The ESP8266 is a series of WiFi chips produced by Espressif Systems. It is a System-on-Chip (SoC) which integrates a 32-bit Tensilica microcontroller, standard digital peripheral interfaces, antenna switches, RF balun, low noise receive amplifier, filters, power amplifier and power management modules into a small package.

There are multiple variants of ESP8266. Commonly used variants are

  • Raw Modules:
    • ESP-01
    • ESP-05
    • ESP-12
  • Development Boards:
    • NodeMCU
    • Wemos D1
    • Lolin
    • Olimex ESP8266

The first variant of ESP8266, called the ESP-01, comes with 8 pins.

  • 2 of them being used as General Purpose Input Output pins (GPIO0 and GPIO2)
  • 2 pins are reserved for Rx and Tx for communicating with a computer to upload codes to the chip
  • 1 VCC pin (Input power supply)
  • 1 GND pin (Ground)
  • 1 RST pin (Reset)
  • 1 CH_PD pin (Chip enable)

 

ESP-01 variant of ESP8266

 

The ESP-01 is designed to operate at 3.3V, anything higher may cause damage to the module and is not recommended. The pins are not 5V tolerant, so it is advisable to use an adapter or a voltage regulator when connecting it to a power supply.

The ESP-01 does not have an onboard microcontroller. So it has to be used along with a board which can program the ESP-01. The latest variant of ESP8266, called the ESP-12, has an onboard microcontroller. It comes with 22 pins and an onboard LED.

 

ESP-12 variant of ESP8266

 

To program the ESP-12, we need a UART port from an external programmer (eg. Arduino Uno Tx and Rx). To make programming easy, the NodeMCU development board comes with an onboard FTDI controller to simplify the process of programming.

NodeMCU (based on ESP-12)

NodeMCU is a form of ESP8266 using the ESP-12 module, which has an onboard microcontroller. It can directly be programmed using the Arduino IDE.

The ESP-12 has a WiFi standard of 802.11 b/g/n. It means the device is capable to work on 2.4 GHz bands of WiFi with support for 20/40 MHz channel width. The NodeMCU theoretically has 16 general purpose input output (GPIO) pins. However, many of them are used internally to interface internal components.

Two pins are reserved for TX and RX to communicate with a host (computer) from where a code will be uploaded to the chip. However, when no communication is taking place, these pins can be used as GPIO as well.

Taking these into account, 13 pins are available to use as digital GPIO pins.  The NodeMCU also has a pin A0 connected to a 10-bit Analog-to-Digital Converter (ADC). This allows the pin to be used to take analog inputs from a sensor.

NodeMCU based on ESP-12

Learn More

 

ESP-32

The successor to the ESP8266 was the ESP-32 which is a low cost, more expensive System on Chip microcontroller with integrated WiFi and dual-mode Bluetooth feature which is not present in the ESP 8266. The ESP-32 has 36 GPIO pins, 12 bit ADC, touch sensor, hall sensor embedded on it.

The ESP-32 pin diagram can be found below

ESP-32

Learn More

Takeaway

Loader Loading...
EAD Logo Taking too long?
Reload Reload document
| Open Open in new tab

We would love to see what you build out of these learnings!

Click here to submit your projects, share it with the world and stand a chance to be rewarded.

top

Knowledge and Content by Li2 Technologies | © 2021 NASSCOM Foundation | All rights reserved

X