LVGL ESP32 Display Guide: Setup, Widgets, Touch

LVGL turns a plain TFT display into a real interface. With TFT_eSPI alone, your code draws pixels, lines, and text by hand. With LVGL on top, you get buttons, sliders, gauges, menus, and touch input.

Short answer: install the LVGL 9 library in the Arduino IDE, set up TFT_eSPI for your display driver, connect the two with a flush callback or the LVGL TFT_eSPI helper, then build your screen from widgets. The worked example uses the 2.4 inch touch ILI9341 module from the store. This draft is written against LVGL 9.x, verified against the LVGL docs and the Random Nerd Tutorials LVGL 9.2 example.

What is LVGL, and when should you use it instead of TFT_eSPI alone?

LVGL stands for Light and Versatile Graphics Library. It is a free and open-source graphics library for microcontrollers, released under the MIT license. It gives you widgets (buttons, labels, sliders, charts, lists, images), layout management, event handling, animations, CSS-like styling, multi-language support with UTF-8, and support for touchpads, mice, keyboards, and encoders. It is written in C. Source: LVGL docs and Random Nerd Tutorials.

LVGL does not drive your display. LVGL renders your interface into a memory buffer, then calls a function you provide, the flush callback, to move those pixels to the screen. The display driver, usually TFT_eSPI on an ESP32 SPI display, does the actual SPI transfer.

Use TFT_eSPI alone when the screen shows fixed text, a simple readout, or a static gauge. Use LVGL when the screen needs buttons, menus, sliders, or screens the user navigates. If you have not installed TFT_eSPI yet, follow our TFT_eSPI setup guide first.

Which LVGL version is this guide written against?

This guide is written against LVGL 9.x. The worked Arduino example follows the Random Nerd Tutorials guide, which installs LVGL version 9.2 from the Arduino Library Manager. The LVGL documentation site currently serves the 9.4 docs.

Item LVGL 8.x LVGL 9.x (this guide)
Display driver lv_disp_drv_t, lv_disp_drv_register lv_display_t, lv_display_create
Draw buffer lv_disp_draw_buf_t Buffers passed to lv_display_create
Flush ready call lv_disp_flush_ready lv_display_flush_ready
Input device lv_indev_drv_t, lv_indev_drv_register lv_indev_t, lv_indev_create
Active screen lv_scr_act() lv_screen_active()
Button create lv_btn_create lv_button_create
Main loop call lv_task_handler lv_timer_handler

Source: LVGL 9 docs and the ElectricalFlux LVGL ESP32-S3 guide.

What do you need before you start?

  • An ESP32 board. This guide uses the ESP32 DevKit V1, the same board as the TFT_eSPI setup guide, because its hardware SPI pins match the library examples.
  • A separate SPI TFT module. The worked examples use the 2.4 inch touch ILI9341 module and the 0.96 inch ST7735 module from the store.
  • The Arduino IDE with the ESP32 board package installed, version 2.x or later.
  • TFT_eSPI installed and configured for your display, per our TFT_eSPI setup guide. A setup that already passes its Colour_Test sketch is the starting point.
  • Jumper wires and a breadboard. Keep the SPI wires short: long wires cause signal problems at full SPI speed.

How do you install LVGL in the Arduino IDE?

Open the Library Manager: Sketch, Include Library, Manage Libraries. Search for “lvgl”, find the entry by kisvegabor, and install version 9.2 or later in the 9.x line. Do not install a version 8 release alongside it: one LVGL version per project, and the code in this guide is written for 9.x.

Then prepare the LVGL config file, lv_conf.h. LVGL ships with a template file, lv_conf_template.h, inside the library folder. Copy it, rename the copy to lv_conf.h, and place it in your Arduino libraries folder, not inside the lvgl folder.

Open lv_conf.h and check two settings: the guard near the top that disables the whole file when it is set to 0 must be set to 1, and color depth LV_COLOR_DEPTH must be 16 (RGB565, the 16-bit color TFT_eSPI sends to the display). Your sketch starts with two lines that tell LVGL to use this config file:

#define LV_CONF_INCLUDE_SIMPLE
#include <lvgl.h>

Source: Random Nerd Tutorials LVGL 9.2 guide and the CircuitDigest LVGL Arduino tutorial. If the sketch fails to compile with errors about lv_conf.h not found, the file is in the wrong folder.

How do you wire the display?

Use the same wiring as the TFT_eSPI setup guide. LVGL does not change the wiring: TFT_eSPI still owns the SPI bus, and LVGL only hands it pixels. For an ESP32 DevKit V1 the display wires to the hardware SPI pins: MOSI 23, MISO 19, SCLK 18, CS 15, DC 2, RST 4, with VCC at 3.3V and BLK at 3V3 or a free GPIO for dimming. Connect MISO even if you think you do not need it: the display ID read and the touch controller need it. The full wiring table and the User_Setup.h edit for each driver are in our TFT_eSPI setup guide.

Which display drivers does LVGL work with?

LVGL works with any display driver that can move a rectangle of pixels to the screen. For the store TFT modules, the driver is TFT_eSPI: it supports the ST7735, ST7789, ILI9341, ILI9488, and ST7796 chips, per the TFT_eSPI README. The GC9A01 round display needs its own low-level driver code, as in the CircuitDigest LVGL tutorial. The built-in 1.9 inch ST7789 board (ID 17819) works the same way: TFT_eSPI with the ST7789 driver at 170 by 320, CS 5, RST 4, BL 32, and MOSI 23.

How do you bind LVGL to your display driver?

Binding means telling LVGL three things: how big the screen is, where to put rendered pixels while they wait, and which function moves them to the display. Route A is the one to use with TFT_eSPI. Route B is the manual route, for other display drivers.

Route A: the TFT_eSPI helper (use this first)

LVGL 9 ships a helper that binds TFT_eSPI in one call. The Random Nerd Tutorials LVGL 9.2 example uses it, and it needs no flush callback of your own:

#define SCREEN_WIDTH 240
#define SCREEN_HEIGHT 320

#define DRAW_BUF_SIZE (SCREEN_WIDTH * SCREEN_HEIGHT / 10 * (LV_COLOR_DEPTH / 8))
uint32_t draw_buf[DRAW_BUF_SIZE / 4];

void setup() {
  Serial.begin(115200);
  lv_init();
  lv_display_t * disp;
  disp = lv_tft_espi_create(SCREEN_WIDTH, SCREEN_HEIGHT, draw_buf, sizeof(draw_buf));
  lv_display_set_rotation(disp, LV_DISPLAY_ROTATION_270);
}

lv_tft_espi_create creates the LVGL display, registers the TFT_eSPI flush function behind the scenes, and attaches your draw buffer. The rotation call turns the portrait 240 by 320 panel into landscape. Source: Random Nerd Tutorials.

DRAW_BUF_SIZE is one tenth of the screen, in 16-bit pixels: 7,680 pixels, or 15,360 bytes, for a 240 by 320 screen. A bigger buffer means smoother animation but costs RAM. If animations stutter, raise it to one quarter. If the sketch crashes on boot, shrink it.

Route B: the manual flush callback

If your display driver is not TFT_eSPI, write the flush callback yourself. LVGL calls it whenever a rectangle of the screen needs updating. The callback receives the display, the rectangle (area), and the pixel data (px_map), sends that rectangle to the screen, then tells LVGL the buffer is free:

void my_disp_flush(lv_display_t *disp, const lv_area_t *area, uint8_t *px_map)
{
  uint32_t w = (area->x2 - area->x1 + 1);
  uint32_t h = (area->y2 - area->y1 + 1);
  lcd.startWrite();
  lcd.setAddrWindow(area->x1, area->y1, w, h);
  lcd.pushColors((uint16_t *)px_map, w * h, true);
  lcd.endWrite();
  lv_display_flush_ready(disp);
}

The area coordinates are inclusive, so both dimensions need plus 1. lv_display_flush_ready(disp) is not optional: without it, LVGL waits forever for a buffer that never comes back, and the screen freezes after the first frame. Register the callback with lv_display_create, lv_display_set_buffers, and lv_display_set_flush_cb. Source: SmartDocs. Two buffers give double buffering; one buffer works too and uses half the RAM.

How do you build the first screen?

Once the display is bound, the rest is widgets. This example is adapted from the Random Nerd Tutorials LVGL 9.2 sketch: a label, a button that counts clicks, and a slider that prints its value.

void lv_create_main_gui(void) {
  lv_obj_t * text_label = lv_label_create(lv_screen_active());
  lv_label_set_text(text_label, "Hello, world!");
  lv_obj_align(text_label, LV_ALIGN_CENTER, 0, -90);

  lv_obj_t * btn1 = lv_button_create(lv_screen_active());
  lv_obj_add_event_cb(btn1, event_handler_btn1, LV_EVENT_ALL, NULL);
  lv_obj_align(btn1, LV_ALIGN_CENTER, 0, -50);
  lv_obj_t * btn_label = lv_label_create(btn1);
  lv_label_set_text(btn_label, "Button");
  lv_obj_center(btn_label);

  lv_obj_t * slider = lv_slider_create(lv_screen_active());
  lv_obj_align(slider, LV_ALIGN_CENTER, 0, 60);
  lv_obj_add_event_cb(slider, slider_event_callback, LV_EVENT_VALUE_CHANGED, NULL);
  lv_slider_set_range(slider, 0, 100);
}

The event callback reads the event code and acts on it:

static void event_handler_btn1(lv_event_t * e) {
  lv_event_code_t code = lv_event_get_code(e);
  if(code == LV_EVENT_CLICKED) {
    btn1_count++;
  }
}

And the main loop hands time to LVGL. LVGL needs a millisecond tick and regular calls to its handler, or nothing moves: no animations, no touch, no screen updates.

void loop() {
  lv_timer_handler();
  lv_tick_inc(5);
  delay(5);
}

Source: Random Nerd Tutorials. Note that their code calls the handler lv_task_handler, the LVGL 8 name. In LVGL 9 the function is lv_timer_handler. If your loop blocks for more than a few milliseconds, the interface freezes for the same time.

Which widgets should you use?

Every widget follows the same pattern: create it on a parent, set its size and position, style it, and add an event callback if it takes input.

Widget Create call (LVGL 9) Use it for
Label lv_label_create Text, readouts, titles
Button lv_button_create Actions, toggles, navigation
Slider lv_slider_create Brightness, volume, setpoints from 0 to 100
Bar lv_bar_create Progress, battery level, signal strength

LVGL also has arcs, charts, images, dropdowns, switches, keyboards, text areas, menus, tabs, tables, and animations; the full list is in the LVGL docs widget section. Two rules apply to all of them. First, every object has a parent: a widget created with no parent goes on the active screen, and a widget created on a button becomes part of that button, like the label inside btn1 above. Second, styles are CSS-like: set colors, fonts, padding, and radius per widget, or per state, such as pressed or checked. Source: Random Nerd Tutorials and the LVGL docs widget examples.

How do you add touch input?

A touch display needs a second driver: one for the screen, one for the touch controller. The touch modules in the store use the XPT2046 resistive touch controller. The steps below follow the Random Nerd Tutorials LVGL 9.2 example.

Install the XPT2046_Touchscreen library from the Library Manager, then define the touch pins and start a second SPI bus for the touch chip. The touch chip has its own chip select, so it shares MOSI, MISO, and SCK with the display:

#define XPT2046_IRQ 36
#define XPT2046_MOSI 32
#define XPT2046_MISO 39
#define XPT2046_CLK 25
#define XPT2046_CS 33

SPIClass touchscreenSPI = SPIClass(VSPI);
XPT2046_Touchscreen touchscreen(XPT2046_CS, XPT2046_IRQ);

In setup, start the touch SPI, begin the touchscreen, and set its rotation to match the display rotation. Then register the touch input device with LVGL and give it a read callback:

touchscreenSPI.begin(XPT2046_CLK, XPT2046_MISO, XPT2046_MOSI, XPT2046_CS);
touchscreen.begin(touchscreenSPI);
touchscreen.setRotation(2);

lv_indev_t * indev = lv_indev_create();
lv_indev_set_type(indev, LV_INDEV_TYPE_POINTER);
lv_indev_set_read_cb(indev, touchscreen_read);

The read callback checks the touch state, reads the point, and maps the raw touch values to screen pixels:

void touchscreen_read(lv_indev_t * indev, lv_indev_data_t * data) {
  if(touchscreen.tirqTouched() && touchscreen.touched()) {
    TS_Point p = touchscreen.getPoint();
    x = map(p.x, 200, 3700, 1, SCREEN_WIDTH);
    y = map(p.y, 240, 3800, 1, SCREEN_HEIGHT);
    data->state = LV_INDEV_STATE_PRESSED;
    data->point.x = x;
    data->point.y = y;
  }
  else {
    data->state = LV_INDEV_STATE_RELEASED;
  }
}

Source: Random Nerd Tutorials. Two warnings. First, the calibration numbers in the map calls, 200 to 3700 on X and 240 to 3800 on Y, are the values for the 2.8 inch touch module in that tutorial, not the 2.4 inch touch module in the store. Read the raw touch values from your own module, then set the map limits to your module. A button that only responds on one side of the screen is almost always a calibration problem. Second, if the touch picture is upside down or mirrored, change the touchscreen rotation value, not the LVGL rotation.

How do you use fonts and images?

LVGL ships with built-in fonts, and it can load custom fonts and images.

Built-in fonts. LVGL includes the Montserrat font in several sizes, enabled in lv_conf.h. A label uses the default font unless you set another one with lv_obj_set_style_text_font. Keep the enabled set small: every font size adds flash use.

Custom fonts. For a font LVGL does not ship, use the LVGL font converter linked from the LVGL docs. It converts a font file into a C array you add to your sketch. Generate it for LVGL 9, not LVGL 8.

Images. LVGL shows images from C arrays compiled into the sketch, or from files on a filesystem such as an SD card. The LVGL image converter, also linked from the LVGL docs, turns a PNG or JPG into a C array. A full-screen photo at 240 by 320 in 16-bit color is about 150 kB, so keep images small or load them from a card.

What about the ESP-IDF path?

The Arduino path above is the fastest way to a working screen. The ESP-IDF path gives more control, and it is the path Espressif documents for production firmware. The LVGL docs page “Add LVGL to an ESP32 IDF project” covers it.

The simplest ESP-IDF route is the esp_lvgl_port component, which provides helper functions for installing LVGL and display drivers, plus touch, encoder, button, and USB HID input support:

idf.py create-project my_lvgl_app
cd my_lvgl_app
idf.py add-dependency "espressif/esp_lvgl_port^2.3.0"

The esp_lvgl_port component supports LVGL versions 8 and 9 and is compatible with ESP-IDF v5.2 and above. By default it pulls the latest stable LVGL, so pin a version if your project must stay on one. To add LVGL without the port component, use idf.py add-dependency “lvgl/lvgl^9.*”. Then configure LVGL with idf.py menuconfig and add a display driver and a touch driver from the ESP component registry. Source: LVGL docs, “Add LVGL to an ESP32 IDF project”.

What are the common mistakes?

  • Mixing LVGL 8 code with LVGL 9. lv_disp_drv_t, lv_btn_create, lv_scr_act, and lv_task_handler are LVGL 8 names. LVGL 9 uses lv_display_t, lv_button_create, lv_screen_active, and lv_timer_handler. One version per project.
  • A lv_conf.h from another tutorial. The config file must match your LVGL version and your display. Copy the template from your own installed library.
  • Forgetting lv_display_flush_ready in a manual flush callback. The screen draws one frame, then freezes forever.
  • No tick and no handler in loop. LVGL needs lv_tick_inc and lv_timer_handler called regularly. A blocking loop freezes the interface.
  • A draw buffer that is too small or too big. Too small and animations stutter. Too big and the sketch crashes on boot. Start at one tenth of the screen, and set LV_COLOR_DEPTH to 16: the store TFT modules use 16-bit color.

How do you fix an LVGL display that does not work?

Work through the stack from the bottom up: wiring, TFT_eSPI, LVGL config, then your code.

The screen stays white or black after upload. Check the backlight first, then run Colour_Test without LVGL. If Colour_Test fails, the problem is wiring or User_Setup.h, not LVGL. Source: our TFT_eSPI setup guide.

The screen shows the first frame, then freezes. The flush callback never told LVGL the buffer was free. Check that lv_display_flush_ready(disp) runs at the end of your flush callback.

The picture is there but the colors are wrong. Check LV_COLOR_DEPTH is 16, and check the byte swap setting in TFT_eSPI. The SmartDocs guide lists enabling byte swapping with tft.setSwapBytes(true) as the fix for garbled colors. Source: SmartDocs.

Buttons do not respond to touch. Check lv_indev_create and lv_indev_set_read_cb ran in setup, check the touch CS pin, and check the calibration map limits. Source: SmartDocs and Random Nerd Tutorials.

Which route should you pick?

Match the tool to the job. For display selection, see our display buying guide.

Project Pick Why
Temperature readout, clock, status text TFT_eSPI alone No buttons, no menus, less code
Thermostat with setpoint buttons LVGL on TFT_eSPI, Route A Buttons and a slider, one afternoon of work
Production firmware LVGL on ESP-IDF with esp_lvgl_port Version-pinned components and full control

Parts used in this guide

Prices and stock were verified live on qualityrcparts.com on 2026-11-21 through the public Store API. All four items are in stock.

Shipped fast and securely from our secure facility in Queensbury, NY. QRC ships within the USA only.

Related guides

FAQ

What is LVGL? LVGL is the Light and Versatile Graphics Library, a free and open-source graphics library under the MIT license. It provides widgets such as buttons, labels, sliders, charts, and lists, plus layouts, styles, animations, and touch input. Source: LVGL docs and Random Nerd Tutorials.

Can I use LVGL with an ESP32 and a TFT display? Yes. Install LVGL 9 in the Arduino IDE, set up TFT_eSPI for your display driver, bind them with the TFT_eSPI helper or a flush callback, then build your screen from widgets. Source: Random Nerd Tutorials LVGL 9.2 guide.

Which LVGL version should I install? Install LVGL 9.x for a new project. This guide is written against LVGL 9.2, and the LVGL docs currently serve the 9.4 line. LVGL 9 changed the display, input device, button, and screen function names, so LVGL 8 code will not compile against LVGL 9 without changes. Source: LVGL docs and the ElectricalFlux LVGL ESP32-S3 guide.

Why is my LVGL screen blank after upload? Check the backlight first, then run the TFT_eSPI Colour_Test sketch without LVGL. If Colour_Test fails, the problem is wiring or User_Setup.h, not LVGL. If it passes, check lv_conf.h placement and that loop calls lv_timer_handler and lv_tick_inc. Source: our TFT_eSPI setup guide and SmartDocs.

How do I add touch to LVGL on ESP32? Use the XPT2046 touch controller on touch TFT modules. Install the XPT2046_Touchscreen library, start a second SPI bus for the touch chip with its own chip select pin, register an LVGL input device with lv_indev_create, and set a read callback that maps raw touch values to screen pixels. Source: Random Nerd Tutorials.

