MakerLab
ESP32ESP32-PICO-D4

ESP32-PICO-D4: The All-in-One Wi-Fi and Bluetooth Module for Makers

A compact, integrated module featuring the ESP32 SoC with built-in flash and antenna, ideal for space-constrained IoT projects.

ESP32-PICO-D4

The ESP32-PICO-D4 is a highly integrated System-in-Package (SiP) module designed by Espressif Systems. It encapsulates the powerful ESP32 dual-core microcontroller, along with a 4MB SPI flash memory, a crystal oscillator, and an antenna, all within a small form factor. This integration significantly simplifies the design process for IoT devices, reducing the number of external components required and making it easier to create compact, sophisticated products.

At its heart is the ESP32 chip, a versatile Wi-Fi and Bluetooth enabled microcontroller known for its robust performance, low power consumption, and extensive peripheral set. The ESP32-PICO-D4 leverages this core, offering dual-core processing, a wide range of communication interfaces, and ample GPIO pins for connecting sensors and actuators. It represents a convenient way to access the full power of the ESP32 without the complexity of designing a custom PCB with discrete components.

Positioned as a user-friendly solution within the ESP32 family, the PICO-D4 module is particularly suited for makers and engineers looking to develop prototypes or small-batch production runs where space is a critical constraint. Its integrated antenna and flash memory eliminate the need for external RF design expertise and complex component placement, making it an excellent choice for beginners entering the world of IoT development as well as experienced engineers seeking rapid prototyping.

Released around 2017, the ESP32-PICO-D4 quickly became a popular choice for a wide array of applications, from smart home devices and wearable technology to industrial automation and remote sensing. Its combination of connectivity, processing power, and compact size makes it a go-to solution for projects that demand both wireless communication and a rich set of I/O capabilities in a minimal footprint.

Watch

Related video, embedded from YouTube.

Specifications

Microcontroller / SoCESP32
ArchitectureTensilica Xtensa LX6 dual-core microprocessor
Clock speedUp to 240 MHz
Flash / Storage4MB SPI Flash (integrated in module)
RAM / SRAM520 KB SRAM
Operating voltage3.0V - 3.6V
Digital I/O pinsUp to 34 GPIO (depending on module configuration)
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โ€” (Requires external USB-to-UART converter for programming)
Power input3.0V - 3.6V
Dimensions21.5mm x 16.0mm x 3.1mm (module)

Pinout & pin functions

PinFunction
3V3Power input (3.0V - 3.6V)
GNDGround
ENEnable pin (high for normal operation)
GPIO0Boot mode selection (low during boot for flashing)
GPIO2General purpose I/O, ADC2_CH2, Touch sensor 8
GPIO4General purpose I/O, ADC2_CH4, Touch sensor 4
GPIO5General purpose I/O, ADC2_CH5, Touch sensor 5
GPIO12General purpose I/O, ADC2_CH6, Touch sensor 6, MTDI
GPIO13General purpose I/O, ADC2_CH7, Touch sensor 7, MISO (SPI)
GPIO14General purpose I/O, SCL (I2C), TXD0 (UART0)
GPIO15General purpose I/O, SDA (I2C), RXD0 (UART0), negative GPIO
GPIO16General purpose I/O, RXD2 (UART2)
GPIO17General purpose I/O, TXD2 (UART2)
GPIO18General purpose I/O, ADC1_CH0, Touch sensor 0, SCK (SPI)
GPIO19General purpose I/O, ADC1_CH1, Touch sensor 1, MOSI (SPI)
GPIO21General purpose I/O, ADC1_CH3, Touch sensor 3, SDA (I2C)
GPIO22General purpose I/O, ADC1_CH4, Touch sensor 2, SCL (I2C)
GPIO23General purpose I/O, ADC1_CH5, Touch sensor 9, MOSI (SPI)
GPIO25General purpose I/O, ADC1_CH8, DAC_1
GPIO26General purpose I/O, ADC1_CH9, DAC_2
GPIO27General purpose I/O, ADC1_CH10, Touch sensor 10
GPIO32General purpose I/O, ADC1_CH4, Touch sensor 2
GPIO33General purpose I/O, ADC1_CH5, Touch sensor 9
GPIO34Input only, ADC1_CH6
GPIO35Input only, ADC1_CH7
GPIO36Input only, ADC1_CH0
GPIO39Input only, ADC1_CH3

Wiring & circuit basics

