IOT

Getting Started with NodeMCU – A Beginner’s Guide

Electronic devices are getting more compact, adaptable, and affordable, and they are capable of performing more functions than their predecessors. In the electronics sector, a microcontroller was launched as a novel innovation. Designed to make our tasks easier, with the least amount of effort and maximum production.

IoT applications are on the rise these days, and connecting objects is becoming increasingly crucial. Objects can be connected in a variety of ways, including using the Wi-Fi protocol. NodeMCU is the ideal solution if you’re looking for a more compact, WiFi-enabled alternative. In this tutorial, we will learn about NodeMCU. This is a complete beginner’s guide to Getting Started with NodeMCU,its features,Pinout etc. So, let get started.

What is Nodemcu?

NodeMCU is Lua based firmware of ESP8266.

NodeMCU designed as an open source platform based on the ESP8266 that allows things to be connected and data to be transferred using the Wi-Fi protocol.  

Furthermore, it may solve many of the project’s demands on its own by providing some of the most important functionalities of microcontrollers such as GPIO, PWM, ADC, and so on.It includes firmware that runs on the ESP8266 Wi-Fi SoC from Espressif Systems, and hardware which is based on the ESP-12 module. The general features of this board are as follows:

  • Easy to use
  • Programmability with Arduino IDE or IUA languages
  • Available as an access point or station
  • practicable in Event-driven API applications
  • Having an internal antenna
  • Containing 13 GPIO pins, 10 PWM channels, I2C, SPI, ADC, UART, and 1-Wire

 The device is especially useful for IoT applications, thanks to its tiny footprint and built-in WiFi support. The ESP8266 Integrates 802.11b/g/n HT40 Wi-Fi transceiver, so it cannot only connect with a WiFi network and interact with the Internet. It can also set up a network of its own, allowing other devices to connect directly to it.

There’s an on-board voltage regulator that guarantees the MCU receives the cleanest possible power, as well as a push-button reset and a USB port for convenient computer connectivity. The ESP8266’s operating voltage range is 3 to 3.3 volts. The LDO voltage regulator on the NodeMCU board keeps the voltage level at 3.3v. In the event of a current outage, it reliably supplies 600mA.

FEATURES:

  • Microcontroller: Tensilica 32-bit RISC CPU Xtensa LX106
  • Operating Voltage: 3.3V
  • Input Voltage: 7-12V
  • Digital I/O Pins (DIO): 16
  • Analog Input Pins (ADC): 1
  • UARTs: 1
  • SPIs: 1
  • I2Cs: 1
  • Flash Memory: 4 MB
  • SRAM: 64 KB
  • Clock Speed: 80 MHz
  • USB-TTL based on CP2102 is included onboard, Enabling Plug n Play
  • PCB Antenna
  • Small Sized module to fit smartly inside your IoT projects

Node MCU PINOUT:

  • Power Pins 

There are four power pins.There are One Vin and three 3.3V pins in NodeMCU

  1. Vin: This is the input voltage pin of the Arduino board used to provide input supply from an external power source.

2. 3.3V pins. The VIN pin can be used to directly supply the ESP8266 and its peripherals, if you have a regulated 5V voltage source. The 3.3V pins are the output of an on-board voltage regulator. These pins can be used to supply power to external components.

  • I2C pins

These pins are utilised in your project to connect all kinds of I2C sensors and peripherals. I2C Master and Slave are both supported. I2C interface capability can be implemented programmatically, with a maximum clock frequency of 100 kHz. It should be remembered that the I2C clock frequency should be higher than the slave device’s slowest clock frequency.

  • GPIO Pins

The ESP8266 NodeMCU features 17 GPIO pins that may be programmatically assigned to various tasks like I2C, I2S, UART, PWM, IR Remote Control, LED Light, and Button. Each digitally enabled GPIO can be tuned to high impedance or internal pull-up or pull-down. It can also be set to edge-trigger or level-trigger to generate CPU interruptions when configured as an input.

  • ADC Channel