Can I use LVGL with ESP-IDF instead of Arduino? Yes. Add the esp_lvgl_port component with idf.py add-dependency “espressif/esp_lvgl_port^2.3.0”, or add LVGL directly with idf.py add-dependency “lvgl/lvgl^9.*”. Source: LVGL docs, “Add LVGL to an ESP32 IDF project”.

Sources

Last updated: 2026-11-21

Low-Power ESP32 Battery Projects: Deep Sleep and Solar

A battery ESP32 project lives or dies on one number: average current. Get it right and a single 3000 mAh cell runs a field sensor for months. Get it wrong and the same cell is dead before dinner.

This guide covers the five power modes, every wake source, board-level sleep drain, battery sizing, solar sizing, and the mistakes that drain a pack in days. The sensor node build is covered in ESP32 Battery Sensor Node: Deep Sleep and Power Budget, and LiPo wiring in How to Power ESP32 and Arduino Projects on LiPo Power.

How long can an ESP32 really run on battery?

Battery life in hours equals usable battery capacity divided by average current. Average current is the awake share times the awake current, plus the sleep share times the sleep current. Source: ProjectECH; DroneBot Workshop; Hubble.

Take a node that wakes for 20 seconds at 180 mA and sleeps at 15 microamps, on one 18650 cell with a realistic usable capacity of 2400 mAh. Source: ProjectECH.

Report interval Average current Battery life from 2400 mAh
Every 10 minutes (180 x 20 + 0.015 x 580) / 600 = about 6.0 mA About 400 hours, about 16 days
Every 60 minutes (180 x 20 + 0.015 x 3580) / 3600 = about 1.01 mA About 2376 hours, about 99 days

Three lessons fall out of that table. First, the interval dominates: 60-minute reports give roughly 6 times the battery life of 10-minute reports. Second, sleep current matters: with a 5 mA sleep the 60-minute column collapses to about 17 days. Third, awake time is the other lever: Wi-Fi can spend 3 to 8 seconds just joining the network, so cut the awake window to 5 seconds. Source: ProjectECH.

Radios differ too: Wi-Fi transmit runs about 160 to 260 mA, BLE about 95 to 130 mA, and LoRa about 20 to 120 mA transmit with about 0.2 microamps in sleep. Source: ProjectECH; Hubble.

Which sleep mode does your project need?

The ESP32 has five power states. The figures below are chip-level typicals; your board will draw more. Source: DroneBot Workshop; Espressif sleep modes documentation.

Mode CPU and peripherals Radio Typical chip current What survives
Active On On or off 240 mA Wi-Fi transmit peak Everything
Modem sleep On Off between checks About 3 to 20 mA Everything, Wi-Fi association kept
Light sleep Paused Off About 0.8 mA RAM and registers, resumes where it stopped
Deep sleep Off Off About 10 to 25 microamps RTC memory only, 8 KB slow memory
Hibernation Off Off About 2.5 microamps Nothing guaranteed, not even RTC memory

Active is the normal running state; the only saving is lowering the CPU clock. Modem sleep turns the radios off between transmissions while the CPU keeps running, staying associated with the router by waking the radio on the DTIM interval. Light sleep pauses the CPU clock but preserves RAM and registers. Deep sleep powers down almost everything; only the RTC domain and optionally the ULP coprocessor stay alive. Hibernation is the deepest state: even the 8 MHz RTC oscillator and the ULP coprocessor are off, and RTC memory is not guaranteed. The only wake source is an EXT0 GPIO interrupt. Source: DroneBot Workshop.

What wakes the ESP32 from deep sleep?

The wake source defines the whole power profile. Source: ProjectECH; DroneBot Workshop; Hubble.

Wake source How it works Best for
Timer wake RTC timer fires after N microseconds Periodic sensing: wake, read, send, sleep
EXT0 wake One RTC GPIO goes high or low One event: a PIR motion sensor, a float switch, a door switch
EXT1 wake Any of several RTC GPIOs changes Several events at once
Touch pad wake A configured touch pad crosses its threshold A manual “report now” button on a sealed enclosure
ULP coprocessor Runs while the main CPUs sleep, about 150 microamps typical Wake the main CPU only on a threshold

Timer wake is the workhorse: call esp_sleep_enable_timer_wakeup(), then esp_deep_sleep_start(). EXT0 and EXT1 wake on a pin: EXT0 watches one RTC GPIO at one level, ideal for a PIR sensor, and EXT1 watches several. On the standard ESP32, RTC-capable GPIOs are 0, 2, 4, 12 to 15, 25 to 27, and 32 to 39. Touch wake uses the capacitive touch pins. The ULP coprocessor can poll an ADC channel or a GPIO while the main CPUs sleep and wake the main CPU only on a threshold. Source: ProjectECH; DroneBot Workshop; Hubble.

Always configure a wake source first, or the chip sleeps forever. Source: ProjectECH.

State survives deep sleep through RTC slow memory: variables declared with RTC_DATA_ATTR survive deep sleep, but not a power loss or a hard reset. Source: ProjectECH; TheLinuxCode; post 23387.

Why does your dev board never reach the datasheet sleep current?

The datasheet deep sleep figure is the bare chip. A dev board adds parts that draw current around the clock, and those parts dominate the sleep budget. Source: ProjectECH; DroneBot Workshop; post 23387.

A typical 30-pin DevKit board carries an AMS1117-3.3 linear regulator with a quiescent current of about 5 mA typical. With the USB chip, power LED, and pull-ups added, a “sleeping” dev board typically draws 5 to 15 mA. At 10 mA, a 3000 mAh cell lasts 300 hours, under two weeks. Source: ProjectECH; DroneBot Workshop.

Fix it in one of three ways: power the board through the 3V3 pin from an efficient external regulator; use a bare ESP32 module on a minimal breakout; or use a board designed for battery use. Measure the sleep current yourself first. Source: ProjectECH.

The XIAO boards stocked at QRC are the battery-friendly end of this scale, and the figures conflict across sources, so they are stated here as a sourced range, never as a single bench-tested number. Seeed’s wiki lists the plain XIAO ESP32S3 at 14 microamps in deep sleep, 2 mA in light sleep, and 27 mA in modem sleep. The XIAO ESP32S3 Sense with its expansion board attached is listed at 3 mA in deep sleep: the expansion board costs roughly 200 times the plain board’s sleep current, so detach it for a battery build and use the detachable camera only when the project needs it. The XIAO ESP32S3 Plus is listed at 33.51 microamps in deep sleep, and the XIAO ESP32C3 at 44 microamps. CircuitDigest measured a plain XIAO ESP32S3 board at 130 microamps in deep sleep, against a bare ESP32-S3 chip rating of 7 to 8 microamps. Plan with the worst figure in the range. Source: Seeed Studio XIAO ESP32S3 wiki; CircuitDigest; Embedded Nerd.

How do you size the battery?

Measure the build that will actually run from the battery. Source: UMA Technology; Hubble.

Step 1: measure each operating state. Record current in each state with a USB power meter, and use a multimeter in series with the battery lead for sleep. Source: UMA Technology; Hubble.

Step 2: calculate the average current. For each state, multiply current by time in that state, then sum and divide by the cycle time. Example: wake every 15 minutes, transmit for 5 seconds at 150 mA, sleep the other 895 seconds at 15 microamps. Average equals (5 x 150 + 895 x 0.015) / 900, which is 0.85 mA. Source: Hubble.

Step 3: divide capacity by average current, then derate. A 3000 mAh battery at 0.85 mA average gives about 3,500 hours, about 146 days. Now derate: usable capacity is about 70 to 80 percent of the label after aging, temperature, and self-discharge, so plan on about 2400 mAh usable from a 3000 mAh cell. Source: ProjectECH; Hubble; e-fm.tech.

Step 4: pick the chemistry. A standard LiPo at 3.7 V is workable for 6 to 12 month projects. A LiFePO4 cell at 3.2 V has low self-discharge around 3 percent per year, so it suits solar recharging. A CR2032 at 220 mAh suits only the lowest-power applications. Source: Hubble.

The biggest lever is the awake time: every second of Wi-Fi connect time at 150 mA costs as much as 150 seconds of sleep at 1 mA. Source: post 23387.

How do you size a solar panel for an ESP32 project?

A solar panel only has to replace what the board uses, plus the charging losses. Size it from the worst month, not the average: a panel sized for summer sun dies by mid-December. Source: Hubble solar sizing guide; e-fm.tech.

Step 1: daily energy. Daily energy equals average current times supply voltage times 24 hours. The 0.85 mA node at 3.7 V uses about 76 mWh per day. Source: Hubble solar sizing guide.

Step 2: battery autonomy. Size for three cloudy days: three days at 76 mWh per day is 228 mWh, or about 62 mAh at 3.7 V. Source: e-fm.tech; post 23188; post 15185.

Step 3: worst-month peak sun hours. Peak sun hours are the hours per day of full sunlight that would deliver the same energy as the real day. Look it up for your coordinates with PVGIS or NASA POWER, and use the worst month. Source: e-fm.tech.

Step 4: panel watts. Panel watts are about equal to daily energy divided by (charging efficiency times peak sun hours times a derating factor). The worked example comes out to about 0.021 to 0.11 W. In practice, fit a panel several times larger than the paper minimum. Source: e-fm.tech; Hubble solar sizing guide.

Step 5: charge controller. A small panel charging a single lithium cell needs a charger that terminates at 4.2 V and a protection circuit. The TP4056 module below charges a single cell from USB or a solar panel at up to 1 A. Standard lithium-ion and LiPo cells should not be charged below about 0 degrees C. Source: ProjectECH; e-fm.tech.

No solar panel is stocked at QRC as of 2026-11-21, so no panel is linked in this guide. The BirdBox build in Run a BirdBox Camera for Months on Solar Power shows the same pattern: panel in full sun, short cable, battery sized for three cloudy days.

How do you charge and protect the pack?

Charging, protection, and regulation are three separate jobs, and one module does not always do all three. The full wiring chain is covered in How to Power ESP32 and Arduino Projects on LiPo Power. Source: post 19087.

The TP4056 load-sharing trap. The TP4056 has no load sharing: it cannot tell current going into the battery from current drawn by your circuit. With the load on the battery terminals, the charger sees the load current as charge current, never detects the proper termination taper, and can keep pushing current into an already-full cell. Wire battery to B+ and B-, supply to IN+ and IN-, and take system power from OUT+ and OUT-. The proper fix is a load-sharing power-path circuit. Source: ProjectECH; post 19087.

The cutoff voltage has no single agreed number. Sources disagree on the per-cell cutoff, with figures from 3.0 V to 3.5 V per cell. This guide states that range and does not pick one number. Read the cutoff from the docs for the protection module and the battery you own, and wire the protection so it disconnects the pack from everything. The stocked 3000 mAh pack below has a built-in protection board. Source: post 19087.

What mistakes drain a battery pack in days?

  • Trusting the chip sleep figure for the whole board. The chip sleeps at 10 to 25 microamps; the board sleeps at milliamps. Measure the whole board.
  • Leaving Wi-Fi on between readings. A board that idles with Wi-Fi connected draws 35 mA or more. Sleep between readings.
  • Letting Wi-Fi join slowly, every cycle. Every awake second at 150 mA costs as much as 150 seconds of sleep at 1 mA. Use a static IP and cap retries at three.
  • Sizing the solar panel for summer. The panel must cover the worst month, not the average. Size from worst-month peak sun hours, and test through a cloudy week.
  • Never measuring the sleep current. Every battery estimate in this guide is arithmetic from stated inputs. Measure your own board’s sleep current and redo the math.

How do you fix a low-power project that dies too soon?

The board draws milliamps in deep sleep. Measure the board alone, then the regulator or converter alone. The likely causes are the power LED, the USB-to-serial chip, or a regulator with high standby draw. Power the 3V3 pin directly from a regulated 3.3 V supply, or remove the power LED where the board allows it. Source: DroneBot Workshop; post 23387.

The node boot-loops when the battery gets low. A nearly empty cell sags under a Wi-Fi transmit burst, and if the sag crosses the brownout threshold the chip resets mid-transmission. Treat 3.2 to 3.3 V under load as the effective empty point. The brownout fix is covered in ESP32-CAM Troubleshooting: Brownout and Camera Init Failed. Source: ProjectECH.

The battery voltage falls every week even with solar. The panel is too small for the worst month, the panel is shaded or flat, or the charge current never tapers. Check the battery voltage after the first week, and add panel size if it keeps falling. Source: post 23188; ProjectECH.

Which low-power setup fits your project?

Project Wake source Sleep mode Battery Solar
Temperature sensor, hourly reports Timer Deep sleep 3000 mAh 1S LiPo pack Not needed
PIR wildlife or BirdBox camera EXT0 on the PIR output Deep sleep 3000 mAh pack or larger Yes, worst-month panel
Always-on display or dashboard None, it must stay awake Modem sleep between updates USB power bank or mains No, the radio stays too busy
BLE beacon Timer, duty-cycled BLE scan Deep sleep between scans XIAO board with on-board charging Optional

Parts used in this guide

Prices and stock verified live on 2026-11-21. All four items below are in stock and purchasable.

Also verified live in stock: XIAO ESP32C6 1-Pack (ID 17835) $15.99 sale; XIAO ESP32-C5 1-Pack (ID 18380) $17.99 sale; XIAO ESP32S3 Sense 1-Pack (ID 17842) $32.49 sale, detachable camera; ESP32 DevKit V1, $9.99 sale; USB-C LiPo Module 1200mAh (ID 18959) $14.99 sale; HC-SR501 PIR (ID 14636) $5.99 sale; CellMeter8 (ID 3485) $19.99. No solar panel is stocked at QRC, so none is linked.

Shipped fast and securely from our secure facility in Queensbury, NY. QRC ships within the USA only.

Related guides

FAQ

How long will an ESP32 run on a battery? It depends on the average current, not the pack size alone. A node that wakes 5 seconds at 150 mA every 15 minutes and sleeps at 15 microamps averages about 0.85 mA, so a 3000 mAh battery gives about 146 days. Source: Hubble.

Why does my ESP32 use milliamps in deep sleep? The datasheet figure is the bare chip. The dev board adds a linear regulator with about 5 mA quiescent current, a USB-to-serial chip, and a power LED. Source: ProjectECH; DroneBot Workshop.

What wakes an ESP32 from deep sleep? The RTC timer for periodic work, EXT0 for one pin event such as a PIR sensor, EXT1 for any of several pins, a touch pad for a button, and the ULP coprocessor at about 150 microamps. Source: ProjectECH; Hubble.

How big a battery do I need for an ESP32 sensor? Work out the average current first, then divide capacity by average current, then derate to about 70 to 80 percent usable. Source: ProjectECH; Hubble.

Can I run an ESP32 on solar power? Yes. Work out the daily energy, size the battery for three cloudy days, look up the worst-month peak sun hours, and divide daily energy by charging efficiency times peak sun hours times a derating factor. Source: Hubble; e-fm.tech.

What is a safe cutoff voltage for a LiPo on an ESP32 project? No single cutoff voltage is universal: sources disagree, with figures from 3.0 V to 3.5 V per cell. Use a protected pack or a protection module, read the cutoff from its docs, and wire it so it disconnects the pack from all loads. Source: post 19087.

Sources

Last updated: 2026-11-21

A4988 vs DRV8825 vs TMC2209: Which Stepper Driver Wins

Buy the TMC2209 for any new 3D printer or CNC build that runs in a room with people in it. Buy the DRV8825 when the axis needs more than 29 V and noise does not matter. Buy the A4988 only when the budget is the whole decision, or when you are replacing a dead A4988 in a machine that already works. All three are bipolar stepper chopper drivers on the StepStick footprint. Source: QRC posts 16272 and 23584.

A4988 vs DRV8825 vs TMC2209 at a glance

Feature A4988 (Allegro) DRV8825 (TI) TMC2209 (Trinamic/ADI)
Max continuous current 1.0 A/phase (2.0 A max, cooled) 1.5 A/coil (2.5 A chip max, heatsinked) 2.0 A RMS, 2.8 A peak/coil
Max microstepping 1/16 1/32 1/256 interpolated
Noise Loud PWM whine Very loud harsh chopping Silent StealthChop2
Configuration Jumpers, VREF pot Jumpers, VREF pot UART or jumpers
Sensorless stall detection No No Yes, StallGuard4 via UART
Voltage range 8 to 35 V 8.2 to 45 V 4.75 to 29 V chip, 4.75 to 28 V listing
Best use Basic prototyping, low-cost plotters Standard 3D printers, light CNC, high voltage axes Silent operation, sensorless homing

Sources: QRC post 16272; Allegro A4988, TI DRV8825, and Trinamic TMC2209 datasheets; QRC listings 17896, 23573, and 19618.

When does the A4988 win?

The A4988 wins on price and on nothing else. It is the cheapest way into stepper control and the workhorse of a decade of RepRap printers. The QRC single module costs $6.99 and includes a heatsink. Its limits are real: 1 A per phase without a heatsink, 2 A max with cooling, per the Allegro datasheet, and the QRC listing states up to 1.2 A continuous per phase. It thermally throttles at roughly 1.2 A without a heatsink, it stops at 1/16 microstepping, its fixed-decay chopping buzzes at low speed, and it runs on 5 V logic, with 3.3 V unreliable, so an ESP32 build needs level shifting. Source: QRC post 16272; QRC listing 17896; ElectricalFlux ESP32 guide. Buy it when the motor is small, the budget is tight, and the noise does not matter. Do not buy it for a printer on a desk or any motor above 1.2 A per phase.

When does the DRV8825 win?

The DRV8825 wins when the axis needs voltage or current the A4988 cannot give, and the TMC2209 ceiling is in the way. Its motor supply runs 8.2 V to 45 V, the widest range of the three, so it is the only one that handles a 36 V axis or a high-speed CNC axis. It is rated 1.5 A per coil, with a chip maximum of 2.5 A per coil with proper heatsinking at 24 V and 25 C, per the TI datasheet. The QRC listing adds one more chip figure: 1.75 A RMS per coil with proper heatsinking. Source: QRC post 16272; TI DRV8825 datasheet SLVSA73F; QRC listing 23573. Its microstepping runs full step to 1/32 step, set with the M0, M1, and M2 pins. One mapping difference matters when swapping from an A4988: the setting that gives 1/16 step on the A4988 gives 1/32 step on the DRV8825. Buy it for a standard 3D printer axis, a light CNC axis, or any axis above 29 V. Do not buy it for a silent build: it is the loudest of the three.

When does the TMC2209 win?

