5 May 2025

LED control board

This board was developed to control the illuminations on the car to replace the previous board that wasn’t completely finished.

It uses a PIC32MZ2048EFH064 as the main MCU combined with an ESP32-S3-WROOM-1 providing a wireless remote control interface to the main MCU.

This board can aquire audio input from five insulated channels, directly mapped to non multiplexed ADC from the PIC32MZ, to drive LED strips (SK6812-RGBW) for different sound based light effects, such as a VU-meter effects. The implemented firmware also provides pre-defined illumination patterns and default static colors.

As the board is only powered when the system is on, changes of state (color, mode, speed, etc.) is saved in an I2C EEPROM allowing the system to reboot directly on the last state.

The illumations can be changed either using direct switches connected to the level shifters linked to the MCU’s intterupt pins (i.e. switches on the dashboard) or remotely through serial over BLE (an Android app was developped to control it from the phone) or Wifi (the ESP32 exposes a webpage providing a simple Web UI to control the system).

N.B. Since there are no available libraries to drive SK/WS LEDs on the PIC32MZ platform, the driver was implemented in assembly to bit-bang the logical signals with precise timing (i.e. counting instructions to ensure each branch has the same duration and adjusting timing with the right amount of NOPs, based on the CPU frequency).

Illustrations

Board

Board

Assembly

VU-meter

Remote control test

Final result