A 10-bit precision SAR ADC is built within the NodeMCU. Evaluating the power supply voltage of VDD3P3 pin and testing the input voltage of TOUT pin are two functions that can be implemented using ADC. They cannot, however, be implemented at the same time.

  • UART Pins

The ESP8266 NodeMCU includes two UART interfaces, UART0 and UART1, which may communicate at up to 4.5 Mbps and provide asynchronous communication (RS232 and RS485). For communication, UART0 (TXD0, RXD0, RST0, and CTS0 pins) can be used. However, because UART1 (TXD1 pin) only transmits data, it is typically used for printing logs.

  • SPI Pins

ESP8266 features two SPIs (SPI and HSPI) in slave and master modes.These SPIs also support the following general-purpose SPI features:

  1. 4 timing modes of the SPI format transfer
  2. Up to 80 MHz and the divided clocks of 80 MHz
  3. Up to 64-Byte FIFO
  •  SDIO Pins

ESP8266 features Secure Digital Input/Output Interface (SDIO) which is used to directly interface SD cards. 4-bit 25 MHz SDIO v1.1 and 4-bit 50 MHz SDIO v2.0 are supported.

  • PWM Pins

Pulse Width Modulation is available on four channels on the board (PWM). The PWM output can be programmatically implemented and utilised to drive digital motors and LEDs. The PWM frequency range is configurable between 1000 and 10000 seconds, or 100 Hz and 1 kHz.

  • Control Pins

These pins are used to operate the ESP8266 microcontroller. Chip Enable pin (EN), Reset pin (RST), and WAKE pin are among these pins.

EN pin: The ESP8266 chip is enabled when EN pin is pulled HIGH. When pulled LOW the chip works at minimum power.

RST pin: The  ESP8266 chip.is reset using this pin on the PCB. It’s for resetting the microcontroller.

Ground: The ESP8266 NodeMCU board is grounded using this pin on the board.

WAKE pin:  Wake pin is used to wake the chip from deep-sleep.

POWER REQUIREMENTS FOR NODEMCU:

  • Operating voltage : 2.5 to 3.3 v
  • Onboard 3.3v 600mA voltage regulation
  • 800mA operating current
  • 20 µA during sleep mode
  • You can provide voltage upto 16.6v   
power pins-Nodemcu

ON BOARD SWITCHES & LED INDICATOR:

The ESP8266 has two switches: a reset button and a flash button. The Reset button is used to reset the nodemcu, while the Flash button is used to download and upgrade the firmware. The board also contains a built-in LED indication that can be programmed and is connected to the D0 pin.

Flash_resetButtons

SERIAL COMMUNICATION:

The ESP8266 chip is programmed and communicated via the CP2102 USB-to-UART Bridge Controller, which translates USB signals to serial and allows your computer to programme and communicate with it. It also has a communication speed of 4.5Mbps.

I/O PINS & PERIPHERALS:

The ESP6266 Nodemcu board has 17 GPIO pins that are used for a variety of peripheral functions.

  • A 10 bit ADC channel
  • PWM output
  • UART interface
  • SPI, I2C, I2S interface : to connect all sort of sensors and devices
  • I2S: to add sound to your project.

 ESP8266’s pin offer multiplexing feature (Multiple peripherals multiplexed on a single GPIO pin) which means a   single GPIO pin can function as  a PWM/UART/SPI.

GPIO

APPLICATIONS OF NodeMCU

  • Prototyping of IoT devices
  • Low power battery operated applications
  • Network projects
  • Projects requiring multiple I/O interfaces with Wi-Fi and Bluetooth functionalities

CONCLUSION:

Hope all of you find this basic information on Nodemcu useful. For more information, follow us on our online store-MATHA ELECTRONICS.

Leave a Reply

Your email address will not be published.