The TMC2209 wins for any new build in 2026 where the machine runs near people. StealthChop2 removes the high-pitch whine of the older drivers, StallGuard4 lets the axis home with no endstop switch, and CoolStep cuts the current automatically when the load is light. Its current rating is 2 A RMS and 2.8 A peak per coil, per the Trinamic TMC2209 datasheet Rev 1.05, and the QRC 5-pack listing states the same figures. That is the highest continuous current of the three, and it is an RMS figure, not a peak figure. Source: QRC post 16272; Trinamic datasheet Rev 1.05; QRC listing 19618. Its limits are the voltage ceiling and the setup effort: the chip tops out at 29 V, and the store listing states 4.75 to 28 V, so a 36 V axis belongs on the DRV8825, and UART needs a wire and a firmware change. Once configured, current, microstepping, and mode change in firmware. Source: QRC post 16272; Sounds Electric TMC2209 guide. Buy it for a 3D printer, a CNC machine in a shared room, or any build that needs sensorless homing. Do not buy it for an axis above 28 V, or for a NEMA 23 motor over 2 A RMS per coil: that job belongs to a larger external driver such as the DM542 in post 16272.

Current compared: the RMS versus peak trap

The three current ratings look comparable in a table. They are not, because they are measured differently. The A4988 and DRV8825 formulas set a peak current: the top of the sine wave each coil sees during microstepping. The TMC2209 formula sets an RMS current: the heating value of that sine wave, about 70.7 percent of the peak. So 1 A on a TMC2209 is not the same setting as 1 A on an A4988: the TMC2209 at 1 A RMS pushes each coil to a 1.41 A peak. Source: The Science 360 VREF guide; Trinamic datasheet Rev 1.05 via BIGTREETECH. Size the driver from the motor rated phase current with headroom, not from the headline number. The rule from QRC post 16272 is: driver continuous current must be at least 1.5 times the motor continuous running current, and peak current must cover the stall current. A 1.5 A NEMA 17 needs a driver that holds 1.5 A continuously: the A4988 at 1 A cannot do it, the DRV8825 at 1.5 A is borderline and runs hot without a fan, and the TMC2209 at 2 A RMS handles it with margin.

Microstepping compared: resolution is not accuracy

Microstepping splits each full step into smaller steps, which makes motion smoother and quieter. It does not add holding torque, and it does not add positioning accuracy in the way the numbers suggest. A 1.8 degree stepper is accurate to about plus or minus 5 percent of a full step no matter how finely you slice it. The A4988 runs full step to 1/16 step (200 to 3,200 steps per rev on a 1.8 degree motor), the DRV8825 runs full step to 1/32 step (200 to 6,400), and the TMC2209 runs to 1/256 interpolated steps (up to 51,200) through MicroPlyer interpolation, which smooths incoming step signals up to 256 subdivisions. Full-step mode gives the most torque per step on every driver, so if an axis loses steps at high microstepping, dropping back to a coarser step setting is a legitimate fix. Source: QRC post 16272; Sounds Electric TMC2209 guide. Do not pick a driver for its microstepping number alone: a 1/256 driver on a machine with a loose belt and a wobbling frame still prints wobble.

Noise compared: why the old drivers whine

The A4988 and the DRV8825 chop the motor current with a fixed-decay chopper whose switching frequency falls in the human hearing range, typically 2 kHz to 20 kHz. The motor turns that switching into a constant whine during every move, with the pitch shifting with speed. Higher VREF settings and low microstepping make it worse. Source: ElectricalFlux stepper driver module guide; Sounds Electric TMC2209 guide. The TMC2209 fixes this two ways. StealthChop2 is a voltage-mode PWM chopper that keeps the motor near silent at low and medium speeds. SpreadCycle is a current-mode chopper that gives higher torque for rapid moves, at the cost of more noise. The driver switches between them, so print moves stay quiet and travel moves keep their torque. The A4988 and DRV8825 have no equivalent: their only noise fix is more microstepping, which helps a little and never reaches silence. Source: Sounds Electric guide; QRC post 16272.

Heat compared: where the current goes

Every amp a chopper driver regulates turns partly into heat in the chip. The A4988 thermally throttles at roughly 1.2 A without a heatsink. The DRV8825 needs a heatsink plus airflow above about 1.5 A per coil, or the chip throttles on temperature. The TMC2209 runs cooler at the same load because CoolStep cuts the current when the load is light. Source: ElectricalFlux stepper driver module guide; QRC listings 17896 and 23573; Sounds Electric TMC2209 guide. For all three: fit the heatsink, keep air moving across the driver bank, and never treat the headline current as a continuous rating. A driver that stops after three minutes, then works again after cooling, has hit thermal shutdown. Source: ElectricalFlux module guide.

How to set the current limit: VREF, worked examples

Set the current limit before connecting the motor. The A4988 and the DRV8825 set it with a trim potentiometer: measure VREF between the VREF pin and ground while turning the pot. The TMC2209 sets it in software over UART. Source: QRC post 16272; The Science 360 VREF guide.

Read the sense resistor first. The formula depends on the sense resistor printed on your board, not just on the chip. The sense resistors are two small black parts near the chip, printed with a code such as R068, R100, or R110: R068 is 0.068 ohm, R100 is 0.100 ohm, R110 is 0.110 ohm. Read your own resistors before copying a number from any guide. Source: The Science 360 VREF guide; Pololu carrier pages.

Driver Formula Worked example
A4988 VREF = 8 x Rs x I 1 A limit: 0.544 V on R068, 0.400 V on R050, 0.8 V on R100. Start at about 70 percent of the motor rated current
DRV8825 VREF = 5 x Rs x I; on a Pololu carrier with R100 resistors, current limit = VREF x 2 1.5 A NEMA 17: VREF = 0.75 V on a Pololu carrier. The x2 shortcut is Pololu-carrier specific
TMC2209 Over UART: set in software with the irun register. Standalone: VREF is about 1.41 x the RMS current on R110 boards 0.8 A RMS: VREF = 1.131 V; pot tops out near 1.77 A RMS

Sources: Allegro and TI datasheets via The Science 360 VREF guide; Pololu carrier pages; BIGTREETECH wiki; QRC post 16272.

How to wire all three

All three share the StepStick footprint. The full A4988 wiring table lives in QRC post 16272. The DRV8825 drops into the same socket, with the same STEP, DIR, VMOT, VDD, and coil pins, and these differences: M0, M1, and M2 instead of MS1, MS2, and MS3, an nFAULT pin, a DECAY pin, and SLEEP and RESET pins in place of SLP and RST. The TMC2209 drops into the same socket too: PDN_UART carries the single-wire UART link, and DIAG signals a stall for sensorless homing. In standalone mode, MS1 and MS2 set the microstepping and the pot sets the current. With UART, firmware sets the current, microstepping, chopper mode, and StallGuard4 threshold. Source: QRC listings 23573 and 19618; QRC post 16272.

DRV8825 microstepping table

M0 M1 M2 Resolution
LOW LOW LOW Full step
HIGH LOW LOW Half step
LOW HIGH LOW 1/4 step
HIGH HIGH LOW 1/8 step
LOW LOW HIGH 1/16 step
HIGH LOW HIGH 1/32 step
LOW HIGH HIGH 1/32 step
HIGH HIGH HIGH 1/32 step

Source: QRC product listing 23573. Note the trap: the M0-M2 setting that gives 1/16 step on the A4988 gives 1/32 step on the DRV8825.

Coil pairing and the bulk capacitor

Find the coil pairs with a multimeter: two wires that show a low resistance between them, typically 1 to 5 ohms, are one coil. Connect coil 1 to 1A and 1B, and coil 2 to 2A and 2B. Fit a bulk capacitor across the motor supply near the driver when the supply leads are long: for A4988 boards, fit at least a 47 uF electrolytic capacitor across VMOT and GND, close to the driver. Without it, voltage spikes can exceed 35 V at VMOT even from a 12 V supply and destroy the driver on power-up. Join the grounds, never unplug a motor cable while powered, and do not leave STEP or DIR floating. Source: QRC post 16272.

Which driver should I buy? The decision table

Your build Pick Why
New 3D printer, desk or bedroom TMC2209 Silent, sensorless homing
3D printer axis above 28 V DRV8825 45 V ceiling
Light CNC axis, 12 to 24 V DRV8825 1.5 A per coil, widest range
Classroom set of 10 drivers A4988 Cheapest per driver
ESP32 build at 3.3 V logic TMC2209 3.3 to 5 V native
NEMA 23 motor over 2 A per coil None of the three Step up to a DM542

What are the common mistakes?

  • Setting VREF from a guide without reading the sense resistor. A 0.544 V setting for a 1 A limit is correct only on a Pololu-style A4988 carrier with 0.068 ohm resistors. Read the R-code first.
  • Using the DRV8825 x2 shortcut on the wrong board. Current limit = VREF x 2 holds only on a Pololu carrier with 0.100 ohm resistors.
  • Comparing a TMC2209 RMS current with an A4988 peak current. 1 A RMS on a TMC2209 pushes each coil to a 1.41 A peak.
  • Swapping an A4988 for a DRV8825 without re-checking the microstep table. The setting that gives 1/16 step on the A4988 gives 1/32 step on the DRV8825.
  • Running an A4988 at the motor full rated current with no heatsink or airflow. It thermally throttles near 1.2 A without a heatsink.

How do I fix a stepper driver problem?

The motor hums and vibrates but does not spin. The coil pairs are mismatched, or VREF is too low. Rewire the coil pairs with a multimeter, then raise VREF in 0.1 V steps.

The driver is too hot to touch, or the motor stops after a few minutes and works again after cooling. The driver hit thermal shutdown. Lower VREF, fit the heatsink, and put a fan across the driver bank. Source: ElectricalFlux module guide.

The motor stalls or skips steps mid-move. The ramp is too aggressive, or the axis hit mid-band resonance at about 2 to 4 revolutions per second. Slow the ramp, change microstepping, or switch to a TMC2209.

The motor moves half as far per step as expected after a driver swap. You swapped an A4988 for a DRV8825 without changing the mode pins. Check the DRV8825 microstepping table above.

Parts used in this guide

Prices and stock were verified live on qualityrcparts.com on 2026-11-21. All three items are in stock and purchasable.

Shipped fast and securely from our secure facility in Queensbury, NY. QRC ships within the USA only.

Related guides

FAQ

Which stepper driver is best for a 3D printer, A4988, DRV8825, or TMC2209? The TMC2209: near silent with StealthChop2, 2 A RMS per coil, and StallGuard4 sensorless homing. The DRV8825 is the pick only above 28 V. Source: QRC post 16272.

Can I replace an A4988 with a TMC2209? Yes, all three share the StepStick footprint. Re-check the microstepping pins and the current setting: TMC2209 figures are RMS, A4988 figures are peak.

What VREF should I set on an A4988? VREF = 8 x Rs x I. On a Pololu carrier with 0.068 ohm resistors, 0.544 V gives a 1 A limit; on a 0.100 ohm board, 0.8 V gives 1 A.

What VREF should I set on a DRV8825? On a Pololu carrier with 0.100 ohm resistors, current limit = VREF x 2, so a 1.5 A NEMA 17 needs 0.75 V. That shortcut is Pololu-carrier specific.

Does the TMC2209 need VREF? Not over UART: the current is set in software with the irun register. In standalone mode, on 0.110 ohm boards, VREF is about 1.41 times the RMS current you want.

Why does my stepper motor lose steps? The load torque passed what the motor can deliver at that speed, the ramp is too fast, or the axis hit mid-band resonance at about 2 to 4 revolutions per second. Slow the ramp, change microstepping, or switch to a TMC2209.

Sources

Last updated: 2026-11-21

Types of Motor Drivers: H-Bridge, Stepper, and BLDC

The type of motor driver you need is decided by the motor, not by the microcontroller: a brushed DC motor needs an H-bridge, a stepper motor needs a chopper driver, a brushless motor needs a three-phase ESC, and a hobby servo needs no driver board at all. Pick the type first, then pick the chip.

What is a motor driver?

A motor driver is the circuit between a low-power control signal and a motor that needs real power. An Arduino pin can supply only about 20 to 40 mA, while even a small TT gear motor draws 150 to 250 mA running and close to 1 A stalled. Connect a motor straight to a pin and the pin burns out. A motor driver keeps the high motor current off the board. Source: QRC post 16272.

Every driver type does the same three jobs in a different way: it switches power to the motor windings, controls speed or position, and protects the board and the motor from spikes. The differences come from what the motor needs switched: a brushed DC motor needs its two wires flipped in polarity, a stepper motor needs its two coils energized in sequence with the current capped, and a brushless motor needs three phases energized in a rotating sequence timed to the rotor. Those three switching jobs are three different driver types, and they are not interchangeable.

What are the types of motor drivers?

Six types cover nearly every Arduino and hobby build.

Driver type Motor it runs Control signal Best for
Brushed DC H-bridge Brushed DC motor PWM plus direction pins Robot wheels, gear motors, winches, pumps
Stepper chopper Bipolar stepper motor STEP and DIR pulses 3D printers, CNC axes, camera sliders
BLDC driver / ESC Brushless DC motor PWM, PPM, or DShot throttle Drones, RC cars, fans, gimbals
Servo control Hobby RC servo Position PWM signal Robot arms, steering, control surfaces
Single-direction switch Any one-way DC load One logic pin Fans, one-way pumps, solenoids
Smart driver DC, stepper, or BLDC SPI, I2C, UART, or STEP/DIR Builds that need stall detection or telemetry

Sources: Number Analytics, ElecBlog, ThinkRobotics, Schneider Electric.

How does a brushed DC H-bridge driver work?

A brushed DC motor spins when voltage is applied across its two wires and reverses when the polarity flips. An H-bridge is four switches in the shape of the letter H, with the motor as the crossbar: one diagonal pair drives current one way, the other pair the other way. Source: ThinkRobotics motor driver basics; ElecBlog motor driver selection guide.

Two switch technologies do this job. Bipolar H-bridges, such as the L298N, use bipolar transistors: the ST L298 datasheet DS0218 Rev 5 lists a total saturation drop of 1.8 V to 3.2 V at 1 A, so on a 7.4 V battery the motor sees about 4.2 V to 5.6 V. MOSFET H-bridges, such as the TB6612FNG and DRV8833, use MOSFETs: the Toshiba TB6612FNG datasheet lists about 0.5 ohm total on-resistance, so at 1 A it drops about 0.5 V, and the TI DRV8833 datasheet SLVSAR1E Rev E lists about 0.36 ohm, so at 1 A it drops about 0.36 V. A MOSFET driver delivers nearly the full battery voltage to the motor. Source: QRC post 23379; ST L298, Toshiba TB6612FNG, and TI DRV8833 datasheets.

Never turn on both switches on the same side at once: that shorts the supply to ground, a fault called shoot-through, and it destroys the switches. An H-bridge also decides how the motor stops: shorting the terminals brakes the motor fast, and letting them float lets it coast. Source: ElecBlog motor driver selection guide; TrueGeometry motor driver circuits guide; QRC post 16272.

How does a stepper chopper driver work?

A stepper motor moves in fixed angles as its coils are energized in sequence. A stepper driver takes two signals, STEP and DIR, and handles the coil sequencing itself. Source: ElecBlog motor driver selection guide; QRC post 16272.

What makes a stepper driver a different TYPE is current chopping. A stepper coil is a low-resistance winding that would draw far more current than it is rated for at the supply voltage. The driver measures the coil current and switches off the instant it reaches the rated limit, then switches back on, thousands of times per second. That holds the coil at its rated current while the supply runs much higher than the motor rated voltage, so a low-voltage NEMA 17 runs safely from 12 V or 24 V. A DC H-bridge has no current limit, so the supply voltage must stay near the motor rating. Source: QRC post 16272; ElecBlog motor driver selection guide.

Microstepping. A chopper driver can split each full step into smaller steps. The A4988 runs full step to 1/16 step, the DRV8825 runs full step to 1/32 step, and the TMC2209 runs to 1/256 interpolated steps. Microstepping makes motion smoother and quieter, but it does not add holding torque. The A4988 listing states up to 1.2 A continuous per phase, and the DRV8825 listing states 1.5 A per coil, with the chip maximum at 2.5 A per coil with heatsinking at 24 V and 25 C. Set the current limit with the onboard trim potentiometer before connecting the motor. Source: QRC product listings 17896 and 23573; QRC post 16272.

How does a BLDC driver work?

A brushless DC motor has no brushes and no mechanical commutator. The magnets sit on the rotor and the windings sit on the stator, so the driver must commutate electronically, switching current between the three phases in a rotating sequence timed to the rotor position. The power stage is a three-phase inverter: three half-bridges, six switches in total. No H-bridge board in this guide can run a brushless motor: if your motor has three wires and no brushes, shop for an ESC, not a driver module. Source: ElecBlog motor driver selection guide; MIKROE motor control basics guide; QRC post 16272.

Six-step vs field-oriented control. The basic method is six-step, also called trapezoidal drive: two phases conduct at a time and the third floats, which works but produces torque ripple. The advanced method is field-oriented control (FOC), which controls torque and flux separately for smooth torque, high efficiency, and full torque at zero speed. FOC needs position feedback and clean phase-current sensing. For a hobby drone or RC car, six-step is the normal choice; for a gimbal, FOC is worth it. Source: MIKROE motor control basics guide; Wevolver motor controller guide.

Sensored vs sensorless. The driver must know where the rotor is to time the phase switching. Sensored drivers read Hall-effect sensors and start reliably at low speed. Sensorless drivers read back-EMF from the unpowered phase, which works once the motor is spinning but is unreliable at a standstill, so a sensorless ESC that stutters on startup is usually losing the rotor. Source: ElecBlog motor driver selection guide; Daily Slate ESC and driver basics.

When to use a BLDC driver. Use one for drones, RC vehicles, fans, and gimbals. Do not use one for a brushed motor or a stepper. Source: ElecBlog motor driver selection guide; Schneider Electric motor driver guide.

What about servos and single-direction loads?

Servo control is not a driver board. A hobby RC servo has its own driver, gears, and feedback built into the case. The Arduino sends it a position signal and the servo moves to that angle and holds it. What a servo needs is its own power: feed it from a separate 5 to 6 V supply, join the grounds, and send only the signal wire to the Arduino. Powering even one servo from the Arduino 5 V pin can brown the board out when the servo moves under load. Source: QRC post 16272; ThinkRobotics motor driver basics.

Single-direction switches. Some loads never reverse: a one-way pump, a fan, a solenoid. Those need no H-bridge at all. A single logic-level MOSFET and a flyback diode do the job: the MOSFET switches the load on and off, PWM sets the speed, and the diode gives the inductive kick a safe path when the switch turns off. Source: TrueGeometry motor driver circuits guide; QRC post 16272.

Integrated vs discrete vs smart drivers

Driver types also split by how the power stage is built: integrated driver ICs hold the MOSFETs, the gate drivers, and the protection (thermal shutdown, overcurrent trips, undervoltage lockout) in one chip. The L298N, TB6612FNG, DRV8833, A4988, and DRV8825 are all integrated drivers. Discrete drivers use separate MOSFETs, gate driver ICs, diodes, and current-sense resistors on your own board. They scale to high-power systems an integrated chip cannot reach, such as the 43 A peak BTS7960 class, but you design the gate timing and protection yourself. Smart drivers add a microcontroller interface and on-chip sensors: SPI, I2C, UART, or STEP/DIR control, plus stall detection and telemetry. The TMC2209 is the example in the QRC store: StallGuard4 stall detection, CoolStep current reduction, and UART configuration. The Trinamic TMC2209 datasheet Rev 1.05 lists 2 A RMS and 2.8 A peak per coil. Source: ElecBlog motor driver selection guide; PCBSync motor controller PCB design guide; QRC post 16272; Trinamic TMC2209 datasheet Rev 1.05.

