IOT

A Quick Guide On NodeMCU Pinout and ESP-12E Pinout, Pin Description,And Peripherals

The ESP-12E Module, which serves as the NodeMCU board’s base board, as well as the pinouts of both boards, will be covered in this tutorial. If you are creating your own hardware, the ESP12-E Pinout will be useful, and knowing the NodeMCU Pinout will be crucial if you are using the ESP8266 NodeMCU board.

Introduction

The idea of the Internet of Things (IoT) has been around for a while, but it only really took off when the DIY community began to invest in it. You need both the enabling hardware and the excellent software to support low-cost and simple IoT systems.

Espressif Systems made a big impact on this situation. The ESP8266 SoC, which was first introduced in 2014, has become the standard chip for IoT-related DIY projects.

Many independent producers began using the ESP8266 SoC to create small modules and boards that are simple to integrate into our current hobbyist setup, which primarily uses Arduino.

The ESP-01, created by Ai-Thinker, is one of the widely used ESP8266-based modules. With the ESP8266 SoC, a flash memory, and a few connections for connecting to other gadgets like an Arduino, this is a simple board.

The pins are not breadboarded friendly, there are only two GPIO pins, programming requires a USB to UART converter module, etc. This is a wonderful board to get started with the ESP8266.

As a result, manufacturers began adopting the somewhat more sophisticated ESP-12E, which is also from Ai-Thinker, rather than the ESP-01, which is the ESP8266 Module’s base model.

The advantage of the ESP-12E is that it has more GPIO Pins and castellated edges on the PCB, making it simple to connect this board to your own design.

ESP-12E Module

The ESP-12E by Ai-Thinker is a Wi-Fi module based on the ESP8266EX SoC. The ESP8266EX SoC is a Wi-Fi chip with support for the full TCP/IP stack that is based on Tensilica’s L106 Diamond 32-bit Processor and an integrated Wi-Fi MAC.

ESP-12E-Module

ESP-12E Module with edge castellations

The ESP-12E can be used as a stand-alone device with its Wi-Fi connectivity and GPIO Pins or it can be used as a Wi-Fi adapter for other microcontrollers like Arduino, for example, using UART interface because it has a microcontroller (in the form of Tensilica’s L106 Diamond).

The ESP-12E Module is made up of an ESP8266 SoC, 4MB of SPI flash memory, a 26 MHz crystal, a PCB antenna, and a few RF-related parts. The ESP-12E has a lot more pins than the ESP-01 Module, as you can see from the image, and every pin on the PCB is edge-castellated.

ESP-12E Pinout

This ESP-12E Pinout picture will be very helpful for you if you’re interested in constructing your own breakout board for the ESP-12E Module. The ESP-12E Module has 22 pins, as you can see.

All of the pins and their alternative functions are described in the ESP-12E Module pinout diagram above. The pins of the ESP-12E Module are described in the following table.

PinFunction
RSTReset the Module
ADC0ADC Pin with 10-bit resolution
ENChip Enable Pin (active HIGH)
GPIO16GPIO16 pin (wake pin from deep sleep mode)
GPIO14GPIO14 pin (HSPI_CLK)
GPIO12GPIO12 pin (HSPI_MISO)
GPIO13GPIO13 pin (HSPI_MOSI)
VCC3.3V Power Supply (max 3.6V)
SDCMDSDIO CMD (GPIO11)
SDD0SDIO Data 0 (GPIO7)
SDD2SDIO Data 2 (GPIO9)
SDD3SDIO Data 3 (GPIO10)
SDD1SDIO Data 1 (GPIO8)
SCCLKSDIO CLK (GPIO6)
GNDGround Pin
GPIO15GPIO15 pin (HSPI_CS)
GPIO2GPIO2 pin (TXD1)
FlashFlash Pin (GPIO0)
GPIO4GPIO4 pin (SDA – software I2C)
GPIO5GPIO5 pin (SCL – software I2C)
RXD0UART0 RXD pin (GPIO3)
TXD0UART0 TXD (GPIO1)

ESP8266 NodeMCU Breakout Board

The NodeMCU team created a breakout board for their NodeMCU Firmware project using the ESP-12E Module as the basis board and released the design as open source. The ESP-12E NodeMCU board’s on-board peripherals were already covered in the “Getting Started with NodeMCU” lesson.

Getting-Started-with-NodeMCU

NodeMCU (ESP-12E) Board

NodeMCU Pinout

The pinout for the NodeMCU board is shown in the picture below. If it is based on the original NodeMCU Devkit design, a typical NodeMCU board includes 30 pins. 8 of the pins in this are used for power, while 2 are retained. The remaining 20 pins are connected to the ESP-12E Module’s pins.

In the following table, a brief description of the pins is provided.

