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

How to Use ESP32 WROOM 38 PINS: Examples, Pinouts, and Specs

Image of ESP32 WROOM 38 PINS
Cirkit Designer LogoDesign with ESP32 WROOM 38 PINS in Cirkit Designer

Introduction

The ESP32 WROOM 38 PINS is a powerful microcontroller module designed for a wide range of applications, particularly in the Internet of Things (IoT) domain. It features integrated Wi-Fi and Bluetooth capabilities, making it ideal for wireless communication and smart device projects. With 38 GPIO pins, the ESP32 WROOM offers extensive interfacing options for sensors, actuators, and other peripherals.

Explore Projects Built with ESP32 WROOM 38 PINS

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
ESP32-Based GPS Tracker with SD Card Logging and Barometric Sensor
Image of gps projekt circuit: A project utilizing ESP32 WROOM 38 PINS in a practical application
This circuit features an ESP32 Wroom Dev Kit as the main microcontroller, interfaced with an MPL3115A2 sensor for pressure and temperature readings, and a Neo 6M GPS module for location tracking. The ESP32 is also connected to an SD card reader for data logging purposes. A voltage regulator is used to step down the USB power supply to 3.3V, which powers the ESP32, the sensor, and the SD card reader.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32-Based Infrared Proximity Sensing System
Image of ir sensor: A project utilizing ESP32 WROOM 38 PINS in a practical application
This circuit features an ESP32 Wroom microcontroller connected to an Infrared Proximity Sensor. The ESP32's GPIO33 is interfaced with the sensor's output, allowing the microcontroller to read proximity data. The sensor is powered by the ESP32's 5V output, and both devices share a common ground.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32-Controlled WS2812 RGB LED Strip
Image of LED: A project utilizing ESP32 WROOM 38 PINS in a practical application
This circuit features an ESP32 Wroom Dev Kit microcontroller connected to a WS2812 RGB LED strip. The ESP32's GPIO 4 is used to send data to the LED strip's data input (DIN), while both the ESP32 and the LED strip share a common ground. A separate Vcc power source is connected to the 5V pin of the LED strip to provide power.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32-Based OLED Display Interface
Image of d: A project utilizing ESP32 WROOM 38 PINS in a practical application
This circuit features an ESP32 microcontroller connected to an OLED 1.3" display. The ESP32's GPIO pins 21 and 22 are used for I2C communication (SDA and SCL respectively) with the OLED display. The display is powered by the 5V output from the ESP32, and both devices share a common ground.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with ESP32 WROOM 38 PINS

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 gps projekt circuit: A project utilizing ESP32 WROOM 38 PINS in a practical application
ESP32-Based GPS Tracker with SD Card Logging and Barometric Sensor
This circuit features an ESP32 Wroom Dev Kit as the main microcontroller, interfaced with an MPL3115A2 sensor for pressure and temperature readings, and a Neo 6M GPS module for location tracking. The ESP32 is also connected to an SD card reader for data logging purposes. A voltage regulator is used to step down the USB power supply to 3.3V, which powers the ESP32, the sensor, and the SD card reader.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of ir sensor: A project utilizing ESP32 WROOM 38 PINS in a practical application
ESP32-Based Infrared Proximity Sensing System
This circuit features an ESP32 Wroom microcontroller connected to an Infrared Proximity Sensor. The ESP32's GPIO33 is interfaced with the sensor's output, allowing the microcontroller to read proximity data. The sensor is powered by the ESP32's 5V output, and both devices share a common ground.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of LED: A project utilizing ESP32 WROOM 38 PINS in a practical application
ESP32-Controlled WS2812 RGB LED Strip
This circuit features an ESP32 Wroom Dev Kit microcontroller connected to a WS2812 RGB LED strip. The ESP32's GPIO 4 is used to send data to the LED strip's data input (DIN), while both the ESP32 and the LED strip share a common ground. A separate Vcc power source is connected to the 5V pin of the LED strip to provide power.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of d: A project utilizing ESP32 WROOM 38 PINS in a practical application
ESP32-Based OLED Display Interface
This circuit features an ESP32 microcontroller connected to an OLED 1.3" display. The ESP32's GPIO pins 21 and 22 are used for I2C communication (SDA and SCL respectively) with the OLED display. The display is powered by the 5V output from the ESP32, and both devices share a common ground.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications and Use Cases

  • IoT devices and smart home automation
  • Wireless sensor networks
  • Wearable technology
  • Robotics and automation systems
  • Data logging and remote monitoring
  • Prototyping and educational projects

Technical Specifications

Key Technical Details

  • Microcontroller: Tensilica Xtensa LX6 dual-core processor
  • Clock Speed: Up to 240 MHz
  • Flash Memory: 4 MB (external)
  • SRAM: 520 KB
  • Wi-Fi: 802.11 b/g/n (2.4 GHz)
  • Bluetooth: v4.2 BR/EDR and BLE
  • Operating Voltage: 3.3V
  • GPIO Pins: 38 (multipurpose, including ADC, DAC, PWM, I2C, SPI, UART)
  • ADC Channels: 18 (12-bit resolution)
  • DAC Channels: 2
  • PWM Outputs: Up to 16 channels
  • Operating Temperature: -40°C to 85°C
  • Power Consumption: Ultra-low power in deep sleep mode (~10 µA)