The TMC2208 current rating is not stated on the QRC listing, and no datasheet figure is quoted for it here: check the Trinamic datasheet for the exact part before buying.

How do the types compare?

H-bridge (brushed DC) Stepper chopper BLDC / ESC Servo control
Position control No, speed only Yes, open loop step count No, speed only unless sensored FOC Yes, closed loop angle
Holds position at rest No Yes, holding torque No Yes
Reverses Yes Yes, DIR pin Yes, reverse commutation Yes, angle command
Efficiency MOSFET high, bipolar low Low, wastes power holding High, 85 to 95 percent High for the load
Control signal PWM plus direction STEP plus DIR Throttle PWM, PPM, or DShot Position PWM
Example chips L298N, TB6612FNG, DRV8833 A4988, DRV8825, TMC2209 BLHeli_S, BLHeli_32 ESCs None, built into the servo

Which type should I use?

Answer these five questions in order.

  1. What motor is it? Brushed DC with two wires means H-bridge. Stepper with four or five wires means chopper or ULN2003. Brushless with three wires means BLDC driver or ESC. Hobby servo means no driver board.
  2. Must it hold a position? Yes means stepper chopper or servo: a DC driver cannot hold position, and neither can a BLDC driver without sensored FOC and position feedback.
  3. Must it reverse? Yes means H-bridge, chopper, or a reversing BLDC driver.
  4. What is the stall current? Size the driver from the motor stall current, not the running current: continuous current must be at least 1.5 times the motor continuous running current, and peak current must cover the stall current (post 16272). With no datasheet, measure the coil resistance and use I = V / R.
  5. What is the supply voltage? The driver must cover the full supply range, including a LiPo at full charge: a 3-cell LiPo peaks at 12.6 V, above the DRV8833 10.8 V ceiling, and a 4-cell LiPo at full charge exceeds the TB6612FNG 13.5 V ceiling. Check the ceiling before you buy.

Quick picks by project. Robot car wheels: H-bridge (TB6612FNG battery builds, L298N above 13.5 V). 3D printer or CNC axis: stepper chopper (A4988, DRV8825, TMC2209). Drone or RC car: BLDC ESC (post 21990). Robot arm joint: servo or stepper chopper (post 21979). One-way fan or pump: single MOSFET switch. Big motor above 2 A stall: BTS7960-class H-bridge.

What are the common mistakes?

  • Buying a driver for the board instead of the motor. The Arduino does not decide the driver type: an L298N cannot run a brushless motor and an A4988 cannot run a DC motor.
  • Using an H-bridge as a stepper driver. A dual H-bridge can energize a bipolar stepper, but it cannot limit current, so it is a poor stepper driver in practice. Source: QRC post 16272.
  • Expecting a DC driver to hold position. An H-bridge has no position feedback and no holding torque: a build that must hold still needs a stepper or a servo.
  • Sizing by running current instead of stall current. A TT motor that draws 0.25 A while rolling can draw over 1 A stalled against a wall. A driver sized for running current overheats the first time a wheel blocks. Source: QRC post 23379.
  • Ignoring the voltage ceiling. A 3-cell LiPo at full charge is 12.6 V, above the DRV8833 ceiling of 10.8 V, and a 4-cell LiPo at full charge is above the TB6612FNG ceiling of 13.5 V. Both look like a dead driver, and both are a wrong type choice.

How do I fix a motor driver problem?

The motor does not move at all. Check the type first: is this driver made for this motor? Then check the common ground and the enable pin: STBY HIGH on the TB6612FNG, EN tied LOW and SLP HIGH on the A4988. A board that does nothing is usually an enable pin.

The motor is slow and weak. On a bipolar H-bridge such as the L298N, the driver drops 1.8 V to 3.2 V at 1 A, and that loss becomes heat. Raise the supply by about 2 V above the motor rating, or switch to a MOSFET driver such as the TB6612FNG. On a stepper, the current limit is set too low: check VREF. Source: QRC posts 16272 and 23379.

The driver overheats and shuts down. The motor stall current exceeds the driver limit, or the headline current is being treated as continuous. Plan for roughly half the headline number for sustained running, add a heatsink and airflow, and do not force the motor against a stall.

The stepper vibrates but does not turn. Coil pairs are mismatched, or VREF is too low. Find the coil pairs with a multimeter, then check the current limit. A stepper that loses steps mid-move is usually accelerating too fast, or hitting mid-band resonance at 2 to 4 revolutions per second: slow the ramp or switch to a TMC2209. Source: QRC post 16272.

Parts used in this guide

Prices and stock were verified live on qualityrcparts.com on 2026-11-21. All four items below are in stock and purchasable, each an example of one driver type in this guide, not a per-chip recommendation: post 16272 and post 23379 cover chip picks in depth.

Shipped fast and securely from our secure facility in Queensbury, NY. QRC ships within the USA only.

Related guides

FAQ

What is a motor driver? A motor driver is an electronic circuit between a microcontroller and a motor: it takes a low-power control signal and switches the larger motor current from a separate supply, controlling speed, direction, or position. Source: Number Analytics motor drivers in robotics FAQ.

What are the different types of motor drivers? The main types are brushed DC H-bridge drivers, stepper chopper drivers, BLDC drivers and ESCs, servo control, single-direction switches, and smart drivers.

Can I run a motor without a motor driver? Technically yes, with switches or relays, but it is inefficient and unsafe: without a driver you cannot regulate speed or direction precisely, and you risk damaging both the motor and the control unit. Source: Schneider Electric motor driver FAQ.

Can I use a motor driver with any type of motor? No. Motor drivers are designed for specific motor types: H-bridge for brushed DC, chopper for stepper, three-phase ESC for brushless. Source: Number Analytics motor drivers in robotics FAQ.

What is the difference between a motor driver and an ESC? An ESC is a BLDC driver packaged for radio control: it takes a throttle signal and handles three-phase electronic commutation. A motor driver module is the same power stage sold for microcontroller builds. Source: Daily Slate ESC and driver basics.

Why does my L298N get so hot? Because the L298N uses bipolar transistors, about 2 V to 3 V is lost across it while current flows, and that loss turns into heat: at 1 A the driver produces about 2 W of heat. Keep the current low or switch to a MOSFET driver. Source: QRC post 16272; ST L298 datasheet.

Sources

Last updated: 2026-11-21

RC Servo Brackets and Mounts: How to Pick and Install Them

A servo bracket is the mount that holds a servo motor square to the frame so the output shaft stays lined up with the load it drives. Get the bracket right and the servo steers clean, the arm repeats its position, and the screws stay put. Get it wrong and the servo shifts, the horn binds, or the mount cracks.

What is a servo bracket, and why does it matter?

A servo bracket is a shaped mount, usually a U-shaped holder, a flat plate, or a two-piece pan-tilt frame, that bolts to a chassis, frame, robot arm, or project board and cradles the servo body. The servo’s mounting ears screw to the bracket, and the bracket screws to the frame. It holds the servo body rigid so the case cannot flex under load, and it sets the output shaft in line with the linkage it drives.

Without a solid mount the servo can shift under load: a loose servo shows up as sloppy steering or a wandering arm.

Which bracket type fits your job?

The five brackets in the store cover the four shapes most RC and robotics builds need.

| Bracket type | What it does | Store bracket | |—|—|—|—| | Flat install holder | Bolts a standard servo straight to a flat surface | CNC install holder, ID 13458, $23.99 | | U-shaped holder | Cradles the servo body in a rigid U frame | CNC U-shaped holder, ID 19665, $8.99 sale | | U-shaped 2-set | Two U-shaped holders in one pack | CNC 2-set, ID 19666, $14.99 sale | | Pan-tilt bracket | Pairs two standard servos for two-axis movement | Pan tilt 2-set, ID 22925, $20.99 | | Micro plate bracket | Flat acrylic plate with a cutout sized for a 9 g servo | SG90 acrylic 10-pack, ID 13465, $12.99 |

Flat install holder (ID 13458). It bolts flat to the chassis. CNC aluminum, hardware included, for S3003 and MG995 class servos.

U-shaped holder (ID 19665). The U cradles the servo body. CNC aluminum, 55 x 26 mm, adjustable plate, screws included, for S3003, MG995, and MG996R class servos.

U-shaped 2-set (ID 19666). The same U-shaped holder, two in one pack with M3 screws, nuts, washers, and hex socket screws. For two-servo builds or as a spare: at $14.99 on sale it costs less per bracket than two singles.

Pan-tilt bracket (ID 22925). Two brackets that work as a pair: one servo pans, the second tilts, building a 2-degree-of-freedom head with a ball bearing on the pan axis. Each set includes the multi-function bracket, the short U-type bracket, a ball bearing, metal horns, and the screw set. It fits standard 40 x 20 x 36 mm servos including MG995, MG996R, and S3003.

Micro plate bracket (ID 13465). A flat acrylic plate with a cutout sized for the SG90 body plus a mounting slot and holes, so the servo sits flush and bolts to a chassis, frame, or project board. Ten brackets with screws, nuts, and washers.

Which material should you pick: aluminum, acrylic, or plastic?

The bracket material decides how much load the mount can take before it flexes, cracks, or loosens.

| Material | Strength | Best for | |—|—|—|—|—| | CNC aluminum alloy | High, rigid, resists vibration | Standard servos, steering, robot arms, high-torque joints | | Acrylic plate | Low, stiff but brittle | SG90 micro servos, light indoor builds, bulk packs | | Injection-molded nylon or ABS | Medium, some flex | Micro pan-tilt kits, light camera heads |

CNC aluminum alloy is the right pick for any standard servo that works hard: steering, robot arm joints, a pan-tilt head carrying a camera. It resists vibration and keeps the servo aligned run after run.

Acrylic plate is the right pick for 9 g micro servos in light builds: a 9 g servo cannot load it hard. Acrylic cracks rather than bends, so tighten only until snug and never use threadlocker on it: Kpower’s guide warns it can crack the plastic.

Nylon and ABS sit between the two. Adafruit’s Mini Pan-Tilt Kit uses injection-molded nylon. For a standard servo, plastic is the wrong pick: Kpower’s guide describes a plastic pan-tilt bracket that cracked after 20 minutes on a six-axis arm, and the fix was an aluminum bracket.

Which bracket fits your servo size?

Standard and micro mounts are not interchangeable: a standard servo will not fit a micro bracket, and a micro servo rattles loose in a standard bracket. Measure your servo, then match it to the bracket listing.

| Servo class | Body size | Stall torque | Bracket to buy | |—|—|—|—|—| | Micro, SG90 9 g | 23 x 12.2 x 29 mm | 1.8 kg·cm at 4.8 V | SG90 acrylic 10-pack, ID 13465 | | Standard, S3003 / MG995 class | About 40 x 20 x 36 mm | Check the servo datasheet | CNC U-shaped holder, ID 19665, or install holder, ID 13458 | | Standard, MG996R | 40.7 x 19.7 x 42.9 mm | 9.4 kg·cm at 4.8 V, 11 kg·cm at 6 V | CNC U-shaped holder, ID 19665, or pan-tilt 2-set, ID 22925 |

Sources: SG90 figures are TowerPro’s; cheap SG90 clones vary, so measure your own servo. MG996R figures are TowerPro’s datasheet figures, mirrored by Cornell University. The 40 x 20 x 36 mm fit is the pan-tilt listing (ID 22925).

Measure before you order. The numbers that decide the fit are the servo body length, width, and height, and the mounting-hole pattern on the servo’s ears. Measure the body with calipers, then the hole spacing on each ear. The listing states the servo class it fits, so the class match is the check that matters. Kpower’s bracket guide gives the pattern rule for micro servos: most follow a standard pattern of two holes spaced 26 to 28 mm center to center, with M2 or M2.5 screws, most commonly 27 mm. Verify it on your own servo.

Check the flange thickness too. A metal-gear micro servo can share a body size with its plastic-gear twin but carry a thicker mounting flange. Protosupplies warns that MG90 metal-gear servos do not fit its SG90 pan-tilt kit because the flange is thicker. Test-fit a metal-gear micro before tightening anything.

How do you install a servo bracket?

The steps below work for every bracket in the store. Read the horn clearance section before you tighten anything.

Step 1: Dry-fit the servo. Set the servo into the bracket without screws. The body should sit square and flush, the ears flat on the mounting face, and the shaft pointing where the linkage needs it. If the servo rocks, the bracket is the wrong size.

Step 2: Center the servo, then fit the horn. Power the servo and drive it to center, 90 degrees on a standard 180-degree servo. Push the horn onto the splined shaft at the centered position, then fix it with the short screw that came with the servo. Use the short screw: Adafruit’s guide warns that the longer mounting screws packed with some servos will damage the servo if screwed in too far.

Step 3: Screw the servo to the bracket. Insert the screws through the servo’s mounting ears and tighten evenly, finger-tight plus a quarter turn and no more. Kpower’s guide caps micro-servo screw torque at about 0.2 N·m: more strips plastic threads or deforms the bracket. A drop of medium threadlocker on metal screw threads stops vibration loosening. Threadlocker only on metal-to-metal screws, never on the acrylic SG90 plate.

Step 4: Bolt the bracket to the frame. Make sure the bracket sits level and the servo shaft lines up with the linkage axis. Do not mount the bracket reversed: test the full range of motion before final fastening.

Step 5: Assemble a pan-tilt bracket as a pair. Mount the pan servo in the base bracket first, with its horn fitted at center, then attach the base to the horn so the pan axis turns the whole head. Then mount the tilt servo in the tilt bracket, fit its horn, and join the tilt bracket to the pan base on the pivot pin. If the tilt bracket cannot move through the full 180 degrees, take it off the horn, rotate it, and re-install it.

Step 6: Test the full travel, then check the screws after the first run. Power the servo and sweep it slowly from one end to the other. The horn must clear the bracket at both ends, the linkage must not bind, and the wires must not snag. If anything touches, stop and fix it before running the build: a servo stalled against its own bracket draws stall current and heats up fast. After the first hour of running, check every bracket screw again.

Servo horn clearance: the step everyone skips

Most bracket failures are horn failures: the horn hits the bracket at one end of the travel, the servo stalls against it, and the gears strip or the bracket cracks. Check clearance before you tighten the bracket to the frame.

Center the servo first, then fit the horn. A horn fitted off-center gives uneven travel: full range one way, binding the other.

Trim the horn if it has to fit inside the bracket. Adafruit’s Mini Pan-Tilt Kit guide shows exactly this: the outer horns are trimmed with a hobby knife or wire cutters so they fit inside the pan-tilt base, while the center horns stay unmodified.

Keep the tilt travel inside the bracket. Limit the tilt range so the top servo cannot crash into the bracket: the Thinking Robot SG90 guide limits tilt to 30 to 150 degrees.

Route the wires clear of the horn. The servo lead must not cross the horn’s sweep. Route it along the bracket base, away from the moving parts, with enough slack for the full travel.

Which bracket should you buy?

Standard servo in an RC plane, boat, or car: the CNC install holder (ID 13458), $23.99. Machined aluminum, hardware included, for S3003 and MG995 class servos.

Standard servo in a robot arm or upright build: the CNC U-shaped holder (ID 19665), $8.99 on sale, regular $10.99. The cheapest metal mount in the store. Its adjustable plate fits S3003, MG995, and MG996R class servos. Size 55 x 26 mm.

Two standard servos: the CNC 2-set (ID 19666), $14.99 on sale, regular $17.99. Two U-shaped holders with M3 screws, nuts, washers, and hex socket screws per set. It costs less per bracket than two singles, and the second bracket is a spare.

A camera head, sensor mount, or robot joint that needs two axes: the pan-tilt 2-set (ID 22925), $20.99. Two full pan-tilt sets, each with a ball bearing, metal horns, and hardware, for standard 40 x 20 x 36 mm servos including MG996R, MG995, and S3003.

SG90 micro servos: the SG90 acrylic 10-pack (ID 13465), $12.99. Ten plates with screws, nuts, and washers, sized for the SG90 body. One pack covers a whole smart car or small robot build.

If you are not sure which servo you need yet: read the servo chooser guides first, then come back. Buying the bracket first and the servo second is the order that causes most fit problems.

What are the common mistakes?

  • Wrong size class. A standard servo in a micro bracket, or a micro servo in a standard bracket. Match the servo class to the listing before ordering.
  • Over-tightening the screws. Finger-tight plus a quarter turn is enough. More strips plastic threads or warps the bracket. Kpower’s guide calls over-tightening the number one cause of bracket failure.
  • Threadlocker on plastic. Medium threadlocker belongs on metal-to-metal screws only. On acrylic or nylon it can crack the bracket.
  • Mounting the bracket reversed. The servo shaft ends up on the wrong side of the linkage axis. Test the range of motion before final fastening.
  • Fitting the horn off-center. The servo binds at one end of travel and stalls. Center the servo at 90 degrees first.

How do you fix a servo bracket that does not work?

The servo jitters or stalls in the bracket. Check for an obstruction first: a misaligned screw, a wire caught under the servo, or a horn touching the bracket. Then check power: a servo starved of current jitters even in a perfect bracket. A single MG996R can draw 1,400 mA at stall, per TowerPro’s datasheet, so a small board regulator or a USB port cannot feed it.

The screws keep loosening. Clean the screws, apply a drop of medium threadlocker, and re-tighten, but only on metal-to-metal joints. Kpower’s guide describes exactly this case: screws loosened after one hour of RC driving, fixed by cleaning, threadlocker, and a re-torque, with no loosening after 10 hours. In an acrylic plate, do not use threadlocker: check for cracks instead.

The bracket cracked. Replace it, and go up a material: acrylic to aluminum for a standard servo, or nylon to aluminum for a micro servo that works hard. A cracked bracket has already told you the load is too much for the material. Check the servo size match at the same time.

The servo will not fit the bracket. Do not force it. Measure the servo body and the bracket opening with calipers and compare the numbers. If the bracket is the wrong size class, order the right one. Shimming a too-small servo into a too-big bracket with strips of plastic is a stopgap, not a fix.

The horn hits the bracket at one end. Take the horn off, re-center the servo, and refit the horn one spline over. If it still hits, trim the horn or limit the travel in code so the servo never reaches the contact point.

Parts used in this guide

Prices and stock verified live on qualityrcparts.com on 2026-11-21 via the public Store API. All five are in stock. Servos are not included.

Shipped fast and securely from our secure facility in Queensbury, NY. QRC ships within the USA only.

Related guides

FAQ