Powering the ESP32-PICO-D4 module requires a stable voltage source between 3.0V and 3.6V. It's crucial to use a power supply capable of delivering at least 500mA, especially when Wi-Fi or Bluetooth is active, as current draw can spike. A common setup involves using a 3.3V voltage regulator (like an AMS1117-3.3) connected to a higher input voltage (e.g., 5V from a USB adapter). Ensure proper decoupling capacitors are placed near the module's power pins to filter out noise and stabilize the voltage.

The ESP32 operates at a 3.3V logic level. 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. For example, to control an LED, connect a GPIO pin to a current-limiting resistor (typically 220-330 ohms) and then to the LED's anode. The LED's cathode connects to GND. When the GPIO pin is HIGH (3.3V), the LED will light up.

For sensors that use I2C communication, like the popular BME280, connect the sensor's SDA pin to the ESP32's SDA pin (e.g., GPIO21) and the sensor's SCL pin to the ESP32's SCL pin (e.g., GPIO22). Both the ESP32 and the sensor need to be connected to a common ground (GND). Many I2C sensors also require a 3.3V power supply, which can be taken from the ESP32's 3V3 pin. Remember that I2C communication often requires pull-up resistors on the SDA and SCL lines, which may be internal to the ESP32 or need to be added externally.

Programming & getting started

The ESP32-PICO-D4 can be programmed using various popular development environments. The Arduino IDE is a common choice, offering a vast library ecosystem and a familiar programming interface. To use it, you'll need to install the ESP32 board support package via the Board Manager. Alternatively, MicroPython and CircuitPython provide Python-based programming, which is excellent for rapid prototyping and learning. For more advanced applications and direct hardware control, Espressif's ESP-IDF (IoT Development Framework) is the official SDK, offering C/C++ development.

To upload code using the Arduino IDE, connect the ESP32-PICO-D4 module to your computer via a USB-to-UART converter (e.g., FTDI or CP2102). Connect the converter's TX to the ESP32's RX pin (e.g., GPIO15) and the converter's RX to the ESP32's TX pin (e.g., GPIO14). Also connect the converter's GND to the ESP32's GND and the converter's 3.3V to the ESP32's 3V3 pin. You'll typically need to hold down the BOOT (GPIO0) button while powering on or resetting the board to enter flashing mode, then select the correct COM port and board in the Arduino IDE and upload your sketch.

Project ideas

Smart Weather StationMonitor temperature, humidity, and pressure using sensors like the BME280, and display readings on a small OLED screen or send them over Wi-Fi to a web server. This project utilizes I2C communication and Wi-Fi connectivity, teaching sensor interfacing and network programming.
ESP32-PICO Home Automation HubCreate a central control unit for smart home devices. Use the ESP32's Wi-Fi and Bluetooth to communicate with various sensors and actuators, and build a simple web interface or mobile app for control. This project explores IoT communication protocols and server-client architectures.
Bluetooth Low Energy (BLE) Heart Rate MonitorInterface with a BLE heart rate sensor and transmit the data over BLE to a smartphone app. This project focuses on understanding and implementing BLE communication, ideal for wearable tech projects.
Wi-Fi Connected RGB LED ControllerControl an addressable RGB LED strip (like WS2812B) remotely via a web interface. The ESP32-PICO-D4 can host a web server to allow users to change colors and patterns. This project covers web development basics and real-time control using GPIO and Wi-Fi.
Low-Power Environmental Sensor NodeDevelop a battery-powered sensor node that wakes up periodically, takes readings (e.g., using an ADC for a light sensor), sends data via Wi-Fi, and then goes back to deep sleep. This project highlights power management techniques crucial for battery-operated IoT devices.
NFC/RFID Tag Reader and Web LoggerConnect an NFC/RFID reader module to the ESP32-PICO-D4 and log scanned tag IDs to a web server. This project involves interfacing with serial communication (UART) for the RFID reader and web communication for logging.

Buying tips & gotchas

When purchasing an ESP32-PICO-D4, ensure you are buying from a reputable supplier to avoid counterfeit modules. Be aware that the 'PICO' module itself is integrated, but it still needs a development board or breakout board to easily access its pins and for USB programming. Common pitfalls include incorrect power supply (using 5V directly on 3.3V pins) or misinterpreting the 3.3V logic level, leading to damaged components. Always check the specific pinout of the breakout board you are using, as pin assignments can vary. Accessories like USB-to-UART converters, 3.3V voltage regulators, and breadboards are essential for getting started.