Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use NodeMcu-ESP32-C2: Examples, Pinouts, and Specs

Image of NodeMcu-ESP32-C2
Cirkit Designer LogoDesign with NodeMcu-ESP32-C2 in Cirkit Designer

Introduction

The NodeMcu-ESP32-C2, manufactured by Node, is a low-cost, open-source IoT platform based on the ESP8684 chip. It features integrated Wi-Fi and Bluetooth capabilities, making it an ideal choice for building connected devices and applications. This module is designed for developers and hobbyists looking to create smart home devices, IoT sensors, and other wireless communication projects.

Explore Projects Built with NodeMcu-ESP32-C2

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
ESP32C3 and LoRa-Enabled Environmental Sensing Node
Image of temperature_KA: A project utilizing NodeMcu-ESP32-C2 in a practical application
This circuit features an ESP32C3 Supermini microcontroller connected to a LORA_RA02 module and a DHT11 temperature and humidity sensor. The ESP32C3 handles communication with the LORA module via SPI (using GPIO05, GPIO06, GPIO10, and GPIO04 for MISO, MOSI, NSS, and SCK respectively) and GPIO01 and GPIO02 for additional control signals. The DHT11 sensor is interfaced through GPIO03 for data reading, and all components share a common power supply through the 3.3V and GND pins.
Cirkit Designer LogoOpen Project in Cirkit Designer
Wi-Fi Enabled Environmental Monitoring System with NodeMCU, DHT11, MQ-2, and LCD Display
Image of FYP Project: A project utilizing NodeMcu-ESP32-C2 in a practical application
This circuit uses a NodeMCU V3 ESP8266 microcontroller to read data from an MQ-2 gas sensor and a DHT11 temperature and humidity sensor, and then displays the sensor readings on a 16x2 I2C LCD screen. The NodeMCU provides power and handles communication with the sensors and the display.
Cirkit Designer LogoOpen Project in Cirkit Designer
NodeMCU ESP8266 and Arduino Nano Based Smart Energy Monitoring System with IR Control
Image of SCADA: A project utilizing NodeMcu-ESP32-C2 in a practical application
This circuit features a NodeMCU V3 ESP8266 microcontroller interfaced with a PZEM004T power monitoring module, a DHT11 temperature and humidity sensor, and two 5V relays for controlling external devices. The NodeMCU collects environmental data and power consumption metrics, and can control the relays based on this data or external inputs from an IR sensor. An Arduino Nano is also present, powered by a 5V adapter, and is connected to the NodeMCU and IR sensor, suggesting a secondary control or processing function within the system.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP8266 NodeMCU Controlled Environmental Monitoring System with OLED Display and Relay Switching
Image of soil moisture: A project utilizing NodeMcu-ESP32-C2 in a practical application
This circuit features an ESP8266 NodeMCU microcontroller connected to various peripherals. It includes a DHT11 sensor for temperature and humidity readings, a YL-83 module with YL-69 probe for soil moisture detection, a 0.96" OLED display for data output, a common cathode RGB LED for status indication, a piezo speaker for audio alerts, and a KY-019 relay module for controlling external loads. The NodeMCU facilitates data acquisition from sensors, drives the display and LED, and can trigger the relay and speaker based on sensor inputs or programmed conditions.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with NodeMcu-ESP32-C2

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of temperature_KA: A project utilizing NodeMcu-ESP32-C2 in a practical application
ESP32C3 and LoRa-Enabled Environmental Sensing Node
This circuit features an ESP32C3 Supermini microcontroller connected to a LORA_RA02 module and a DHT11 temperature and humidity sensor. The ESP32C3 handles communication with the LORA module via SPI (using GPIO05, GPIO06, GPIO10, and GPIO04 for MISO, MOSI, NSS, and SCK respectively) and GPIO01 and GPIO02 for additional control signals. The DHT11 sensor is interfaced through GPIO03 for data reading, and all components share a common power supply through the 3.3V and GND pins.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of FYP Project: A project utilizing NodeMcu-ESP32-C2 in a practical application
Wi-Fi Enabled Environmental Monitoring System with NodeMCU, DHT11, MQ-2, and LCD Display
This circuit uses a NodeMCU V3 ESP8266 microcontroller to read data from an MQ-2 gas sensor and a DHT11 temperature and humidity sensor, and then displays the sensor readings on a 16x2 I2C LCD screen. The NodeMCU provides power and handles communication with the sensors and the display.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of SCADA: A project utilizing NodeMcu-ESP32-C2 in a practical application
NodeMCU ESP8266 and Arduino Nano Based Smart Energy Monitoring System with IR Control
This circuit features a NodeMCU V3 ESP8266 microcontroller interfaced with a PZEM004T power monitoring module, a DHT11 temperature and humidity sensor, and two 5V relays for controlling external devices. The NodeMCU collects environmental data and power consumption metrics, and can control the relays based on this data or external inputs from an IR sensor. An Arduino Nano is also present, powered by a 5V adapter, and is connected to the NodeMCU and IR sensor, suggesting a secondary control or processing function within the system.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of soil moisture: A project utilizing NodeMcu-ESP32-C2 in a practical application
ESP8266 NodeMCU Controlled Environmental Monitoring System with OLED Display and Relay Switching
This circuit features an ESP8266 NodeMCU microcontroller connected to various peripherals. It includes a DHT11 sensor for temperature and humidity readings, a YL-83 module with YL-69 probe for soil moisture detection, a 0.96" OLED display for data output, a common cathode RGB LED for status indication, a piezo speaker for audio alerts, and a KY-019 relay module for controlling external loads. The NodeMCU facilitates data acquisition from sensors, drives the display and LED, and can trigger the relay and speaker based on sensor inputs or programmed conditions.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications and Use Cases

  • Smart home automation systems
  • IoT sensors and data loggers
  • Wireless communication and control
  • Wearable devices
  • Prototyping and development of connected applications