What is a servo bracket? A servo bracket is a shaped mount, usually a U-shaped holder, a flat plate, or a two-piece pan-tilt frame, that bolts to a chassis or frame and cradles the servo body so the output shaft stays lined up with the load. Source: QRC servo-mounts category description and Kpower micro servo bracket guide.

How do you mount a servo to a bracket? Dry-fit the servo first, center it at 90 degrees, fit the horn with the short screw, screw the servo to the bracket finger-tight plus a quarter turn, then sweep the full travel to check clearance. Source: Kpower micro servo bracket guide and Kpower servo mounting guide.

What size bracket do I need for an SG90 servo? An SG90 needs a micro bracket sized for its 23 x 12.2 x 29 mm body; the acrylic SG90 10-pack (ID 13465) is cut for that body. A standard servo bracket will not hold it. Source: TowerPro SG90 datasheet figures and the QRC servo-mounts category description.

What size bracket do I need for an MG996R servo? An MG996R needs a standard bracket. Its body is 40.7 x 19.7 x 42.9 mm and it weighs 55 g, so it fits the standard brackets in the store: the CNC U-shaped holder (ID 19665), the CNC 2-set (ID 19666), and the pan-tilt 2-set (ID 22925). Source: TowerPro MG996R datasheet and the QRC pan-tilt bracket listing.

Can I use a standard servo bracket for a micro servo? No. A micro servo rattles loose in a standard bracket: an SG90 is 23 mm long against a standard servo at about 40 mm. Source: QRC servo-mounts category description.

Do servo brackets come with screws? The brackets in the store do: screws, nuts, and washers with the CNC brackets and the SG90 10-pack, plus ball bearings and metal horns with the pan-tilt set. Servos are not included. Source: QRC product listings for IDs 22925, 19666, 19665, 13465, and 13458.

Why does my servo buzz or jitter in its bracket? Check for an obstruction first: a horn, wire, or screw blocking travel. Then check power: a servo starved of current jitters even in a perfect bracket, and a single MG996R can draw 1,400 mA at stall. Source: Kpower micro servo bracket troubleshooting and TowerPro MG996R datasheet.

Sources

Last updated: 2026-11-21

OLED vs TFT Display: Which Is Best for ESP32 Projects?

Pick the display by what the screen has to show. An OLED display makes its own light, pixel by pixel. A TFT display filters light from a backlight that stays on the whole time the screen is on. That one difference decides contrast, viewing angle, power use, speed, cost, and how long the screen lasts.

Short answer: buy the OLED for crisp text, sensor readouts, clocks, and battery builds where the screen is mostly dark. Buy the TFT for color menus, graphs, gauges, photos, and touch screens. If your project shows one color of text on a small screen, the OLED wins. If it needs color or a bigger picture, the TFT wins.

How does an OLED display work?

OLED means organic light-emitting diode. Each pixel is its own tiny light source. When current passes through the organic layer, that pixel glows. When the pixel is off, it makes no light at all. There is no backlight, no light to filter, and no light leaking through a dark pixel. That is why OLED text looks so sharp: a black background is truly black, and a lit pixel sits next to a fully dark one.

The OLED modules in the store use the SSD1306 driver chip, a single-chip CMOS OLED driver with controller for a 128 by 64 dot matrix, with built-in contrast control, display RAM, and an oscillator. The common 0.96 inch module is 128 by 64 pixels, one color, over I2C with four wires: power, ground, SDA, and SCL.

Adafruit publishes the power figure for its 128 by 64 OLED breakout: on average the display uses about 20 mA from the 3.3 V supply, and the draw depends on how much of the display is lit. A mostly dark screen with a few lines of text draws less than a mostly lit one.

Small mono OLED modules are cheap and common. Bigger OLED panels and color OLED panels cost far more than a TFT of the same size. The organic pixels age with use, and a pixel left on for weeks can leave a permanent ghost image, called burn-in.

How does a TFT display work?

TFT means thin-film transistor, and a TFT display is a type of LCD. The liquid crystals in the panel do not make light. They sit in front of a backlight and twist to let that light through, pixel by pixel. A tiny transistor behind every pixel controls how much light passes. Color comes from red, green, and blue filters over the pixels. The backlight is the price of the design: it draws current the whole time the screen is on, no matter what the picture shows.

The TFT modules in the store use SPI and one of three common driver chips. The ST7735 drives small color modules such as the 0.96 inch 80 by 160 and the 1.8 inch 128 by 160. The ST7789 drives larger color modules such as the 1.9 inch 170 by 320 board. The ILI9341 drives the 2.4 inch and 2.8 inch 240 by 320 modules, including the touch versions. All three show 65,536 colors (16-bit color).

A TFT needs more pins than an I2C OLED. SPI needs five signal wires: clock, data, chip select, data/command, and reset, plus the backlight pin. TFT strengths are color, size, brightness, and lifespan. The weaknesses are backlight power draw, extra wiring, and weaker contrast: a black pixel still lets some backlight through.

OLED vs TFT: the full comparison

Feature OLED (SSD1306 module) TFT (ST7735 / ST7789 / ILI9341 module)
How it makes light Each pixel makes its own light, no backlight Backlight shines through liquid crystals
Colors One color (blue, white, or yellow-blue) Full color, 65,536 colors
Typical sizes in the store 0.91 to 1.3 inch 0.96 to 3.2 inch
Resolution 128 by 64 (0.96 inch), 128 by 32 (0.91 inch) 80 by 160 up to 320 by 240
Interface I2C, 2 data wires, 4 wires total SPI, 5 signal wires plus backlight
Libraries Adafruit SSD1306, U8g2 TFT_eSPI, Adafruit ILI9341, Adafruit ST7735
Contrast True black, effectively infinite contrast Black leaks backlight; IPS panels around 1000:1
Viewing angle Wide, colors hold off-axis Narrow on TN panels; IPS is wider but still shifts
Sunlight readability Poor in direct sun Better, backlight fights glare
Power behavior Varies with content; dark screens draw less Near constant; backlight sets the draw
Published current draw About 20 mA average (Adafruit) None published for the store TFT modules
Response speed Under 0.1 ms per pixel (panel class) 8 to 25 ms per pixel (panel class)
Burn-in Yes, static images can leave a ghost No
Lifespan (panel class) 20,000 to 50,000 hours 50,000 to 100,000 hours
Cost in the store 0.96 inch module $7.49 From $10.99 by size; 2.4 inch module $14.99

Sources: SSD1306 datasheet; Adafruit OLED guide; Golden Vision; OPL Display. Panel-class figures are industry figures, not measurements of the store modules.

Which display has better contrast?

OLED, by a wide margin. An OLED pixel that is off makes no light, so black is truly black and contrast is effectively infinite. A TFT pixel that is supposed to be black still lets some backlight leak through, so black looks dark gray. Golden Vision puts it plainly: an OLED screen reaches infinite static contrast, a VA LCD reaches 3,000:1, and an IPS LCD reaches 1,000:1.

That gap shows up in dark rooms. White text on a black OLED background is crisp because the background adds no light at all. The same screen on a TFT has a faint glow across the whole panel. IPS panels are better than older TN panels, but even a good IPS TFT cannot turn a pixel fully off.

Which display is easier to read at an angle or in sunlight?

Two different questions, two different winners. At an angle, OLED wins. In sunlight, TFT wins.

An OLED pixel makes its own light, so the picture looks the same from the side as from the front. Colors stay stable and brightness holds steady. A TFT passes backlight through liquid crystal layers, and off-axis viewing changes what the eye receives: contrast drops, colors shift, and a dark scene can look gray from the side.

In sunlight the result flips. A TFT backlight can be pushed bright enough to fight glare, and a TFT stays readable outdoors. An OLED struggles in direct sun: its pixels cannot reach the same peak brightness without risking damage or rapid aging, and the screen looks washed out. If the project lives outdoors, on a dashboard, or in a bright window, pick the TFT.

Which display uses less power?

It depends on what the screen shows. There is no single power winner, and any guide that names one without saying “it depends” is guessing.

An OLED draws power per lit pixel. A dark screen with a few lines of text draws very little. A bright, mostly white screen draws much more. Adafruit publishes about 20 mA average from the 3.3 V supply for its 128 by 64 OLED breakout, with the note that the draw depends on how much of the display is lit.

A TFT draws power near constantly. The backlight stays on at a set level no matter what the picture shows, so a white document and a black menu consume almost the same energy. Lowering the backlight saves power without hurting the picture much indoors, and that makes TFT power budgeting simple: the backlight setting decides the draw.

No published current-draw figure exists for the TFT modules in the store, so this guide gives none. For a battery build, the practical rule is: OLED for screens that are mostly dark and update rarely, TFT only when the project genuinely needs color.

Which display is faster?

OLED pixels switch faster than liquid crystals can twist. OPL Display lists OLED response under 0.1 ms against 8 to 25 ms for TFT LCD panels.

But the panel is not the only speed limit. A standard 128 by 64 OLED over I2C at 400 kHz manages only about 10 frames per second for full-screen updates, because the bus, not the panel, is the bottleneck. An SPI TFT moves far more pixels per second and suits real-time charts and menus. If the project animates, pick the TFT on SPI.

Which display lasts longer?

TFT, for always-on and static content. OLED pixels age with use, and the blue organic material ages fastest. A static menu, logo, or status bar left on the same pixels for weeks can leave a permanent ghost image. TFT liquid crystals do not wear unevenly, so a TFT shows fixed content for years without visible burn-in.

OPL Display gives panel-class lifespan figures: TFT LCD 50,000 to 100,000 hours, OLED 20,000 to 50,000 hours depending on color and usage. Those are industry figures for the panel classes, not measurements of the store modules. For a wall display, a kiosk, or any screen that shows the same image for months, pick the TFT

Which display costs less?

For small mono screens, OLED. For color and larger screens, TFT.

The 0.96 inch OLED module is $7.49 in the store. TFT modules start at $10.99 and run to $25.49 by size, with the 2.4 inch module at $14.99. As the screen gets bigger and gains color, TFT takes over: color OLED panels cost far more than a TFT of the same size, and above 1.3 inch TFT is the economical choice for color.

A TFT also needs more pins, more code, and more power, which can mean a bigger battery or a bigger board.

Which display should you buy?

Match the display to the job, not to the spec sheet. This section is the short pick list. For the full size and price picker, see How to Choose the Right Display for Arduino or ESP32.

Project Pick Why
Sensor readout, temperature, humidity 0.96 inch OLED Crisp text, 4 wires, lowest cost
Clock, timer, counter 0.96 inch OLED Dark background, low draw, sharp digits
Weather station with graphs 2.4 inch TFT Color graphs need pixels and color
Color menu or settings screen 1.9 inch TFT board or 2.4 inch TFT module Full color, room for buttons and icons
Touch interface 2.8 inch TFT with touch Resistive touch, needs calibration once
Battery sensor node 0.96 inch OLED Dark screen, sleep mode, 4 wires
Outdoor or bright-room display TFT Backlight beats sunlight
Always-on status screen TFT No burn-in on static content
First display project 0.96 inch OLED Four wires, Adafruit SSD1306 library, $7.49

What are the common mistakes?

  • Buying a color OLED when a TFT costs less. Small mono OLED modules are cheap. Color OLED panels are not.
  • Assuming OLED always uses less power. OLED wins on dark screens and loses on bright ones. A mostly white OLED screen can draw more than a TFT at low backlight.
  • Using the wrong driver chip. The 0.96 inch module uses the SSD1306. The 1.3 inch OLED looks the same but uses the SH1106 driver. Code written for the SSD1306 shows shifted or noisy pixels on an SH1106, so use a library that supports the SH1106, such as U8g2.
  • Wiring the OLED power pins backwards. OLED modules come with VCC and GND in either order.
  • Leaving a static image on an OLED for months. Burn-in is permanent.
  • Expecting a TFT to match OLED contrast. A TFT black pixel still leaks backlight.
  • Forgetting the backlight pin on a TFT. The backlight needs power and, on most modules, a pin to control it.

How do I troubleshoot a display problem?

The OLED shows nothing. Check power first: VCC and GND order varies by module, so read the labels on your module. Then check the I2C address. The SSD1306 address is usually 0x3C

The OLED shows shifted or noisy pixels. The driver chip is wrong for the library. A 1.3 inch module with the SH1106 chip shows shifted pixels under SSD1306 code. Switch to a library that supports the SH1106, such as U8g2,

The TFT shows a white screen. The display is powered but never initialized. Check that the driver in the code matches the chip on the module: ST7735, ST7789, and ILI9341 need different init code.

The TFT updates slowly. The bus is the limit.

The TFT looks washed out from the side. That is normal for a TN panel. An IPS panel holds color better off-axis, and an OLED holds it best of all.

The OLED fades or ghosts after weeks of the same image. That is burn-in.

Parts used in this guide

Prices below were verified live on 2026-11-21 in the step 3 draft for the built-in display boards guide, via the WooCommerce Store API and authed product reads. This draft did NOT re-verify them live: the store returned HTTP 429 on every fetch in this session. Re-verify every price and stock state at publish time.

Shipped fast and securely from our secure facility in Queensbury, NY. QRC ships within the USA only.

Related guides

FAQ

Is OLED better than TFT? Neither is better in every case. OLED wins on contrast, viewing angle, and dark-screen power. TFT wins on brightness, sunlight readability, color at larger sizes, cost for color screens, and lifespan with static content. Source: Golden Vision TFT vs OLED comparison; OPL Display TFT LCD vs OLED guide.

Does OLED use less power than TFT? It depends on the image. OLED draws power per lit pixel, so a dark screen draws little and a bright screen draws much more. TFT draws near-constant power because the backlight stays on. Adafruit publishes about 20 mA average for its 128 by 64 OLED breakout. Source: Adafruit monochrome OLED breakouts guide; Golden Vision power comparison.

Does OLED burn in? Yes. OLED pixels age with use, and a static image left on the same pixels for weeks can leave a permanent ghost. TFT displays do not burn in. Source: Golden Vision burn-in section; OPL Display head-to-head table.

Which display is best for a first ESP32 project? A 0.96 inch SSD1306 OLED. It needs only four wires, shows sharp text, and draws very little power. Source: Medium, Compoden Electronics, Best Display for ESP32 Projects.

Should I choose an OLED or a TFT for an ESP32? Choose an OLED for text and simple readouts with minimal wiring. Choose a TFT when you need color, more pixels, graphics, or touch. Source: Medium, Compoden Electronics, Best Display for ESP32 Projects.

What is the difference between the SSD1306 and the SH1106? They are different OLED driver chips. The SSD1306 is usual on 0.96 inch modules and the SH1106 on 1.3 inch modules. Code for one shows shifted or noisy pixels on the other, so the library must match the chip. Source: Medium, Compoden Electronics, Best Display for ESP32 Projects.

How many pins does a TFT display need on an ESP32? An SPI TFT needs five signal pins: clock, data, chip select, data/command, and reset. A touch layer and a microSD slot each add a chip-select pin. Source: Medium, Compoden Electronics, Best Display for ESP32 Projects.

Sources

Last updated: 2026-11-21

Change log

  • 2026-11-21: Draft created. Technology comparison of OLED vs TFT for Arduino and ESP32 projects: how each works, contrast, viewing angle, power, speed, lifespan, cost, decision table, common mistakes, troubleshooting, 7 FAQs. Board selection and board setup are not re-taught; they live in post 18364. The size and price picker is not re-taught; it lives in the which-display-to-buy guide. Product prices carried from the step 3 draft verified 2026-11-21; live re-verification blocked by store HTTP 429 in this session.

TFT_eSPI Setup Guide: Arduino, ESP32, User_Setup.h

TFT_eSPI is the library most ESP32 display projects use, and the one that confuses the most first-time users. It does not ask your sketch which display you wired up. It reads that answer from a setup file at compile time, and if the setup file is wrong, the screen stays white even though the sketch uploads fine.

This guide sets up TFT_eSPI from Bodmer’s GitHub repo for a separate SPI TFT module wired to an ESP32 board: install, wiring, driver pick, the User_Setup.h edit, the first test sketch, and the errors that stop most builds. Every step was checked against the TFT_eSPI README and the User_Setup.h file in the repo.

What is TFT_eSPI, and what do you need before you start?

TFT_eSPI is a feature-rich Arduino IDE graphics and fonts library for 32-bit processors, written by Bodmer. The README says it is targeted at 32-bit processors and performance optimised for RP2040, STM32, ESP8266, and ESP32 types, and that it works with Arduino boards as well but will be slower. On the ESP32 it can use Direct Memory Access (DMA) with SPI displays, and it has built-in support for the XPT2046 touch controller.

The one fact that shapes this whole guide is in the README: the screen controller, the interface pins, and the library configuration settings must be defined inside the library, not in the Arduino sketch. PlatformIO users can define the same settings in platformio.ini instead, covered below.

What you need:

  • An ESP32 board. This guide uses the ESP32 DevKit V1 (30-pin WROOM-32), because its hardware SPI pins are the ones in the library’s own example setup files.
  • A separate SPI TFT module. The worked examples use the 0.96 inch ST7735 module and the 2.4 inch touch ILI9341 module from the store.
  • The Arduino IDE with the ESP32 board package installed. The README says the library requires board package 2.x.x or later.
  • Jumper wires and a breadboard. Keep the SPI wires short: long wires cause signal problems.

How do you install TFT_eSPI in the Arduino IDE?

Open the Library Manager: Sketch, Include Library, Manage Libraries. Search for “TFT_eSPI”, find the entry by Bodmer, and press Install.

Two README warnings apply from the first install. First, a library update overwrites your setup: keep custom setup files in a TFT_eSPI_Setups folder in your Arduino libraries folder, pointed at from User_Setup_Select.h. Second, install the ESP32 board package first, at version 2.x or later, or the library may not compile for your board. PlatformIO users install it with one line in platformio.ini:

lib_deps = bodmer/TFT_eSPI

Source: Lopaka TFT_eSPI guide.

How do you wire a TFT module to an ESP32 DevKit V1?

The QRC TFT modules wire over SPI with 8 pins: GND, VCC, SCL, SDA, RES, DC, CS, and BLK. SCL is the SPI clock (SCLK), SDA is MOSI, RES is reset (RST), DC is data/command, CS is chip select, and BLK is the backlight. The pin numbers below are from the library’s own ESP32 example setup (Setup42_ILI9341_ESP32.h).

Module pin ESP32 DevKit V1 GPIO Library name
GND GND –
VCC 3V3 –
SCL GPIO 18 TFT_SCLK
SDA GPIO 23 TFT_MOSI
MISO / SDO GPIO 19 TFT_MISO
RES GPIO 4 TFT_RST
DC GPIO 2 TFT_DC
CS GPIO 15 TFT_CS
BLK 3V3, or a free GPIO for dimming TFT_BL

