MakerLab
ESP32ESP32-WROOM-32U

ESP32-WROOM-32U: Your Gateway to Powerful IoT Projects

Explore the versatile ESP32-WROOM-32U module, a compact powerhouse for Wi-Fi and Bluetooth enabled embedded systems.

ESP32-WROOM-32U

The ESP32-WROOM-32U is a highly integrated Wi-Fi and Bluetooth System on Chip (SoC) module developed by Espressif Systems. It's designed for a wide range of applications, from smart home devices and industrial automation to wearable electronics and sensor networks. This module is built around Espressif's ESP32 chip, which features a dual-core Tensilica LX6 microprocessor, making it capable of handling complex tasks and multitasking efficiently.

At its core, the ESP32 chip boasts impressive processing power with its dual Xtensa LX6 cores, each capable of running at up to 240 MHz. It includes a rich set of peripherals, such as ADCs, DACs, I2C, SPI, UART, and a Hall effect sensor, alongside robust Wi-Fi (802.11 b/g/n) and Bluetooth (v4.2 BR/EDR and BLE) connectivity. The 'WROOM-32U' variant specifically refers to a module that includes the ESP32 chip, a flash memory, and an antenna connector (U.FL connector), offering flexibility for antenna selection.

Positioned as a successor to the popular ESP8266, the ESP32 family, including the WROOM-32U, offers significantly more processing power, more GPIO pins, and dual-mode Bluetooth support. This makes it an ideal choice for makers and engineers who need more than what the ESP8266 can provide, especially for projects requiring simultaneous Wi-Fi and Bluetooth communication or more demanding computational tasks. Its affordability and extensive community support further cement its place as a go-to solution for connected embedded projects.

The ESP32-WROOM-32U is particularly well-suited for makers who are looking to develop sophisticated IoT applications. Its integrated Wi-Fi and Bluetooth capabilities eliminate the need for external communication modules, simplifying hardware design and reducing costs. Whether you're building a smart thermostat, a remote sensor array, or a voice-controlled assistant, the ESP32-WROOM-32U provides the performance and connectivity to bring your ideas to life.

Watch

Related video, embedded from YouTube.

Specifications

Microcontroller / SoCESP32-D0WDQ6 (Xtensa Dual-Core LX6)
Architecture32-bit RISC dual-core processor
Clock speedUp to 240 MHz
Flash / Storage4MB (typically, onboard SPI flash)
RAM / SRAM520 KB SRAM
Operating voltage3.0V - 3.6V (typical 3.3V)
Digital I/O pinsUp to 34
Analog / ADC12-bit SAR ADC (up to 18 channels)
PWMUp to 16 channels
ConnectivityWi-Fi 802.11 b/g/n, Bluetooth v4.2 BR/EDR and BLE
USBโ€” (UART via USB-to-Serial converter typically used for programming)
Power inputTypically 5V via micro-USB or VIN pin (regulated onboard)
Dimensions24mm x 16mm x 2.8mm (module itself)

Pinout & pin functions

PinFunction
3V33.3V Power Output
GNDGround
ENEnable (Reset) Pin
GPIO0Boot Mode Selection / General Purpose Input/Output
GPIO2General Purpose Input/Output
GPIO4General Purpose Input/Output
GPIO5General Purpose Input/Output
GPIO12 (MTDI)General Purpose Input/Output, SPI Flash Voltage (can affect boot if high)
GPIO13 (MISO)General Purpose Input/Output, SPI Master In Slave Out
GPIO14 (MCLK)General Purpose Input/Output, I2S Module Clock
GPIO15 (MTDO)General Purpose Input/Output, SPI Master Data Out
GPIO16 (RX2)UART2 Receive
GPIO17 (TX2)UART2 Transmit
GPIO18 (SCK)General Purpose Input/Output, SPI Clock
GPIO19 (MOSI)General Purpose Input/Output, SPI Master Data In
GPIO21 (SDA)General Purpose Input/Output, I2C Data
GPIO22 (SCL)General Purpose Input/Output, I2C Clock
GPIO23 (MISO)General Purpose Input/Output, SPI Master In Slave Out
GPIO25General Purpose Input/Output, DAC Output 1
GPIO26General Purpose Input/Output, DAC Output 2
GPIO27General Purpose Input/Output
GPIO32General Purpose Input/Output, ADC Input 4
GPIO33General Purpose Input/Output, ADC Input 5
GPIO34ADC Input 6 (Input only)
GPIO35ADC Input 7 (Input only)
ADC1_CH0 (GPIO36)ADC Input 0 (Input only)
ADC1_CH1 (GPIO39)ADC Input 1 (Input only)
ADC1_CH2 (GPIO34)ADC Input 2 (Input only)
ADC1_CH3 (GPIO35)ADC Input 3 (Input only)
ADC1_CH4 (GPIO32)ADC Input 4 (Input only)
ADC1_CH5 (GPIO33)ADC Input 5 (Input only)
ADC1_CH6 (GPIO39)ADC Input 6 (Input only)
ADC1_CH7 (GPIO36)ADC Input 7 (Input only)

