How to connect and control several individual RGB LEDs?


I’m thinking about starting a project to build a wall mounted analogue dashboard for our home.

The idea is mounting a nice looking wooden or brass board with different engraved names like “Front door” or “Heating system” and showing the state using controllable RGB LEDs.

I understand it would be much easier to achieve just using a tablet or screen and showing a custom dashboard but there’s something about having an analogue sign that’s attractive to me.

I’m a beginner using microcontrollers and ESPHome but I’ve successfully connected one RGB LED to a ESP32 dev board and can control it from Home Asssistant.

However, I would like to connect 10-20 LEDs to the ESP32! If every LED demand three pins this is impossible. I understand there must be a better way of doing this but how? I know there´s RGB LED-strips with individually controllable LEDs but I also need the LED itself to be individually mountable.

Any advice how to achieve this and what kind of hardware I’m should look for? Something like this (a bundle of deck lights) but for use with a microcontroller?


It is possible using partitioning your RGB strip. Here is an example.

Individual separate lights are possible, I did a quick search on aliexpress and found these, a better search will reap better results.

1 Like

Thank you! Your reply gave me something to use when searching. It seems separate LEDs is called “pixel modules” or similar.

Would this 5V version work directly together with an ESP32?

Could it be cut in sections and used separately?

I can’t see them being an issue, make sure you have a separate power supply :slight_smile:

You should be able to separate them with no issues.

Ah, so multiple LEDs can’t be powered by the ESP32 dev board itself, only controlled?

Sorry for the stupid questions, I connected a single RGB LED directly to the ESP32s pins without external power (just USB powering the ESP32) and it seems to work.

So the correct way is to power the ESP32 dev board using the USB port and the LEDs with another power source?

They will work up to a point, the more you have, the more power required to run them, you may get away with it.

Take a look at these diagrams I’ve stolen.

1 Like

I would get a relay bank that controls the lights (to.power the lights from a separate source) and then have a multiplexer between it and the bank to minimise the number of GPIO pins needed. For example, with 3 pins you can then control 8 lights (2^3), etc.