Three wiring rules. Power the module at 3.3V, not 5V. The QRC modules run on 3.3V power, and the ESP32 is a 3.3V board, so wire VCC to 3V3. A 5V Arduino Uno needs level shifting; see our logic level shifting guide. Use the hardware SPI pins for clock and data. MOSI 23, MISO 19, and SCLK 18 are the DevKit V1 VSPI pins. CS, DC, and RST can be any free GPIO. Connect MISO even if you think you do not need it. The screen draws without it, but the display ID read and the touch controller need it, and an SD card on the same bus needs all three SPI pins defined explicitly. Backlight: BLK can go straight to 3V3 for always-on backlight. Wire it to a GPIO and define TFT_BL only if the sketch must control it.

Which driver do you pick for your display?

The driver is the chip on the display, not the size of the screen. Two modules the same size can need different drivers, and the wrong driver gives a white screen even with perfect wiring. Read the driver chip name from the store listing first.

Size Resolution Driver Touch Store price
0.96 inch, 2-pack 80 by 160 ST7735 No $13.99
1.3 inch 240 by 240 ST7789 No $11.99
1.44 inch, 2-pack 128 by 128 ST7735 No $20.99
1.8 inch, SD slot 128 by 160 ST7735 No $10.99
2.0 inch 240 by 320 ST7789 No $14.99
2.2 inch, SD slot 240 by 320 ILI9341 No From $18.99
2.4 inch, no touch 320 by 240 ST7789 No $14.99
2.4 inch, touch 240 by 320 ILI9341 Yes $20.99
2.8 inch, touch 240 by 320 ILI9341 Yes $24.99
3.2 inch, touch 240 by 320 ILI9341 Yes $25.49
3.5 inch, touch 480 by 320 ILI9488 Yes $26.99
4.0 inch, touch 480 by 320 ST7796S Yes $29.99

Sizes, resolutions, and drivers follow our TFT LCD displays guide, and prices were verified against the live store on 2026-11-21. The README lists ST7735, ST7789, ILI9341, ILI9488, and ST7796 as supported, and recommends ILI9341 and ST7796 SPI displays as the starting point. If the listing does not name a driver, do not guess: a 2.4 inch module can be ST7789 without touch or ILI9341 with touch.

How do you set up User_Setup.h?

This is the step the whole guide exists for. User_Setup.h is the file inside the TFT_eSPI library folder that names your driver, your screen size, your pins, and your fonts. The library reads it at compile time. The default file ships set up for an ILI9341 display, so ST7735 or ST7789 owners must change it. Find the file in your Arduino libraries folder, under TFT_eSPI.

1. Pick exactly one driver

In Section 1 of the file, uncomment the line for your driver and leave every other driver line commented out. Only one driver may be defined.

For the 0.96 inch module:

#define ST7735_DRIVER      // Define additional parameters below for this display

For a 1.3 inch, 2.0 inch, or 2.4 inch non-touch module:

#define ST7789_DRIVER      // Full configuration option, define additional parameters below for this display

For a 2.2 inch, 2.4 inch touch, 2.8 inch, or 3.2 inch module:

#define ILI9341_DRIVER       // Generic driver for common displays

The default file ships with ILI9341_DRIVER uncommented. If two driver lines are uncommented, the sketch will not compile, or the library will send the wrong init sequence and the screen stays white.

2. Set the screen size

Set TFT_WIDTH and TFT_HEIGHT to your panel’s pixel size: 80 by 160 for the 0.96 inch ST7735 module, 240 by 320 for the 2.4 inch touch ILI9341 module, 240 by 240 for the 1.3 inch ST7789 module.

#define TFT_WIDTH  240
#define TFT_HEIGHT 320

Getting the size wrong does not stop the screen from working, but the drawing will be shifted or cut off.

3. Set the pins

Set the pin defines to match your wiring. The ESP32 example values in the file are MISO 19, MOSI 23, SCLK 18, CS 15, DC 2, and RST 4, which match the wiring table above.

#define TFT_MISO 19
#define TFT_MOSI 23
#define TFT_SCLK 18
#define TFT_CS   15  // Chip select control pin
#define TFT_DC    2  // Data Command control pin
#define TFT_RST   4  // Reset pin (could connect to RST pin)

If your module’s reset pin is tied to the board reset or to 3.3V, set TFT_RST to -1.

4. Check the fonts and the SPI speed

Leave the font lines as they are. You need LOAD_GLCD at minimum; without it, basic text drawing will not compile. The default SPI frequency is 27 MHz; the bundled Setup42 uses 40 MHz. If the display shows noise or tearing, drop the speed to 20 MHz or 10 MHz. Save the file, then recompile and upload: the library reads User_Setup.h at compile time, so every edit needs a fresh compile.

What are the other ways to configure TFT_eSPI?

Editing User_Setup.h is the standard route, but it is not the only one. There are three, and you should pick one and stick to it. Mixing them is a common cause of “it worked yesterday” failures.

Option 1: Edit User_Setup.h. The route above. Simple, and every example sketch then works without changes. The cost is that a library update overwrites the file, so keep a copy in the TFT_eSPI_Setups folder the README suggests, outside the library folder.

Option 2: Use a bundled setup file. Open User_Setup_Select.h in the library folder. Comment out the #include <User_Setup.h> line and uncomment the include for a setup file that matches your board. The repo ships Setup42_ILI9341_ESP32.h for an ESP32 with an SPI ILI9341 display (MISO 19, MOSI 23, SCLK 18, CS 15, DC 2, RST 4, 40 MHz), Setup70b_ESP32_S3_ILI9341.h for the ESP32-S3, Setup70c_ESP32_C3_ILI9341.h for the ESP32-C3, and Setup71_ESP32_S2_ST7789.h for the ESP32-S2 with ST7789. Only one setup include may be active at a time.

Option 3: Define the setup in the sketch or in PlatformIO. If you define USER_SETUP_LOADED before including the library, the library skips User_Setup.h and uses the defines in your sketch instead. The library header TFT_eSPI.h checks for USER_SETUP_LOADED and defines it itself if it is missing, so a sketch that defines it first takes control:

#define USER_SETUP_LOADED
#define ILI9341_DRIVER
#define TFT_WIDTH  240
#define TFT_HEIGHT 320
#define TFT_MOSI 23
#define TFT_MISO 19
#define TFT_SCLK 18
#define TFT_CS   15
#define TFT_DC    2
#define TFT_RST   4
#define SPI_FREQUENCY 40000000
#include <TFT_eSPI.h>
#include <SPI.h>

Source: the USER_SETUP_LOADED check in TFT_eSPI.h and the ElectricalFlux ESP32 graphics guide. PlatformIO users can pass the same defines as build flags instead, which survives library updates. Source: Lopaka TFT_eSPI guide. The in-sketch route keeps the setup with the project, the right choice when two projects use two different displays on one computer.

What is the first sketch to upload?

Run the library’s own test sketch before you write any of your own code. If the test sketch works, the wiring and the setup file are right, and any later problem is in your code.

Open File, then Examples, then TFT_eSPI, then Test and diagnostics, then Colour_Test. Select your ESP32 board and port, and upload. A working screen shows clean colour bands with no noise or tearing.

If Colour_Test runs but the colours look wrong, run the Read_User_Setup example from the same folder. It prints the setup the library actually compiled with to the serial monitor: driver, pins, and SPI frequency.

Once Colour_Test passes, a minimal hello sketch confirms text drawing:

#include <TFT_eSPI.h>

TFT_eSPI tft = TFT_eSPI();

void setup() {
  tft.init();
  tft.setRotation(1);
  tft.fillScreen(TFT_BLACK);
  tft.setTextColor(TFT_WHITE, TFT_BLACK);
  tft.setTextSize(2);
  tft.drawString("Hello TFT", 10, 10);
}

void loop() {
}

tft.init() starts the display with the settings from the setup file. If this sketch shows “Hello TFT”, the setup is done.

How do you set up the built-in 1.9 inch TFT board?

Short answer: you do not use this guide for it. The built-in 1.9 inch ST7789 board (ID 17819) is covered in full in our ESP32 boards with built-in displays guide: ST7789 driver at 170 by 320, with CS 5, RST 4, BL 32, and MOSI 23. Follow that guide for that board.

What are the common mistakes?

  • Two drivers uncommented: only one driver define may be active. Two break the compile or send the wrong init sequence.
  • Editing the setup and not recompiling: the library reads User_Setup.h at compile time.
  • Pins in the file do not match the wiring: file and breadboard must agree on every pin.
  • Default ILI9341 setup with an ST7735 or ST7789 module: the default file ships set for ILI9341.
  • A library update wiping the setup: keep your setup in a TFT_eSPI_Setups folder outside the library, or use the in-sketch defines.
  • 5V logic on a 3.3V module: the QRC modules run on 3.3V power. A 5V Uno needs level shifting.
  • Long jumper wires at full SPI speed: shorten the wires or drop SPI_FREQUENCY to 20 MHz or 10 MHz.
  • MISO left unconnected: the screen draws without it, but the display ID read and touch need it.

How do you fix a TFT_eSPI display that does not work?

Check the config before you suspect broken hardware: a white screen usually means the driver or pins in User_Setup.h do not match the board.

The screen stays white after upload. White means the backlight works and the controller never got a valid init sequence. Check the driver line first, then the pins, then the backlight pin, then a lower SPI speed. Sources: Protoship and RoboticsEngineering white screen guides.

The screen stays black. Check the backlight first. A sketch that never turns it on shows nothing even when the code runs. If BLK is wired to a GPIO, the setup must define TFT_BL and the sketch must drive it.

The colours are wrong or inverted. The colour order or the inversion setting does not match the panel. User_Setup.h has TFT_RGB_ORDER (TFT_RGB or TFT_BGR) and TFT_INVERSION_ON / TFT_INVERSION_OFF defines. Swap the colour order define and recompile.

The picture is shifted, cut off, or noisy. The size is wrong, or the SPI speed is too high for the wiring. Check TFT_WIDTH and TFT_HEIGHT, then drop SPI_FREQUENCY to 20 MHz or 10 MHz.

The sketch will not compile. Read the first error, not the last. Two driver defines active, a missing LOAD_GLCD font define, or a board package older than 2.x are the usual causes. An Arduino forum thread also reports TFT_eSPI sketches failing to compile for the ESP32-C6 board; update the board package and the library before changing the code.

The touch panel does not respond. TFT_eSPI has built-in XPT2046 touch support on SPI displays, and the touch chip shares the display SPI bus with its own chip select. Define TOUCH_CS with the touch CS pin: the bundled Setup42 file shows TOUCH_CS 5, commented out by default. Run Test_Touch_Controller to check the touch wiring.

The display works but the SD card on the same bus stops working. The README warns that an SD card on the same SPI bus needs TFT_MISO, TFT_MOSI, and TFT_SCLK defined explicitly in User_Setup.h, even with the default SPI pins. Define all three and recompile.

Parts used in this guide

Prices and stock were verified live on qualityrcparts.com on 2026-11-21 through the public Store API. All four items are in stock and purchasable.

Shipped fast and securely from our secure facility in Queensbury, NY. QRC ships within the USA only.

Related guides

FAQ

What is TFT_eSPI? TFT_eSPI is a fast Arduino IDE graphics and fonts library for 32-bit processors by Bodmer, optimised for RP2040, STM32, ESP8266, and ESP32. It drives SPI TFT displays and supports the XPT2046 touch controller. Source: TFT_eSPI README on GitHub.

Do I have to edit User_Setup.h to use TFT_eSPI? Yes, in the standard route: the driver, size, pins, and fonts must be defined in the library’s setup file, because the README states they cannot be defined in the Arduino sketch. Alternatives: a bundled setup file, in-sketch defines with USER_SETUP_LOADED, or PlatformIO build flags. Source: TFT_eSPI README.

Which driver do I pick in TFT_eSPI for my display? Pick the driver that matches the chip on your display: ST7735 for the 0.96, 1.44, and 1.8 inch modules; ST7789 for the 1.3, 2.0, and 2.4 inch non-touch modules; ILI9341 for the 2.2, 2.4 touch, 2.8, and 3.2 inch modules; ILI9488 for the 3.5 inch touch; ST7796 for the 4.0 inch touch. Only one driver define may be active. Source: TFT_eSPI README and the QRC TFT displays guide.

Why is my TFT screen white after uploading a TFT_eSPI sketch? White means the backlight works but the controller never got a valid init sequence. Check the driver first, then the pins, then the backlight pin, then a lower SPI speed. Source: Protoship and RoboticsEngineering white screen guides.

Can I use TFT_eSPI with an Arduino Uno? The library targets 32-bit processors and works with Arduino boards but will be slower, per the README. The bigger issue is voltage: the QRC modules run on 3.3V, and a 5V Uno needs level shifting. An ESP32 is the simpler first choice.

Why does my TFT_eSPI setup disappear after a library update? A new copy of the library overwrites User_Setup.h inside the library folder. The README suggests a TFT_eSPI_Setups folder outside the library, or the in-sketch USER_SETUP_LOADED defines or PlatformIO build flags, which survive updates. Source: TFT_eSPI README tips section.

How do I know which setup the library actually compiled with? Run Read_User_Setup from File, Examples, TFT_eSPI, Test and diagnostics. It prints the compiled driver, pins, and SPI frequency to the serial monitor. Source: TFT_eSPI repo examples listing.

Sources

Last updated: 2026-11-21

Change log

  • 2026-11-21: Draft created. Full TFT_eSPI setup procedure from the Bodmer GitHub repo: install, DevKit V1 wiring, driver-selection table for all 12 store TFT sizes, User_Setup.h walkthrough, two alternate configuration routes, Colour_Test first-sketch walkthrough, common mistakes, troubleshooting. Built-in 1.9 inch board covered only as a pointer to post 18364; size selection cross-linked to posts 17851 and 15484, not re-taught.

ESP32 SuperMini vs XIAO: Which Tiny Board Wins?

Pick the XIAO for battery builds, WiFi range, or a board that solders flat onto a carrier PCB. Pick the SuperMini for the lowest price per board, a breadboard-friendly header, or an on-board LED for blink and debugging.

The two families share the same chips, so the decision is about the board around the chip: the antenna, the battery circuit, the pins, the mounting, the documentation, and the price per board. Both run the same Arduino, MicroPython, and ESP-IDF code for the same chip once the pin names are changed: the XIAO uses D0 to D10 names and the SuperMini uses GPIO numbers.

How big is each board, and how does it mount?

Board Size Mounting
XIAO ESP32C3 21 x 17.8 mm (Seeed wiki) Castellated, solders flat onto a carrier PCB
ESP32-C3 SuperMini About 22.5 x 18 mm (seller listings only) Through-hole header pins, fits a breadboard
XIAO ESP32S3 21 x 17.8 mm (Seeed wiki) Castellated, solders flat onto a carrier PCB
ESP32-S3 SuperMini About 23.5 x 18 mm (espboards) Through-hole header pins, fits a breadboard

The XIAO is smaller by about a millimetre and a half in each direction, and its castellated edges let it solder flat onto a carrier board like a module. That suits a finished product, a wearable, or a sensor tag that has to sit flat inside a case.

The SuperMini is the breadboard board. Its through-hole header pins plug straight into a breadboard with room to spare, which is why it is the easier pick for a first build, a classroom set, or a prototype you plan to rewire. The trade off is height.

Measure your own SuperMini before you design a case around it. There is no single manufacturer, so pin labels, LED color, flash size, and antenna layout can vary between sellers and revisions.

Which board has more pins?

The SuperMini breaks out more pins on both chips. The XIAO keeps the same 11-pin header on every board: a feature when a sketch moves between XIAO boards, a limit when the build needs more pins.

XIAO C3 SuperMini C3 XIAO S3 SuperMini S3
Broken-out GPIO 11 (D0 to D10) 13 (GPIO0 to GPIO10, 20, 21) 11 (D0 to D10) 13 plus TX/RX
Analog header pins 4 (D0 to D3) 6 (GPIO0 to GPIO5) 9 (D0 to D5, D8 to D10) 13 (GPIO1 to GPIO13)

Sources: Seeed wiki pin maps; NuttX docs; TeachMeMicro.

Three pin differences matter. First, the XIAO bus pins never move: I2C is always D4 and D5, SPI is always D8, D9, and D10, and UART is always D6 and D7 on every XIAO board. The SuperMini has no such promise: the bus pins follow the chip, and the I2C pins on the C3 SuperMini sit on GPIO8 and GPIO9, which are also strapping pins, so the NuttX docs recommend GPIO0 and GPIO1 for I2C instead.

Second, the SuperMini gives you more analog pins: 6 ADC-capable pins on the C3 against 4 on the XIAO C3, and 13 on the S3 against 9 on the XIAO S3. The store listing states 4 analog pins for the C3 SuperMini against 6 in the NuttX table; the gap is the ADC2 channel on GPIO5, which reads unreliably while WiFi is running. Use GPIO0 to GPIO4 for analog reads when WiFi is on.

Third, strapping pins need care on both families, but on different pins. On the XIAO C3, D0, D8, and D9 decide the boot mode. On the C3 SuperMini, GPIO2, GPIO8, and GPIO9 do. On the XIAO S3, D2 (GPIO3) is the strapping pin on the header. On the S3 SuperMini, GPIO3 is the one to use with care. A sensor that pulls a strapping pin to the wrong level at reset can stop either board from booting. Full pin tables are in our SuperMini guide and our XIAO pinout guide.

How do the C3 boards compare?

The C3 comparison is the cleanest one, because the chips are identical. The ESP32-C3 datasheet v2.5 is the source for the chip figures.

Feature XIAO ESP32C3 ESP32-C3 SuperMini
Chip ESP32-C3, single-core RISC-V, up to 160 MHz Same chip
SRAM / flash 400 KB SRAM, 4 MB flash Same
Deep sleep, board level 44 uA per the Seeed wiki No board-level figure published for the generic board
QRC price $13.99 for one board $22.99 for four boards ($5.75 per board)

Sources: Espressif C3 datasheet v2.5; Seeed wiki C3 page; Mischianti; NuttX docs.

The C3 decision comes down to two questions. Does the build run on a battery? The XIAO charges a LiPo over USB with no extra parts, and its 44 uA board-level deep sleep figure is published by Seeed. The SuperMini usually has no charging circuit, and no board-level figure is published for the generic board. The bare C3 chip can sleep near 5 uA, but a finished board draws more.

Does the build need WiFi range? The XIAO needs its external antenna connected, and with it fitted Seeed states over 100 m line of sight. The SuperMini ceramic antenna needs nothing fitted and works well at short range, but range varies by batch. One user test on the Seeed forum measured the SuperMini at -33 dBm next to a phone against about -60 dBm for a XIAO with no antenna fitted: with its antenna fitted, the XIAO is the stronger board.

How do the S3 boards compare?

The S3 comparison is where the memory gap shows up, and it is the biggest spec difference between the two families.

Feature XIAO ESP32S3 ESP32-S3 SuperMini
Chip ESP32-S3R8, dual-core Xtensa LX7, up to 240 MHz ESP32-S3, dual-core Xtensa LX7, up to 240 MHz
PSRAM / flash 8 MB PSRAM, 8 MB flash 4 MB flash, 2 MB PSRAM on the common FH4R2 version
Deep sleep, board level 14 uA per the Seeed wiki About 43 uA per the store listing
User LED User LED on GPIO21, plus charge LED RGB LED, typically WS2812 on GPIO48
QRC price $21.49 for one board $31.99 for five boards ($6.40 per board)

