Skip to Content

rbdimmerESP32 library v2.0.0 — Major Update

March 24, 2026 by
rbdimmerESP32 library v2.0.0 — Major Update
Administrator
| No comments yet

We've released rbdimmerESP32 v2.0.0 — a complete architectural rewrite of the ESP32 AC dimmer library. The public API is unchanged, so existing user code works without modification.

What's fixed

Three independent flickering issues, discovered during hardware testing on a real 4-channel board:

1. General flickering at all brightness levels TRIAC switching spikes were retriggering the zero-cross ISR mid-half-cycle. Fix: noise gate — any ZC edge within 3000 µs of the previous valid edge is discarded.

2. Flickering at 100% brightness At 50 µs delay the AC voltage was below TRIAC latching threshold, and esp_timer dispatch from a level-3 GPIO ISR made sub-100 µs delays unpredictable. Minimum delay raised to 100 µs; levels ≥ 100% capped at 99%.

3. Multi-channel synchronization artifacts Per-channel phase offsets caused by sequential GPIO reset + timer arm in a single loop. Fixed with two-pass ISR: Pass 1 resets all GPIOs, Pass 2 arms all delay timers.

4. Flickering below 3% brightness AC voltage too low for reliable TRIAC latching near end of half-cycle. Levels below 3% now map to OFF.

What's new

  • Modular architecture — monolithic .cpp split into 7 focused internal modules (zerocross, channel, timer, curves, transition, types, hal)
  • All ISR paths use IRAM_ATTR + ESP_TIMER_ISR dispatch for deterministic latency
  • Kconfig parameters for ESP-IDF projects — tune debounce window, min delay, level clamp values without recompiling
  • CI build matrix — 20 Arduino jobs (4 examples × 5 chips) + 15 ESP-IDF jobs (3 IDF versions × 5 chips)

Breaking changes (internal only)

  • Source layout changed to src/internal/ — direct include of internal headers no longer supported
  • Examples restructured to per-sketch directories (Arduino IDE 2.x format)
  • Kconfig.txt → Kconfig (standard ESP-IDF naming)
  • Minimum: ESP-IDF 5.3Arduino Core 3.x

Public header (rbdimmerESP32.h) API is fully unchanged.

GitHub: https://github.com/robotdyn-dimmer/rbdimmerESP32 
Docs: https://www.rbdimmer.com/docs/universal-library-for-esp32

in News
Share this post
Sign in to leave a comment