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.

A Quick Guide On NodeMCU Pinout and ESP-12E Pinout

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.

A Quick Guide On NodeMCU Pinout and ESP-12E Pinout

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.

Pin Function
RST Reset the Module
ADC0 ADC Pin with 10-bit resolution
EN Chip Enable Pin (active HIGH)
GPIO16 GPIO16 pin (wake pin from deep sleep mode)
GPIO14 GPIO14 pin (HSPI_CLK)
GPIO12 GPIO12 pin (HSPI_MISO)
GPIO13 GPIO13 pin (HSPI_MOSI)
VCC 3.3V Power Supply (max 3.6V)
SDCMD SDIO CMD (GPIO11)
SDD0 SDIO Data 0 (GPIO7)
SDD2 SDIO Data 2 (GPIO9)
SDD3 SDIO Data 3 (GPIO10)
SDD1 SDIO Data 1 (GPIO8)
SCCLK SDIO CLK (GPIO6)
GND Ground Pin
GPIO15 GPIO15 pin (HSPI_CS)
GPIO2 GPIO2 pin (TXD1)
Flash Flash Pin (GPIO0)
GPIO4 GPIO4 pin (SDA – software I2C)
GPIO5 GPIO5 pin (SCL – software I2C)
RXD0 UART0 RXD pin (GPIO3)
TXD0 UART0 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.

Pin Description Alternate Functions Default
ADC0 Analog Input   ADC0
Reserved      
Reserved      
SDD3 SDIO Data 3 GPIO10 SDD3
SDD2 SDIO Data 2 GPIO9 SDD2
SDD1 SDIO Data 1 GPIO8 SDD1
SDDCMD SDIO CMD GPIO11 SDDCMD
SDD0 SDIO Data 0 GPIO7 SDD0
SDCLK SDIO CLK GPIO6 SDCLK
GND Ground    
3.3V 3.3V Output    
EN Chip Enable (Active HIGH)    
RST Reset (Active LOW)    
GND Ground    
VIN 5V Input to 3.3V Regulator    
3.3V 3.3V Output    
GND Ground    
TXD0 UART0 TXD GPIO1 TXD0
RXD0 USRT0 RXD GPIO3 RXD0
GPIO15 GPIO15 HSPI_CS / RTS0 GPIO15
GPIO13 GPIO13 HSPI_MOSI / CTS0 GPIO13
GPIO12 GPIO12 HSPI_MISO GPIO12
GPIO14 GPIO14 HSPI_SCK GPIO14
GND Ground    
3.3V 3.3V Output    
GPIO2 GPIO2 UART1 TXD GPIO2
Flash Flash GPIO0 Flash
GPIO4 GPIO4 Software SDA (I2C) GPIO4
GPIO5 GPIO5 Software SCL (I2C) GPIO5
GPIO16 GPIO16 Wake (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 Pin NodeMCU Pin Information
0 D3 Pulled HIGH and connected to Flash Button
1 TX Do not use while TXing
2 D4  
3 RX Do not use while RXing
4 D2 I2C SDA
5 D1 I2C SCL
6 – 11 – Connected to SPI Flash
12 D6  
13 D7  
14 D5  
15 D8 Pulled LOW
16 D0 Used to wake from deep sleep. No interrupt, I2C, PWM

Boot Mode Selection Pins

These pins are used to choose the boot mode.

GPIO 0 GPIO 2 GPIO 15 Boot Mode
LOW HIGH LOW UART Bootloader
HIGH HIGH LOW Boot from SPI Flash
x x HIGH Boot 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 *