Sources: Seeed wiki S3 page; Espressif S3 datasheets; TeachMeMicro; Lingflux.

The memory gap is the whole S3 story. The XIAO ESP32S3 carries the S3R8 chip with 8 MB of PSRAM and 8 MB of flash. The common S3 SuperMini carries the S3FH4R2 chip with 4 MB of flash and 2 MB of PSRAM: four times the PSRAM and twice the flash on the XIAO. PSRAM holds camera frames, display buffers, and audio at runtime, so the XIAO S3 is the board for camera work, displays, and edge AI. The SuperMini S3 still handles bigger sketches, more sensors, and small displays, but with less headroom.

Check the chip marking on any S3 SuperMini before you trust a memory figure: FH4R2 means 4 MB of flash and 2 MB of PSRAM. Run the memory check sketch in our SuperMini guide to confirm flash size and PSRAM before you write code that needs them.

The S3 boards are closer on the other rows: both have a user LED, USB OTG, and battery charging in some form. The XIAO S3 still wins on range, deep sleep, and documentation; the SuperMini S3 on price per board and breadboard use. The Sense version is the XIAO-only option, adding a detachable camera, a digital microphone, and a microSD slot on an expansion board. There is no SuperMini equivalent. Camera projects are covered in our XIAO S3 Sense guide.

Which board is better on battery power?

The XIAO is the better battery board on both chips. Every XIAO has a built-in LiPo charging circuit with BAT pads on the back: plug a LiPo in and the board charges it over USB, with no extra module. The Seeed wiki publishes board-level deep sleep figures of 44 uA for the C3 and 14 uA for the S3, and the XIAO C3 has no user LED at all, so nothing drains the cell in deep sleep. The C3 SuperMini usually has no charging circuit, so a battery build needs an external charging module, and no board-level deep sleep figure is published for the generic board. The S3 SuperMini is better here: some S3 boards have battery pads with a charger, and the listing states deep sleep around 43 uA.

One safety note: the XIAO C3 charging circuit delivers a fast charge near 370 mA, so use a battery of 370 mAh or larger unless the battery has its own protection circuit. Source: Mischianti XIAO ESP32-C3 guide.

How much does each board cost?

Prices below are the live QRC store prices. The SuperMini boards sell as packs, so the per-board price is arithmetic from the pack price.

Board QRC listing Pack price Price per board
XIAO ESP32C3, 1-pack ID 17820 $13.99 $13.99
ESP32-C3 SuperMini, 4-pack ID 19646 $22.99 $5.75
XIAO ESP32S3, 1-pack ID 17839 $21.49 $21.49
ESP32-S3 SuperMini, 5-pack ID 19649 $31.99 $6.40

The SuperMini is far cheaper per board: about $5.75 against $13.99 on the C3, and about $6.40 against $21.49 on the S3. A four-pack of C3 SuperMinis costs less than two single XIAO C3 boards, and a five-pack of S3 SuperMinis costs about one and a half XIAO S3 boards.

Prices were verified against the live SuperMini guide (updated 2026-11-21) and the batch 2 verification of the same day. The public Store API returned HTTP 429 at draft time, so re-verify every price live before publishing.

Which one should you buy?

Pick by the build, not by the brand.

Buy the XIAO ESP32C3 if the build is a battery sensor, a wearable, a BLE beacon, or a node that has to sit in another room and stay connected. The charging circuit, the external antenna, and the 44 uA deep sleep are the reasons.

Buy the ESP32-C3 SuperMini if the build is a set of cheap sensor nodes, a classroom set, or a first ESP32 project, or anything where the lowest cost per board matters most. At $5.75 per board in the 4-pack, it is the cheapest way to put WiFi and Bluetooth on a tiny board, and the blue LED makes Blink work out of the box.

Buy the XIAO ESP32S3 if the build needs memory: camera work, a display with a frame buffer, audio, edge AI, or a large sketch. The 8 MB of PSRAM and 8 MB of flash are the reasons. Buy the Sense version instead for a camera, a microphone, and a microSD slot.

Buy the ESP32-S3 SuperMini if the build needs two cores, more pins, and some PSRAM, but does not need 8 MB of it: bigger sensor builds, small displays, and multi-node projects where $6.40 per board beats $21.49. Check the chip marking for FH4R2 before relying on the PSRAM figure.

If you are still unsure, buy the C3 SuperMini 4-pack first. It is the cheapest way to learn the setup, and the steps transfer to the other boards.

What are the common mistakes?

  • Running a XIAO with no antenna. The XIAO has no built-in antenna. WiFi and Bluetooth will barely work until the included external antenna is fitted to the U.FL connector.
  • Using a SuperMini pinout on a XIAO, or the reverse. D4 is GPIO6 on the XIAO C3 and GPIO4 on the C3 SuperMini. Use the pin table for your exact board.
  • Expecting Blink to work on the XIAO C3. There is no user LED on the XIAO C3, only a charge LED. Wire an external LED before you run Blink.
  • Assuming the S3 SuperMini has 8 MB of PSRAM. The common FH4R2 version has 2 MB of PSRAM and 4 MB of flash. Check the chip marking.
  • Comparing a chip deep sleep figure against a board deep sleep figure. The bare C3 chip can sleep near 5 uA, but a finished board draws more through its regulator, LEDs, and USB circuitry. Seeed publishes board-level figures for the XIAO (44 uA C3, 14 uA S3). No equivalent figure is published for the generic SuperMini.

How do I troubleshoot a SuperMini vs XIAO problem?

The board does not appear as a USB port. Try a USB-C data cable, not a charge-only cable. Then hold BOOT, connect the cable, release BOOT, and upload Blink. Full steps are in our SuperMini guide.

The Serial Monitor is blank but the sketch runs. Set USB CDC On Boot to Enabled under Tools and re-upload. Full steps are in our SuperMini guide.

WiFi will not connect on a XIAO. Check the antenna first. If the external antenna is not fitted, fit it and test again. If it is fitted, check the connector is fully seated.

WiFi will not connect on a SuperMini. Move the board closer to the router first. Some batches have weak WiFi that improves when the transmit power is lowered in code.

Parts used in this guide

Prices and stock were verified against the live SuperMini guide (updated 2026-11-21) and the batch 2 verification of the same day. The public Store API returned HTTP 429 at draft time. Re-verify every price and stock live before publishing.

Shipped fast and securely from our secure facility in Queensbury, NY. QRC ships within the USA only.

Related guides

FAQ

What is the difference between an ESP32 SuperMini and a XIAO ESP32? Same chip, different board. The XIAO has an external U.FL antenna, a built-in LiPo charging circuit, and no user LED on the C3. The SuperMini has a ceramic antenna, usually no charging circuit, and a blue LED typically on GPIO8. Pick the XIAO for battery sensors and range, the SuperMini for the lowest cost and breadboard work. Source: Mischianti; our SuperMini guide FAQ.

Can I use the same code on a SuperMini and a XIAO? Yes, with the pin names changed. Both run the same Arduino, MicroPython, and ESP-IDF code for the same chip. The XIAO uses D0 to D10 names and the SuperMini uses GPIO numbers. Source: The Engineering Projects XIAO ESP32-C3 guide.

Which board is better for battery projects? The XIAO, on both chips. It charges a LiPo over USB with no extra parts, and Seeed publishes board-level deep sleep figures of 44 uA for the C3 and 14 uA for the S3. The C3 SuperMini usually has no charging circuit and no published deep sleep figure. Source: Seeed wiki C3 and S3 pages; Mischianti XIAO ESP32-C3 guide.

Does the XIAO need an external antenna? Yes. The XIAO has a U.FL connector only and no built-in antenna. The antenna ships in the box and must be fitted before WiFi or Bluetooth will work properly. Source: Seeed wiki S3 page; Seeed forum BLE signal thread.

Which S3 board should I buy, the SuperMini or the XIAO S3? Buy the XIAO S3 if the build needs memory: camera work, displays, audio, or large sketches. It has 8 MB of PSRAM and 8 MB of flash against 2 MB of PSRAM and 4 MB of flash on the common S3 SuperMini FH4R2 version. Buy the S3 SuperMini for two cores, more pins, and some PSRAM at $6.40 per board in the 5-pack. Check the chip marking for FH4R2 before trusting the memory figure. Source: Seeed wiki S3 page; TeachMeMicro; Lingflux.

Sources

Last updated: 2026-11-21

Change log

  • 2026-11-21: Draft created. Direct SuperMini vs XIAO comparison across the C3 and the S3: size, pins, antenna, battery, memory, and price per board. Overlap checked against live posts 15176 (SuperMini guide, one C3-only comparison section) and 18592 (XIAO four-board comparison, no SuperMini coverage). Batch 2 XIAO pinout draft not live yet at draft time, so no link to it is included. Product prices carried from the live SuperMini guide (updated 2026-11-21) and batch 2 verification of the same day; the public Store API returned HTTP 429 at draft time, so prices and stock must be re-verified live before publishing, and the slug 404 must be re-checked at publish time for the same reason.
  • 2026-11-21: Trimmed from 3,492 to 2,797 publishable words (H1 through FAQ, plain wc -w; 2,969 H1 through Last updated, Sources included). Cut one FAQ, shortened table cells and Sources lines, and trimmed prose across size, pins, C3, S3, battery, price, buy, mistakes, troubleshooting, and parts sections. No facts, prices, or safety notes changed.

XIAO ESP32 Pinout: C3, C6, S3, and C5 GPIO Tables

Every XIAO ESP32 board breaks out the same 11 GPIO pins, D0 through D10, on the same 14-pin header with 5V, GND, and 3V3. What changes is the GPIO number behind each D pin, how many pins can read analog voltages, and which pins the chip watches at boot.

This guide gives the pin table for the C3, the C6, and the C5 from the Seeed wiki pin map for each board, and points to our full S3 pinout guide for the S3. It also covers shared pins, free pins, and strapping pins. Verify every table against the Seeed wiki page for your board variant before you solder. Pin tables conflict across sources.

Which pins do all four XIAO ESP32 boards share?

The header layout is the same on all four boards. The bus positions never move: I2C is always D4 and D5, SPI is always D8, D9, and D10, and UART is always D6 and D7. What moves is the GPIO number and the analog count.

Function C3 C6 S3 C5
I2C SDA / SCL D4 / D5 D4 / D5 D4 / D5 D4 / D5
SPI SCK / MISO / MOSI D8 / D9 / D10 D8 / D9 / D10 D8 / D9 / D10 D8 / D9 / D10
UART TX / RX D6 / D7 D6 / D7 D6 / D7 D6 / D7
Analog pins on the header 4 (D0 to D3) 3 (D0 to D2) 9 (D0 to D5, D8 to D10) 1 (D0)

Sources: Seeed wiki pin maps; our S3 pinout post for the S3 row. The C3 has a charge LED only, per the Seeed C3 wiki pin map.

How do I read a XIAO pinout diagram?

Three names describe the same physical pin, and mixing them up is the most common wiring mistake on these boards.

  • D name: the printed pad name, D0 through D10. Use it in Arduino code, for example digitalWrite(D4, HIGH).
  • GPIO number: the chip pin number, for example GPIO2 or GPIO22. Use it in ESP-IDF code and in datasheets.
  • A name: the analog name, A0 through A3 on the C3, A0 through A2 on the C6, A0 on the C5. Use it with analogRead(A0).

The Seeed wiki diagram for each board shows the front and the back: the D pins and USB-C port on the front, the battery pads and JTAG test pads (MTDO, MTDI, MTCK, MTMS) on the back. Keep the Seeed wiki page for your board open while you wire. Some third party pages number the same D pads differently, and a table built for the wrong board will compile cleanly and do nothing.

What is the XIAO ESP32C3 pinout?

The C3 is the cheapest board of the four, with one catch: three of its header pins are strapping pins, so what you connect to them at reset matters. The table below follows the Seeed wiki C3 pin map.

Pad GPIO Main function Shared with
D0 GPIO2 Analog A0, ADC1_CH2 Strapping
D1 GPIO3 Analog A1, ADC1_CH3 Wake
D2 GPIO4 Analog A2, ADC1_CH4 JTAG MTMS, wake
D3 GPIO5 Analog A3, ADC2_CH0 JTAG MTDI, wake
D4 GPIO6 I2C SDA JTAG MTCK
D5 GPIO7 I2C SCL JTAG MTDO
D6 GPIO21 UART TX Console
D7 GPIO20 UART RX Console
D8 GPIO8 SPI SCK Strapping
D9 GPIO9 SPI MISO Strapping, BOOT
D10 GPIO10 SPI MOSI Flash CS
5V / GND / 3V3 – Power 5 V, GND, 3.3 V out (700 mA max per Seeed wiki)

Source: Seeed wiki C3 pin map.

D3 is the only ADC2 channel on the header, and ADC2 readings can be unreliable while WiFi is running, so use D0 to D2 (ADC1) for analog sensors when WiFi is on. Source: studiopieters C3 pinout guide. Only D0 to D3 can wake the chip from deep sleep. The C3 has no onboard antenna.

What is the XIAO ESP32C6 pinout?

The C6 is the Matter, Thread, and Zigbee board, and the friendliest to wire: none of its header pins is a strapping pin. The table below follows the Seeed wiki C6 pin map.

Pad GPIO Main function Shared with
D0 GPIO0 Analog A0, ADC LP GPIO, wake
D1 GPIO1 Analog A1, ADC LP GPIO, wake
D2 GPIO2 Analog A2, ADC LP GPIO, wake
D3 GPIO21 GPIO SDIO DATA1
D4 GPIO22 I2C SDA SDIO DATA2
D5 GPIO23 I2C SCL SDIO DATA3
D6 GPIO16 UART TX Console
D7 GPIO17 UART RX Console
D8 GPIO19 SPI SCK SDIO clock
D9 GPIO20 SPI MISO SDIO DATA0
D10 GPIO18 SPI MOSI SDIO command
5V / GND / 3V3 – Power 5 V, GND, 3.3 V out

Source: Seeed wiki C6 pin map. The chip has 7 ADC channels, but only D0, D1, and D2 are broken out as analog header pins.

The board carries both a small onboard ceramic antenna and a U.FL connector, and the choice is made in firmware through an RF switch. Pull GPIO3 low to enable the switch, then GPIO14 low selects the built-in antenna (the default) and GPIO14 high selects the external antenna. Neither GPIO is a header pin. Source: Seeed wiki C6 RF switch section. Only the low-power GPIOs, GPIO0 to GPIO7, can wake the chip from deep sleep, and the XIAO breaks out three of them.

What is the XIAO ESP32-C5 pinout?

The C5 is the newest board and the only one with dual-band WiFi, 2.4 GHz and 5 GHz. Its GPIO numbers jump around, but the bus positions are the same as the other boards. The table below follows the Seeed wiki C5 pin map.

Pad GPIO Main function Shared with
D0 GPIO1 Analog A0, ADC LP GPIO, wake
D1 GPIO0 GPIO LP GPIO
D2 GPIO25 GPIO Strapping
D3 GPIO7 GPIO SDIO DATA1, strapping
D4 GPIO23 I2C SDA –
D5 GPIO24 I2C SCL –
D6 GPIO11 UART TX –
D7 GPIO12 UART RX –
D8 GPIO8 SPI SCK –
D9 GPIO9 SPI MISO –
D10 GPIO10 SPI MOSI –
5V / GND / 3V3 – Power 5 V, GND, 3.3 V out

Source: Seeed wiki C5 pin map. The chip has 5 ADC channels, but only D0 is broken out as an analog header pin.

The battery voltage reading is built in: GPIO6 reads the battery and GPIO26 enables the measurement circuit, so you can read the cell voltage in code with no divider to solder. Source: Seeed wiki C5 battery section. The user LED is GPIO27.

What is the XIAO ESP32S3 pinout?

The S3 pinout is covered in full in our dedicated guide, Seeed XIAO ESP32S3 Pinout: GPIO, Camera, and Power, so this section is a summary only. The S3 breaks out the same 11 D pins: D0 to D5 are GPIO1 to GPIO6, D6 and D7 are GPIO43 and GPIO44 for UART, and D8 to D10 are GPIO7, GPIO8, and GPIO9 for SPI. I2C is D4 and D5, and 9 of the 11 pins can read analog voltages. The boot button is GPIO0. The Sense version adds a detachable camera and a microSD slot on an expansion board on the back, and the microSD chip select is GPIO21.

Which pins are shared with other hardware?

A pin that looks free on the header may already have a job. Check this table before you assign pins.

Shared hardware Board Pins involved What it means for your wiring
Antenna RF switch C6 GPIO3 (power), GPIO14 (select) Internal, not header pins. GPIO3 low, then GPIO14 low for onboard or high for external. Source: Seeed wiki C6.
Antenna C3 U.FL connector only No onboard antenna. Attach the external antenna or WiFi range will be poor.
Battery voltage read C5 GPIO6 (read), GPIO26 (enable) Built-in divider. Drive GPIO26 high to read the battery on GPIO6. Source: Seeed wiki C5.
Camera, mic, microSD S3 Sense only Board-to-board connector, SD CS GPIO21 On the expansion board, not the D header. See the S3 pinout guide.

Which pins are free for your project on each board?

Free means no boot-time duty, no bus duty, and no shared hardware.

The bus pins are the same on all four boards (D4/D5 I2C, D6/D7 UART, D8 to D10 SPI) and are free whenever that bus is unused.

Board Free pins, no conditions Pins that need care
C3 D1 (GPIO3), D10 (GPIO10) D0, D8, D9 (strapping); D2, D3, D4, D5 (JTAG)
C6 D0, D1, D2, D3, D4, D5, D8, D9, D10 D6, D7 (UART console)
C5 D0, D1, D4, D5, D6, D7, D8, D9, D10 D2, D3 (strapping)
S3 D0, D1, D3, D4, D5, D8, D9 D2 (strapping), D6, D7, D10 (see the S3 pinout guide)

Sources: Seeed wiki pin maps; the S3 row follows our S3 pinout post.

Which pins are strapping and boot pins on each board?

Strapping pins are read by the chip at reset to pick the boot mode. A sensor that pulls one to the wrong level at reset can stop the board from booting or accepting an upload.

Board Strapping pins on the header Boot button GPIO
C3 D0 (GPIO2), D8 (GPIO8), D9 (GPIO9) GPIO9
C6 None on the header GPIO9
C5 D2 (GPIO25), D3 (GPIO7) GPIO28
S3 D2 (GPIO3), plus GPIO0 on the BOOT button GPIO0

The C3 pins come from the Seeed wiki C3 strapping section. The Seeed wiki has no strapping section for the C6 or the C5: the C6 list (GPIO4, GPIO5, GPIO8, GPIO9, GPIO15, all internal) comes from the SolderHub C6 guide, and the C5 pins come from the ESP32-C5 datasheet via the espboards C5 page, both secondary sources. Full S3 detail is in the S3 pinout guide.