Wiring & circuit basics

The ESP32-WROOM-32U operates at a logic level of 3.3V. Connecting 5V devices directly to its GPIO pins can cause permanent damage. If you need to interface with 5V components, use a logic level shifter or a voltage divider for input signals. Powering the module is typically done via the micro-USB port (which provides 5V and is regulated down to 3.3V onboard) or the VIN pin, which should also receive a regulated 5V. Ensure your power supply can provide at least 500mA, especially when Wi-Fi or Bluetooth is active, as current draw can be significant.

Connecting peripherals is straightforward. For example, to blink an LED, connect an LED's anode to a digital GPIO pin (e.g., GPIO2) and its cathode to a current-limiting resistor (e.g., 220-330 Ohms), then connect the other end of the resistor to GND. When the GPIO pin is set HIGH (3.3V), the LED will light up. For I2C communication with a sensor, connect the sensor's SDA pin to the ESP32's GPIO21 (SDA) and the sensor's SCL pin to GPIO22 (SCL). Remember to also connect the sensor's VCC to 3.3V and GND to the ESP32's GND.

When using the U.FL connector for an external antenna, ensure it is properly seated and that the antenna is designed for the 2.4 GHz frequency band used by Wi-Fi and Bluetooth. Incorrect antenna matching or using the wrong type of antenna can lead to poor performance or even damage to the RF circuitry. Always refer to the specific breakout board's documentation for exact pin mappings and recommended wiring practices.

Programming & getting started

The ESP32-WROOM-32U is highly versatile in its programming options. The most popular approach for makers is using the Arduino IDE with the Espressif ESP32 board support package installed. This allows you to write C++ code using familiar Arduino libraries and functions. Another excellent option is MicroPython, which brings Python programming to the ESP32, offering a more beginner-friendly syntax and rapid prototyping capabilities. For advanced users and production environments, Espressif's official ESP-IDF (Espressif IoT Development Framework) provides a powerful C/C++ SDK with extensive features and optimizations.

To get started with the Arduino IDE: 1. Install the Arduino IDE. 2. Go to File > Preferences and add 'https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json' to the Additional Board Manager URLs. 3. Go to Tools > Board > Boards Manager, search for 'esp32', and install the package by Espressif Systems. 4. Select your ESP32 board (e.g., 'ESP32 Dev Module') from the Tools > Board menu. 5. Connect your ESP32-WROOM-32U board to your computer via USB. 6. Select the correct COM port from the Tools > Port menu. 7. Upload a basic sketch, like the 'Blink' example, to verify your setup.

Project ideas

Wi-Fi Connected LED ControllerControl an LED remotely over Wi-Fi using a web server hosted on the ESP32. This project utilizes the ESP32's Wi-Fi capabilities and a digital output pin (e.g., GPIO2), teaching basic web server implementation and network communication.
Bluetooth Low Energy (BLE) Sensor NodeCreate a battery-powered sensor node that transmits temperature and humidity data via BLE to a smartphone app. This project leverages the ESP32's BLE stack and an I2C sensor (like the DHT22 or BME280), demonstrating low-power communication and sensor interfacing.
Voice Controlled Smart PlugBuild a smart plug that can be turned on/off using voice commands processed by a cloud service or an on-device AI. This project involves Wi-Fi connectivity, potentially an I2S microphone for audio input, and GPIO control for a relay, teaching IoT integration and cloud services.
Home Automation HubDevelop a central hub that monitors and controls various smart devices (e.g., lights, sensors) using Wi-Fi and Bluetooth protocols. This project uses multiple GPIOs, Wi-Fi, Bluetooth, and potentially MQTT for communication, teaching distributed systems and network protocols.
ESP32 Weather StationBuild a weather station that collects data from multiple sensors (temperature, humidity, pressure, light) and displays it on an LCD screen or sends it over Wi-Fi. This project utilizes ADC pins for analog sensors, I2C for digital sensors and LCDs, and Wi-Fi for data logging, reinforcing sensor integration and data visualization.
Over-the-Air (OTA) UpdatesImplement a system to update the ESP32's firmware wirelessly without needing a physical connection. This project focuses on network programming and bootloader functionality, crucial for deploying and maintaining IoT devices in the field.

Buying tips & gotchas

When purchasing ESP32-WROOM-32U modules, be aware that they are often integrated onto breakout boards that include USB-to-serial converters, voltage regulators, and breadboard-friendly headers, which are highly recommended for ease of use. Look for boards with CH340 or CP2102 USB-to-serial chips. Avoid very cheap, unbranded modules as they may have quality issues or inaccurate specifications. Ensure your power supply can handle the peak current draw of the ESP32, especially during Wi-Fi transmission, to prevent brownouts and instability. Accessories like external antennas for the U.FL connector, logic level converters, and various sensors are readily available and expand the module's capabilities significantly.