$ cd ../projects

DIY BLE Analog RGB Controller (ESP32-C3) V1

Rebuilding a cheap LED controller from scratch with an ESP32-C3, logic-level MOSFETs, and custom written Bluetooth firmware.

Date
Status Complete
Difficulty ★★★★
Cost ~$5 ($2.60 ESP32-C3 | $2.57 10x IRLZ44N)
ESP32-C3BLEPWMMOSFET

Overview

I’ve had my cheap analog RGB LED strip controller (specifically a “610+MIC+IR-V05” board) for about 6 years until it finally burnt out recently. Instead of buying another $8 board destined to die the same way, I thought to myself, why not try and rebuilt it from some relatively cheap parts I could find easily online?

All I needed was an ESP32-C3, 3x IRLZ44N logic-level MOSFETs, and a Mini360 (MP2307) buck converter. My goal was simple: get back the one feature I actually used from the original: BLE-based RGB control from my phone.

Parts

How it works

The strip is common-anode analog, one shared 12V line, separate R/G/B return wires. Each color channel is one IRLZ44N wired as a low-side switch: the strip’s color wire goes to the MOSFET drain, source to ground, and the gate to an ESP32-C3 PWM pin through a 220 Ω resistor, with a 10 kΩ pulldown from gate to ground. The PWM dims each color which means I can mix the three colors, giving me my full-spectrum color back.

Power: The 12V supply feeds the strip’s + rail directly and also feeds the Mini360, which I stepped down to 5V into the ESP32’s 5V/VBUS pin (Not 3V3! I let the board’s own regulator make 3.3V).

Firmware

Originally I was looking for a project similar to WLED (For those who don’t know, WLED is a free and open-source software for ESP8266/ESP32 microcontrollers that lets you control addressable LED strips and other lighting setups from a mobile app), but WLED is primarily built around UDP, meaning WiFi, which for my setup would not work. I found a few brave souls who forked the originial WLED project and were trying to convert it to a BLE stack, however development seemed to have haulted on it back in 2022.

Because of the lack of an in-development ESP32 BLE Analog RGB Controller firmware, I decided to break out PlatformIO and write it myself. I chose, of course, to write BLE-only firmware (no WiFi, so no radio contention on the C3). I chose to control the color via exposing solid color, master brightness, and a couple of effects (rainbow cycle and color breathe) as 3 separate BLE characteristics, which then allows me to use any generic BLE app (I chose nRF Connect on iOS) to communicate with the controller.

Even though the simpler solution would’ve been flashing WLED, which supports analog/PWM output and is basically a software clone of the original board, I wanted real BLE control and the practice of writing the firmware myself.

What broke / what I learned

Result

I have restored my full RGB control-over-Bluetooth from my phone functionality, on hardware I built and software I wrote.

Potential Future Upgrades