In today’s article, we will be discussing the ESP 12E board which is one of the most used Espressif systems boards. After the introduction of this board, it revolutionized the IoT segment.
The ESP 12E board by AI thinker is a Wi-Fi module which is based on the ESP8266EX SoC which is the Wi-Fi chip that supports TCP IP protocol and is based on Tensilica L106 diamond 32-bit processor and an integrated Wi-Fi MAC. It is the baseboard for NodeMCU.
In today’s articles, we will be discussing the pin out of ESP 12E, its pinout description, and the programming of the board.
- Microprocessor – As mentioned earlier the ESP-12E is based on the Tensilica L106 diamond 32-bit processor.
- ESP8266EX SoC – ESP8266EX SoC is a wifi chip that is available on the board and can go up to 80 – 240 MHz of frequency.
- Antenna – ESP 12E has an in-built antenna that is used for connecting the board to wifi connectivity. The presence of an inbuilt antenna helps in simplifying the design by eliminating the need for an external antenna.
- Memory – The ESP 12E board comes with 4 MB of embedded SPI flash memory which is needed for storing the program and firmware.
- Power LED – There is an inbuilt power led present in the ESP 12E module which is red in color and it will start blinking when the board is connected to a power supply.
- Interfaces – The ESP 12E has several communication and data transfer interfaces available which are UART, SPI, I2C, I2S etc.
|Arduino ESP 12E
|16mm x 24mm x 3mm
|Weight of the board
|SDIO 2.0, SPI and UART
Power Consumption OF ESP 12E
|I/O Source Current
Pinout OF ESP 12E
|Function OF The Pin
|Reset the Module
|Active High Chip Enable Pin
|3.3V Power Supply (max 3.6V)
|Waking board from deep sleep mode
|GPIO14 pin (CLK)
|GPIO12 pin (MISO)
|GPIO13 pin (MOSI)
|GPIO15 pin (HSPI_CS)
|SDIO CMD (GPIO11)
|SDIO Data 0 (GPIO7)
|SDIO Data 2 (GPIO9)
|SDIO Data 3 (GPIO10)
|SDIO Data 1 (GPIO8)
|SDIO CLK (GPIO6)
|ADC Pin with 10-bit resolution
|GPIO2 pin (TXD1)
|Flash Pin (GPIO0)
|GPIO4 pin (SDA – I2C)
|GPIO5 pin (SCL – I2C)
|UART0 RXD pin (GPIO3)
|UART0 TXD (GPIO1)
The ESP8266 SoC is a cheap Wi-Fi Microcontroller with full TCP/IP Stack developed by Espressif Systems. NodeMCU is a firmware for ESP8266 which is developed using C Programming Language, Espressif NON-OS SDK and Lua scripting language.
Normally, we write code for Microcontrollers either in C or C++ programming languages and compile it to generate a binary file. The binary file is then uploaded into the flash memory of the microcontroller and it gets executed but NodeMCU firmware works as an interpreter for Lua Scripts so it will interpret the bytecode and executes the commands. There is no need of compilation, no binary file etc. We only have to write a script and run it.
Board Components OF NodeMCU
- 3.3 Voltage Regulator – There is an inbuilt voltage regulator available on the board which regulates the input voltage which is being supplied to the board.
- Boot/Flash Button – Boot/Flash button is required for entering the boot or flash mode.
- Micro USB connector – It is required for connecting the board to the 5v power supply.
- RESET Button – A RESET button is available on the board which is used to reset the board.
- USB to TTL Converter IC – The USB to TTL Converter IC is a cost-effective way to convert TTL signal a USB interface so that the board can be connected to the computer.
Pinout OF NodeMCU
|SDIO Data 3
|SDIO Data 2
|SDIO Data 1
|SDIO Data 0
|Chip Enable (Active HIGH)
|Reset (Active LOW)
|5V Input to 3.3V Regulator
|HSPI_CS / RTS0
|HSPI_MOSI / CTS0
|Software SDA (I2C)
|Software SCL (I2C)
|Wake (deep sleep)
There are two ways available which are used for powering up the board. At first, there is the micro USB port and the Vin pin. There are three 3V3 pins available. The board gets enabled when a supply of 5v is transmitted to the Vin.
The ESP8266EX SoC is only compatible with 3.3v so there is a 3.3v regulator which is available in NodeMCU.
The EN pin is the enabled pin for the board. When this pin is pulled high the EN chip is enabled and when this pin is pulled low the chip is disabled.
There are a total of 17 pins available on the board however all of them are not available for the users. Some of them are connected to SPI Flash and UART.
In ESP8266EX SoC there are 2 SPI interfaces available which are SPI and HSPI. Both of the SPI interfaces perform the slave and master operations. The clock speed of slave operation is limited to 20MHz while the speed of the clock in master operation is about 80MHz.
The following table shows the pin mapping of SPI interfaces
There are two UART hardware available on the ESP8266EX SoC which supports the baud rates up to 115200. The two UART hardware are UART0 and UART1. The UART0 can be used for communication and it also provides data flow control.
The UART1 has only a TX pin as its RX pin is being used by SDD1. The UART1 is used for data logging. The following table shows information about the UART pin mapping
Boot Mode Selection Pins
Boot mode selection pins are listed below
|Boot from SPI Flash
|Boot from SDIO
Analog Input Pin
ESP8266EX SoC supports analog input in one GPIO only which is ADC0. The ADC pin is required for converting the analog signal to a digital signal. The maximum input voltage of ADC0 is 0 – 3.3v if we are using an ESP8266 12-E NodeMCU kit.
The function of the RST pin is the same as the onboard RESET button. If the RST pin is pulled low the ESP8266 will get reset.
The GPIO0 pin is used for entering bootloader mode. If the GPIO0 pin is pulled low then it will set the ESP8266 in bootloader mode. Its function is the same as the onboard Flash/Boot button.
GPIO16 is used for waking up the ESP8266 from deep sleep. For this purpose, GPIO16 should be connected to the RST pin.
ESP8266 allows software PWM in all I/O pins: GPIO0 to GPIO15. The PWM signals on ESP8266 have a 10-bit resolution.
The ESP8266 supports interrupts in any GPIO, except GPIO16.
How To Program NodeMCU
For programming NodeMCU click on the link given – How to program NodeMCU.
Uploading The Blinky Sketch
The code is as follows
#define ledPin1 2 /* LED connected to GPIO 2 */
#define ledPin2 16 /* LED connected to GPIO 16 */
Now, click on upload and your code will be uploaded.
Frequently Asked Questions
Q1-Is NodeMCU the same as Arduino?
Ans-NodeMCU is different from Arduino as NodeMCU functions as a development board while Arduino functions as a microcontroller board.
Q2-Does NODEMCU work with wifi?
Ans-Yes, NodeMCU can work with wifi.
Q3-Can we use AT commands in NodeMCU?
Ans-NodeMCU was developed for replacing the AT commands with Lua scripting so we can not use AT commands in NodeMCU.
Q4-Can we multiplex 2 analog inputs in NodeMCU?
Ans-Yes, we can multiplex 2 analog inputs in NodeMCU using the DPDT relay.