PinDescriptionAlternate FunctionsDefault
ADC0Analog InputADC0
Reserved
Reserved
SDD3SDIO Data 3GPIO10SDD3
SDD2SDIO Data 2GPIO9SDD2
SDD1SDIO Data 1GPIO8SDD1
SDDCMDSDIO CMDGPIO11SDDCMD
SDD0SDIO Data 0GPIO7SDD0
SDCLKSDIO CLKGPIO6SDCLK
GNDGround
3.3V3.3V Output
ENChip Enable (Active HIGH)
RSTReset (Active LOW)
GNDGround
VIN5V Input to 3.3V Regulator
3.3V3.3V Output
GNDGround
TXD0UART0 TXDGPIO1TXD0
RXD0USRT0 RXDGPIO3RXD0
GPIO15GPIO15HSPI_CS / RTS0GPIO15
GPIO13GPIO13HSPI_MOSI / CTS0GPIO13
GPIO12GPIO12HSPI_MISOGPIO12
GPIO14GPIO14HSPI_SCKGPIO14
GNDGround
3.3V3.3V Output
GPIO2GPIO2UART1 TXDGPIO2
FlashFlashGPIO0Flash
GPIO4GPIO4Software SDA (I2C)GPIO4
GPIO5GPIO5Software SCL (I2C)GPIO5
GPIO16GPIO16Wake (deep sleep)GPIO16

Power, Peripherals, and Pins

How to Power NodeMCU?

The NodeMCU board can be powered in two different ways. The micro-USB port is used for one and the VIN pin for the other. Keep in mind that only 3.3V is compatible with the ESP8266EX SoC. The NodeMCU board, therefore, features a 3.3V Regulator IC (AMS1117 – 3.3).

You can apply regulated 5V electricity to the VIN pin if you have it. There are three 3.3V pins that are connected to the regulator’s 3.3V output.

What Peripherals are available on NodeMCU?

This specifically relates to the ESP8266EX SoC. Let’s look at all the NodeMCU’s various peripherals while keeping that in mind.

  • GPIO

There are 17 GPIO pins on the ESP8266EX. However, not all of them are accessible to the user as some of them (such as UART, SDIO, SPI, etc.) are used for other functions in NodeMCU (ESP-12E Module).

After examining all the other peripherals, we will look at the NodeMCU’s GPIO Pins that are accessible.

  • SPI

On the ESP8266EX SoC, there are two SPI interfaces (SPI and HSPI). The two enable both Master and Slave Operations. The slave mode clock is limited to 20 MHz, but the master mode clock can be adjusted to 80 MHz.

  • SCLK – GPIO6 (Not Available)
  • MISO – GPIO7 (Not Available)
  • MOSI – GPIO8 (Not Available)
  • CS – GPIO11 (Not Available)
  • HSPI_CLK – GPIO14
  • HSPI_MISO – GPIO12
  • HSPI_MOSI – GPIO13
  • HSPI_CS – GPIO15

A few SDIO pins are multiplexed with GPIO pins for SPI. A 4MB SPI Flash is also included on the ESP-12E Module and is connected through SPI Pins. Therefore, you are unable to access SPI pins. Only HSPI pins can be used for SPI communication.

  • I2C

The ESP8266 does not have hardware I2C, but it can support it through software. Since they don’t perform any other operations besides SDA and SCL, GPIO4 and GPIO5 can be used as those functions.

  • UART

Two hardware UARTs on the ESP8266EX (UART0 and UART1) support baud rates of up to 115200. UART0 can be utilized for communication in this and also offers data flow control. UART1 can be used for data logging since it only has a TX pin (the RX pin is used by SDD1).

  • UART0 TX – GPIO3
  • UART0 RX – GPIO1
  • UART0 RTS – GPIO15
  • UART0 CTS – GPIO13
  • UART1 TX – GPIO2
  • UART1 RX – GPIO8 (Not Available)

Additional Features

Except for GPIO16, all GPIO pins allow interrupts.

The NodeMCU Board has two internal LEDs. The ESP-12E Module’s one LED is connected to GPIO2, and the NodeMCU Board’s other LED is attached to GPIO16.

So, What GPIO Pins on NodeMCU are available?

The total number of GPIO pins that are accessible to users can be calculated using the information that has been provided up to this point. First off, SPI Flash uses GPIOs 6 through 11. As a result, the user cannot access these.

Additionally, as GPIO1 and GPIO3 are used as UART TX and RX Pins, they are excluded as well. In other words, 8 of the 17 GPIO pins are already in use. We are now left with 9 pins. On the NodeMCU Board, these pins are labeled as D0 through D8.

The GPIO Pins that are accessible on NodeMCU are listed in the table below.

GPIO PinNodeMCU PinInformation
0D3Pulled HIGH and connected to Flash Button
1TXDo not use while TXing
2D4
3RXDo not use while RXing
4D2I2C SDA
5D1I2C SCL
6 – 11–Connected to SPI Flash
12D6
13D7
14D5
15D8Pulled LOW
16D0Used to wake from deep sleep. No interrupt, I2C, PWM

Boot Mode Selection Pins

These pins are used to choose the boot mode.

GPIO 0GPIO 2GPIO 15Boot Mode
LOWHIGHLOWUART Bootloader
HIGHHIGHLOWBoot from SPI Flash
xxHIGHBoot from SDIO

Conclusion

I hope all of you had understand the basics of NodeMCU Pinout and ESP-12E Pinout. We MATHA ELECTRONICS will be back soon with more informative blogs.

Leave a Reply

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