If a board stops appearing as a USB port or refuses uploads after you wire something new, check the strapping pins first. Disconnect the new wiring, confirm the board uploads again, then rewire with the strapping pin left alone at boot.

What are the common mistakes?

  • Using a pin table from the wrong board. D4 is GPIO6 on the C3, GPIO22 on the C6, GPIO5 on the S3, and GPIO23 on the C5. The D name is the same and the GPIO number is not.
  • Wiring a sensor to a strapping pin on the C3. D0, D8, and D9 decide the boot mode. A sensor that pulls one low at reset can leave the board unresponsive.
  • Expecting analog reads on every D pin. Only D0 to D3 read analog on the C3, only D0 to D2 on the C6, and only D0 on the C5. The S3 is the analog-rich board with 9 analog header pins.
  • Running the C3 with no antenna. The C3 has no onboard antenna. WiFi will barely work without the external antenna on the U.FL connector.

How do I troubleshoot a XIAO pinout problem?

The board does not appear as a USB port. Try a different USB-C cable, one that carries data, not a charge-only cable. Then try bootloader mode: on the C6, hold BOOT, connect the cable, release BOOT, and upload Blink. Source: Seeed wiki C6 bootloader section.

Uploads fail after new wiring. Disconnect the new wiring and try again. If the upload works, a strapping pin is held at the wrong level. On the C3 check D0, D8, and D9 first. On the C5 check D2 and D3. On the S3 check D2.

analogRead returns 4095 or 0 all the time. Check that the pin is an analog pin on your board. On the C5 only D0 reads analog on the header. On the C6 only D0 to D2 do. On the C3 only D0 to D3 do. Also check that the sensor output stays inside 0 to 3.3 V.

Which pins can I use for my project?

Pick the board first, then the pins. If you have not picked a board, see XIAO ESP32C3 vs C6 vs S3 vs C5: Pick the Right Board.

Project Board Pins to use
I2C sensor or OLED Any D4 SDA, D5 SCL
SPI display or SD card Any D8 SCK, D9 MISO, D10 MOSI, plus a free pin for chip select (on the C3, use D1, not D0)
Analog sensor S3 first, C3 second S3: D0 to D5, D8 to D10; C3: D0 to D2
Battery-powered sensor node C6 or C5 C6: D0 to D2 for wake and analog; C5: D0 for wake

Parts used in this guide

Prices and stock were verified live on qualityrcparts.com on 2026-11-21 through the public Store API. All four items are in stock and purchasable.

Shipped fast and securely from our secure facility in Queensbury, NY. QRC ships within the USA only.

Related guides

FAQ

How many GPIO pins does a XIAO ESP32 board have? 11, named D0 through D10, on all four boards. The header also carries 5V, GND, and 3V3. Source: Seeed wiki pin maps.

Which pins are I2C on the XIAO ESP32 boards? D4 is SDA and D5 is SCL on all four boards. Source: Seeed wiki pin maps.

Which pins are SPI on the XIAO ESP32 boards? D8 is SCK, D9 is MISO, and D10 is MOSI on all four boards. Source: Seeed wiki pin maps.

Can I use 5 volt sensors with a XIAO ESP32 board? No. All four boards run 3.3 V logic, and a voltage above 3.3 V on a GPIO pin can damage the chip. Use a level shifter. Source: Seeed wiki power sections.

Which XIAO pins are strapping pins? On the C3, D0 (GPIO2), D8 (GPIO8), and D9 (GPIO9). On the C5, D2 (GPIO25) and D3 (GPIO7). On the S3, D2 (GPIO3). On the C6, none of the header pins is a strapping pin.

Why does my XIAO ESP32C3 not boot after I wire a sensor? The usual cause is a strapping pin held at the wrong level at reset. D0, D8, and D9 decide the boot mode on the C3. Disconnect the new wiring, confirm the board boots, then move the sensor to D1 or D10.

Does the XIAO ESP32-C5 have an analog pin? Yes, one on the header: D0 (GPIO1). The chip has 5 ADC channels in total, but the others are not broken out on the header. Source: Seeed wiki C5 pin map.

Sources

Last updated: 2026-11-21

Change log

  • 2026-11-21: Draft created. Full C3, C6, and C5 pin tables from the Seeed wiki pin maps; S3 covered as a summary with a link to the dedicated S3 pinout post. Shared-pin, free-pin, and strapping tables added. No live post gives full C3, C6, or C5 pin tables, verified against posts 23363, 22718, and 18592.

ESP32-S3 Face Detection Guide: XIAO Sense and S3-CAM

The ESP32-S3 can look at a camera frame and tell you where the faces are, on the chip itself, with no cloud account and no video leaving the board.

This guide covers what the ESP32-S3 can and cannot do with faces, detection vs recognition, which boards work, the no-code and Arduino routes, and the mistakes that waste the most time. Nothing here needs a paid app or a cloud account for the on-device routes.

What is face detection on the ESP32-S3, and what can it actually do?

Face detection on the ESP32-S3 means a small neural network model runs on the chip, looks at each camera frame, and returns a box around every face it finds, plus a confidence score for each box. Your code gets the boxes: light an LED, count people, trigger a relay, send an MQTT message, or save a snapshot.

It works on the ESP32-S3 and not well on the classic ESP32 because of the hardware. The ESP32-S3 has vector instructions that speed up neural network math, and camera boards built on it carry 8 MB of PSRAM, which holds the frame and the model weights. Source: Espressif edge AI workshop and ESP-WHO docs.

Detection runs on small frames. The models are trained on small inputs, so the camera captures at a low resolution for inference even when the sensor can shoot much higher. Espressif’s workshop lists QVGA (320 by 240) as the typical frame size for face detection and HVGA (480 by 320) for face recognition. Source: Espressif edge AI workshop, Assignment 4.

What is the difference between face detection and face recognition?

Detection and recognition are two different jobs, and mixing them up is the most common source of disappointment with these boards.

Face detection answers “is there a face in this frame, and where”. It returns boxes and confidence scores and knows nothing about who the person is. A doorbell that lights up when someone approaches and a people counter at a doorway need detection only.

Face recognition answers “whose face is this”. It runs detection first, then turns each detected face into a numerical embedding and compares it against faces you enrolled earlier. You show the board each person’s face and give it a name, and the board stores the result. A door lock that opens for family members needs recognition.

Recognition is harder, slower, and more fragile than detection. It needs the face to be larger in the frame, better lit, and facing the camera more directly. It also stores face data on the board: tell everyone in the household what the camera stores, and do not use recognition to identify people who have not agreed to be enrolled. This guide gives no accuracy percentage for recognition, because no primary source we checked publishes one.

Task Question it answers Needs enrollment Typical use
Face detection Is there a face, and where No Doorbell alert, people counting, intruder alert
Face recognition Whose face is this Yes, one enrollment per person Door lock for family, attendance
Person detection Is there a person in frame No Room occupancy, trail camera trigger

Which ESP32-S3 boards work for face detection?

Any ESP32-S3 camera board with PSRAM can run a face detection model. The classic ESP32-CAM is the exception: on-device face detection models were removed from the Arduino ESP32 core version 3, so the classic board is a poor choice for new on-device face projects. It can still capture a picture and send it to a cloud API for detection. Source: Robojax tutorial.

Board Chip Camera PSRAM Face detection
XIAO ESP32S3 Sense ESP32-S3 detachable camera 8 MB Yes, on device
ESP32-S3-N16R8 CAM ESP32-S3 OV5640, 5 MP 8 MB Yes, on device
Classic ESP32-CAM ESP32 OV2640 4 MB Not recommended on device

The XIAO ESP32S3 Sense is the smallest option: an ESP32-S3 dual-core 240 MHz board with 8 MB PSRAM and 8 MB flash, a detachable camera, a digital microphone, a microSD slot, WiFi and Bluetooth 5.0, in a 21 by 17.5 mm footprint. The detachable camera matters: mount the tiny camera where the faces are and keep the board tucked away.

The ESP32-S3-N16R8 CAM is the larger, cheaper bench board: a dual-core ESP32-S3 with 16 MB flash plus 8 MB PSRAM and an OV5640 5 MP camera, with two USB-C ports that split OTG and serial duties, so it programs over USB with no adapter. The higher resolution sensor does not make detection better, because detection runs on small frames.

Which approach should you pick?

There are four working routes. Pick one row and follow its section.

Approach Code needed Toolchain Best for
SenseCraft AI (Seeed) None, deploy in a browser Web platform, USB cable Fastest first detection
Arduino IDE with esp-dl models Arduino sketch Arduino IDE, ESP32 core 2.0.17 Full control, offline recognition
ESP-WHO with ESP-IDF C, ESP-IDF project ESP-IDF v5.5.x Espressif reference examples
Cloud API detection Arduino sketch plus an API key Arduino IDE, internet Classic ESP32-CAM

How do I run face detection with SenseCraft AI, with no code?

SenseCraft AI is Seeed’s edge AI platform. It deploys a prebuilt model to a supported board from a browser, with no machine learning code and no toolchain install. This is the fastest route to a working face detector.

  1. Plug the XIAO ESP32S3 Sense into your computer with a USB-C data cable. A charge-only cable will power the board but the browser will never see it.
  2. Open the SenseCraft AI model page at https://sensecraft.seeed.cc/ai/model. Under Pretrained Models, set Task to Detection and Supported Devices to XIAO ESP32S3 Sense, then search “Face”.
  3. Pick the Swift-YOLO face detection model. As of July 2025 there were two face models listed, and the Makerguides tutorial reports only the Swift-YOLO one worked.
  4. Click Deploy Model, then Connect Device, pick the COM port the board is on, and confirm. The model downloads to the board in about 1 to 2 minutes. Source: Seeed SenseCraft AI wiki.
  5. The preview starts on its own, with bounding boxes drawn around detected faces in the live feed, each box carrying a confidence score.

Two settings control what counts as a detection. The confidence threshold filters detections by how sure the model is that something is a face: every detection scores 0 to 100 percent, and anything below the threshold is discarded. A lower threshold catches more faces but also flags more non-faces. The IoU (Intersection over Union) threshold decides which overlapping boxes to keep when the model draws several boxes around one face. Source: Makerguides tutorial.

SenseCraft models also offer outputs from the sidebar: a GPIO pin that goes high when a face is detected, serial output over UART, I2C or SPI with the face count and confidence, or MQTT over WiFi for a home automation system. GPIO is enough for a door opener or an alarm; MQTT is for Home Assistant. Source: Makerguides tutorial and Seeed wiki.

How do I run face detection with Arduino IDE?

Use the Arduino route when you want the detection inside your own sketch, for example a camera that also drives a relay or serves a web page. The Robojax XIAO face recognition tutorial is the clearest Arduino reference we found, and its settings are strict: get one wrong and the sketch will not compile or will not detect anything.

  1. Install Arduino IDE and add the ESP32 board package. In Boards Manager, install ESP32 core version 2.0.17. This version matters most: Espressif removed the on-device face detection models in core 3, so the project cannot compile there. Version 2.0.17 is the last 2.x release with both those models and the XIAO_ESP32S3 board definition. Source: Robojax tutorial.
  2. Select the board as XIAO_ESP32S3, not ESP32S3 Dev Module. The board definition carries the right camera pins and PSRAM settings.
  3. Set PSRAM to OPI PSRAM. It is off by default, and nothing works without it. Set Flash Size to 8 MB, Partition Scheme to Default with SPIFFS, USB CDC On Boot to Enabled, and Upload Speed to 921600, dropping to 460800 if uploads fail. Source: Robojax tutorial.
  4. Use the face detection models from the ESP32 core: HumanFaceDetectMSR01 as stage one to find candidate faces, and HumanFaceDetectMNP01 as stage two to refine the boxes and add five facial keypoints. The pipeline captures at 240 by 240 in RGB565, runs both stages, draws the boxes into the frame, then compresses to JPEG for streaming. Source: Robojax tutorial.
  5. Get the camera stream working before adding detection. Flash a plain camera sketch first and confirm the video shows in a browser. If the stream fails, the fault is in the camera setup, not the model. Our ESP32-S3-CAM setup guide covers the first-stream steps.

How do I add face recognition, so the board knows who it is?

Recognition adds two steps after detection: enroll faces, then match new faces against them.

Enrollment means showing the board each person’s face and storing the result. In the Robojax offline recognition project, enrollment happens from the board’s own web page: you type a name into a roster slot, point the camera at the person, and save. The board makes its own WiFi network for this, so no router and no internet are involved, and no face ever leaves the board. The stored data is a numerical embedding, not a photo, but it still identifies a person.

Matching means each new detected face is turned into an embedding and compared against every stored embedding. The EloquentEsp32cam docs describe the pipeline: align the face, generate a 512-dimensional embedding, compare it against stored embeddings, and return the best match if the similarity passes a threshold. Recognition typically takes 80 to 150 ms on ESP32-S3 hardware, for the recognition step alone. Source: EloquentEsp32cam DeepWiki docs.

The ESP-WHO framework is the Espressif reference route for recognition, with a state machine for ENROLL, RECOGNIZE, and DELETE operations. It targets ESP-IDF v5.5.x and the ESP32-S3 and ESP32-P4 chips. Source: Espressif ESP-WHO get started guide.

Do not use recognition as a security lock on its own. A small on-device model can be fooled by a printed photo, and no primary source we checked publishes a spoof resistance claim for these models. Keep a separate lock, code, or key for anything that must stay secure.

What are the accuracy and speed limits?

No source we checked publishes one tested accuracy number or one tested frame rate for ESP32-S3 face detection, so this guide gives neither as a universal claim. The limits below are what named sources state on their own setups.

  • Resolution for inference is small. Face detection runs at QVGA (320 by 240) and face recognition at HVGA (480 by 320) in Espressif’s workshop, and the Arduino recognition pipeline captures at 240 by 240. A face that is small in the frame will not be detected, whatever the sensor’s maximum resolution is. Source: Espressif edge AI workshop, Robojax tutorial.
  • Recognition is slower than detection. The EloquentEsp32cam docs state recognition typically takes 80 to 150 ms on ESP32-S3 hardware, for the recognition step alone, or roughly 7 to 12 recognitions per second before capture and streaming are counted. Source: EloquentEsp32cam DeepWiki docs.
  • Frame rate depends on resolution and settings. The Tokay Lite vendor page, for an ESP32-S3 camera board with 8 MB PSRAM, states its face detection model runs at 1 to 10 frames per second depending on resolution and settings. That is a vendor claim for their board, not a measured number for the XIAO Sense or the S3-N16R8 CAM. Source: Maxlab Tokay Lite page.
  • Lighting and angle matter more than the sensor. Faces that face the camera, are well lit, and fill a reasonable part of the frame detect reliably. Backlit faces, faces in profile, and faces at a steep angle do not. Test where the camera will live before mounting it permanently.

What are the common mistakes?

  • Using Arduino ESP32 core 3 for an on-device face sketch. The face detection models were removed in core 3. Use 2.0.17. If a sketch fails to compile with a missing face detect header, check the core version first.
  • Leaving PSRAM off. OPI PSRAM is off by default on the XIAO board definition, and the face pipeline will not run without it. Set it before the first upload.
  • Picking the wrong board definition. XIAO_ESP32S3, not ESP32S3 Dev Module. The wrong definition gives the wrong camera pins.
  • Running detection at full sensor resolution. The models are trained on small inputs. Capture small for detection.
  • Trusting recognition as the only lock. No spoof resistance claim exists for these small models. Keep a separate lock or code.

How do I troubleshoot face detection that does not work?

Work through this list in order.

The camera never shows a picture. Flash a plain camera sketch first. If that fails, the fault is wiring, pins, or power, not the model. Check the USB cable is a data cable and reseat the camera ribbon cable. Our ESP32-CAM getting started guide covers first-stream failures.

The sketch will not compile, missing human face detect headers. Check the ESP32 core version in Boards Manager. It must be 2.0.17 for the on-device face models. Source: Robojax tutorial.

The board boots but detection never fires. Check PSRAM is set to OPI PSRAM in the Arduino IDE tools menu, and that the frame size is 240 by 240 or QVGA. Then lower the confidence threshold and test with a face close to the camera, well lit, facing the lens.

Faces are detected but with many false positives. Raise the confidence threshold until non-faces stop triggering, then check real faces still trigger.

Which board should you buy?

  • Buy the XIAO ESP32S3 Sense if you want the smallest camera that runs face detection or the no-code SenseCraft AI route.
  • Buy the ESP32-S3-N16R8 CAM if you want the cheapest bench board, you prefer dual USB-C with no adapter, or you want the extra flash headroom.
  • Keep the classic ESP32-CAM if you only need to stream video or send a picture to a cloud API for detection.
  • Buy neither yet if you need to identify strangers, read faces at long range, or run a security system. No small on-device model does those jobs well. Our Arducam camera guide covers the Pi side.

Parts used in this guide

Prices and stock were verified live on qualityrcparts.com on 2026-11-21. All three items are in stock and purchasable.

Shipped fast and securely from our secure facility in Queensbury, NY. QRC ships within the USA only.

Related guides

FAQ

Can the ESP32-S3 do face detection? Yes. The ESP32-S3 runs small on-device face detection models with no cloud. Detection runs on small frames, typically QVGA (320 by 240) or 240 by 240. Source: Espressif ESP-WHO docs and edge AI workshop.

What is the difference between face detection and face recognition on ESP32-S3? Detection finds faces and returns boxes. Recognition identifies whose face it is by comparing it against faces you enrolled earlier. Detection needs no enrollment; recognition needs one per person, stores face embeddings on the board, and is slower and more sensitive to lighting and angle. Source: Espressif ESP-WHO docs, EloquentEsp32cam docs.

Which ESP32 board is best for face detection? The XIAO ESP32S3 Sense is the best small board, and the ESP32-S3-N16R8 CAM is the best cheap bench board. Both are ESP32-S3 with 8 MB PSRAM and run the same on-device models. The classic ESP32-CAM is not recommended for new on-device face work. Source: Robojax tutorial, QRC live listings.

Can I do face detection on ESP32-S3 with Arduino? Yes, with Arduino IDE and ESP32 core version 2.0.17. Core 3 removed the on-device face detection models, so 2.0.17 is required. Select XIAO_ESP32S3, set PSRAM to OPI PSRAM, and capture at 240 by 240. Source: Robojax tutorial.

Can the ESP32-S3 do face recognition offline? Yes. Recognition runs on the board with no internet: the Robojax offline project enrolls faces from the board’s own web page over its own WiFi network. No face data leaves the board. Source: Robojax tutorial, Espressif ESP-WHO docs.

How far away can the ESP32-S3 detect a face? No primary source we checked publishes a detection range in feet or meters. Detection depends on how large the face is in the small inference frame, plus lighting and angle. Test at the real mounting distance.

Sources

Last updated: 2026-11-21