Technical Specifications

The NodeMcu-ESP32-C2 is a compact and powerful module with the following key specifications:

Parameter Value
Manufacturer Node
Part ID ESP8684
Microcontroller ESP32-C2 (based on ESP8684)
Wireless Connectivity Wi-Fi 4 (802.11 b/g/n), Bluetooth Low Energy (BLE)
Operating Voltage 3.3V
Input Voltage Range 5V (via USB) or 3.3V (via pin)
Flash Memory 4 MB
SRAM 272 KB
GPIO Pins 18
Communication Protocols UART, SPI, I2C, PWM, ADC
Wi-Fi Frequency 2.4 GHz
Power Consumption Ultra-low power consumption in deep sleep mode
Dimensions 18 mm x 25.5 mm

Pin Configuration and Descriptions

The NodeMcu-ESP32-C2 features a total of 18 GPIO pins, which can be configured for various functions. Below is the pinout description:

Pin Name Function
1 GND Ground
2 3V3 3.3V power supply
3 EN Enable pin (active high)
4 IO0 GPIO0, can be used for input/output or boot mode selection
5 IO1 GPIO1, UART TXD (default)
6 IO2 GPIO2, UART RXD (default)
7 IO3 GPIO3, general-purpose input/output
8 IO4 GPIO4, supports PWM, ADC, or digital I/O
9 IO5 GPIO5, supports PWM, ADC, or digital I/O
10 IO6 GPIO6, SPI CLK (default)
11 IO7 GPIO7, SPI MOSI (default)
12 IO8 GPIO8, SPI MISO (default)
13 IO9 GPIO9, general-purpose input/output
14 IO10 GPIO10, general-purpose input/output
15 IO11 GPIO11, general-purpose input/output
16 IO12 GPIO12, general-purpose input/output
17 IO13 GPIO13, general-purpose input/output
18 RST Reset pin

Usage Instructions

How to Use the NodeMcu-ESP32-C2 in a Circuit

  1. Powering the Module:

    • Use a 5V USB connection or supply 3.3V directly to the 3V3 pin.
    • Ensure the ground (GND) pin is connected to the circuit's ground.
  2. Programming the Module:

    • The NodeMcu-ESP32-C2 can be programmed using the Arduino IDE or the ESP-IDF framework.
    • Install the necessary board support package (BSP) for ESP32-C2 in the Arduino IDE.
  3. Connecting Peripherals:

    • Use the GPIO pins for connecting sensors, actuators, or other peripherals.
    • Configure the pins in your code for the desired functionality (e.g., input, output, PWM).
  4. Uploading Code:

    • Connect the module to your computer via USB.
    • Select the correct board and port in the Arduino IDE.
    • Upload your code to the module.

Important Considerations and Best Practices

  • Voltage Levels: Ensure all connected peripherals operate at 3.3V logic levels to avoid damaging the module.
  • Deep Sleep Mode: Use deep sleep mode to minimize power consumption in battery-powered applications.
  • Antenna Placement: Avoid placing metal objects near the onboard antenna to ensure optimal Wi-Fi and Bluetooth performance.
  • Boot Mode: To enter bootloader mode, hold the IO0 pin low while resetting the module.

Example Code for Arduino UNO Integration

Below is an example of how to blink an LED connected to GPIO4:

// Define the GPIO pin for the LED
#define LED_PIN 4

void setup() {
  // Set the LED pin as an output
  pinMode(LED_PIN, OUTPUT);
}

void loop() {
  // Turn the LED on
  digitalWrite(LED_PIN, HIGH);
  delay(1000); // Wait for 1 second
  
  // Turn the LED off
  digitalWrite(LED_PIN, LOW);
  delay(1000); // Wait for 1 second
}

Troubleshooting and FAQs

Common Issues and Solutions

  1. Module Not Detected by Computer:

    • Ensure the USB cable is functional and supports data transfer.
    • Install the correct USB-to-serial driver for the NodeMcu-ESP32-C2.
  2. Code Upload Fails:

    • Check that the correct board and port are selected in the Arduino IDE.
    • Ensure the module is in bootloader mode by holding IO0 low during reset.
  3. Wi-Fi Connection Issues:

    • Verify the SSID and password in your code.
    • Ensure the module is within range of the Wi-Fi router.
  4. Overheating:

    • Check for short circuits or excessive current draw from connected peripherals.

FAQs

Q: Can the NodeMcu-ESP32-C2 operate on 5V logic?
A: No, the module operates on 3.3V logic. Use level shifters if interfacing with 5V devices.

Q: How do I reset the module?
A: Press the RST pin or the onboard reset button to reset the module.

Q: Can I use the module for Bluetooth communication?
A: Yes, the NodeMcu-ESP32-C2 supports Bluetooth Low Energy (BLE) for wireless communication.

Q: What is the maximum Wi-Fi range?
A: The range depends on environmental factors but typically extends up to 50 meters indoors and 200 meters outdoors.