ESP32 Light Dimmer
An attempt at a multi-channel incandescent light dimmer using the ESP32. Will eventually provide HTML/javascript based UI for dimming lights.
Status
Still under construction. Able to do fades of up to 4 dimmer channels.
Experiments with the LEDC peripheral revealed a need to perform dimming manually (instead of with LEDC fade functionality) due to inability to adjust PWM phase via dimming. So, we implemented the dimming logic inside zero-crossing interrupt routine, but needed to perform all math as fixed-point due to hard faults when doing floating point in ISR.
Next step is to implement HTML/wifi based control. Looking at possibly using
Hardware
- Sparkfun ESP 32 Thing (although any ESP32 module should work, possibly with changes in pin configuration).
- 2x 4 channel AC light dimmer board (but any MOSFET-based dimmer board with zero-crossing detection should work).
Building
Requires ESP32 IDF.
export IDF_PATH=/path/to/esp-idf
make menuconfig
make flash