Pin Configuration and Descriptions

The ESP32 WROOM 38 PINS module has the following pinout:

Pin Number Pin Name Function
1 GND Ground
2 3V3 3.3V Power Supply
3 EN Enable (Active High)
4 IO0 GPIO0, Boot Mode Selection
5 IO1 (TX0) GPIO1, UART0 TX
6 IO3 (RX0) GPIO3, UART0 RX
7 IO4 GPIO4, PWM, ADC
8 IO5 GPIO5, PWM, ADC
9 IO12 GPIO12, ADC, Touch Sensor
10 IO13 GPIO13, ADC, Touch Sensor
11 IO14 GPIO14, PWM, ADC
12 IO15 GPIO15, PWM, ADC
13 IO16 GPIO16, UART2 RX
14 IO17 GPIO17, UART2 TX
15 IO18 GPIO18, SPI CLK
16 IO19 GPIO19, SPI MISO
17 IO21 GPIO21, I2C SDA
18 IO22 GPIO22, I2C SCL
19 IO23 GPIO23, SPI MOSI
20 IO25 GPIO25, DAC1, ADC
21 IO26 GPIO26, DAC2, ADC
22 IO27 GPIO27, ADC, Touch Sensor
23 IO32 GPIO32, ADC, Touch Sensor
24 IO33 GPIO33, ADC, Touch Sensor
25 IO34 GPIO34, ADC (Input Only)
26 IO35 GPIO35, ADC (Input Only)
27 VIN External Power Input (5V)

Note: Some GPIO pins have specific boot mode functions or restrictions. Refer to the ESP32 datasheet for detailed pin behavior.

Usage Instructions

How to Use the ESP32 WROOM in a Circuit

  1. Powering the Module:

    • Connect the 3V3 pin to a 3.3V power source.
    • Alternatively, use the VIN pin to supply 5V, which will be regulated internally.
    • Ensure the GND pin is connected to the ground of your circuit.
  2. Programming the ESP32:

    • Use a USB-to-Serial adapter or a development board with an integrated USB interface.
    • Connect the TX and RX pins of the ESP32 to the corresponding pins on the adapter.
    • Install the ESP32 board package in the Arduino IDE or use the ESP-IDF framework for advanced development.
  3. Connecting Peripherals:

    • Use the GPIO pins for interfacing with sensors, actuators, and other devices.
    • Configure the pins in your code for the desired functionality (e.g., digital I/O, ADC, PWM).
  4. Uploading Code:

    • Press and hold the BOOT button (connected to GPIO0) while resetting the module to enter programming mode.
    • Upload your code using the Arduino IDE or other compatible tools.

Example Code for Arduino IDE

The following example demonstrates how to blink an LED connected to GPIO2:

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

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

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

Important Considerations and Best Practices

  • Voltage Levels: Ensure all connected peripherals operate at 3.3V logic levels to avoid damaging the ESP32.
  • Boot Mode Pins: Avoid pulling GPIO0, GPIO2, or GPIO15 to incorrect states during boot, as this may prevent the module from starting properly.
  • Power Supply: Use a stable power source to avoid unexpected resets or malfunctions.
  • Deep Sleep Mode: Utilize deep sleep mode for battery-powered applications to minimize power consumption.

Troubleshooting and FAQs

Common Issues and Solutions

  1. ESP32 Not Responding or Uploading Code:

    • Ensure the BOOT button is pressed during the upload process.
    • Check the USB-to-Serial adapter connections and drivers.
    • Verify the correct COM port and board settings in the Arduino IDE.
  2. Wi-Fi Connection Fails:

    • Double-check the SSID and password in your code.
    • Ensure the Wi-Fi network operates on the 2.4 GHz band (ESP32 does not support 5 GHz).
  3. Random Resets or Instability:

    • Use a stable power supply with sufficient current (at least 500 mA).
    • Add decoupling capacitors near the power pins to reduce noise.
  4. GPIO Pin Not Working as Expected:

    • Verify the pin's default state and boot mode restrictions.
    • Check for conflicting pin assignments in your code.

FAQs

  • Q: Can I use the ESP32 with a 5V sensor?
    A: Yes, but you will need a level shifter to convert the 5V signals to 3.3V.

  • Q: How do I reset the ESP32?
    A: Press the EN button to reset the module.

  • Q: Can I use the ESP32 for Bluetooth and Wi-Fi simultaneously?
    A: Yes, the ESP32 supports simultaneous use of Bluetooth and Wi-Fi, but performance may vary depending on the workload.

This concludes the documentation for the ESP32 WROOM 38 PINS module.