All articles

How many LEDs and effects can an ESP32 drive? (the PWM channel limit)

"How many LEDs can you connect to an ESP32?" It's one of the most common questions when getting into RC car lighting. The short answer: almost as many as you want in plain on/off, but far fewer if you want to vary brightness or use fades. Here's why — and how Flare RC gets the most out of your board.

On/off is not the same as dimming

Turning a LED on or off needs nothing special: any ESP32 GPIO pin can do it, and there are plenty. But to vary brightness (night mode, dim vs full beam) or to do fades (halogen-style progressive turn-on, idle breathing, smooth light-bar rotation), you need PWM (Pulse Width Modulation) — and that's where the board is limited.

PWM channels (LEDC) are a fixed resource

On the ESP32, PWM goes through a hardware peripheral called LEDC, which has a fixed number of channels: about 16 on an ESP32-WROOM, 8 on an S3, 6 on a C3/C6. Each output that needs to vary in brightness takes one channel. Once channels run out, further outputs can only work on/off.

How Flare RC allocates the channels

Standard effects (headlights, rear lights, reverse, exhaust flames, fog lights, hazards) already use ~9 channels. The light bar takes 4 more when enabled. Custom LEDs get whatever is left — and automatically fall back to on/off if all channels are taken. They still work, just without dimming or fading.

The trick: disable the light bar when unused

The light bar isn't used on most drift or scale cars. By leaving it off, Flare RC automatically frees its 4 PWM channels for your custom LEDs — which can then fade and vary in brightness. It's free and automatic: if you re-enable the light bar later, the channels are redistributed.

In practice

If one of your custom LEDs doesn't "breathe" or ignores the brightness setting, it most likely didn't get a PWM channel. Fix: disable the light bar if you don't use it, or reserve PWM for the LEDs that truly need it (steady lights are perfectly fine on plain on/off). Key takeaway: on/off = nearly unlimited; variable brightness and fading = limited to PWM channels (16 on WROOM). Flare RC optimizes the allocation for you.

← Back to the blog