LED Hookup Options

I purchased a bunch of these items from Aliexpress and I am exploring options for connecting them to an ESP32 D1 Mini.

So my question… in order to turn these LED lights on and off, do I need a relay, or can I turn the power on and off from a GPIO?

It’s going to be for my daughters night light, so no need to be super complex.

Thanks in advance.

The ESP should be able to output up to 40mA on it’s GPIO so it would be able to run ONE of those LED’s from each GPIO up to the max total output current which I believe is 1200mA.

They draw 20mA. An esp32 can power 40mA. You should be fine. But if it runs hot, get a relay or transistor or fet.

Thank you for your advice gentlemen. I apologise, I should have mentioned I wanted to run 3 or 4 of them… individually controlled if that were possible.

I’d like to avoid a relay if possible because I dont have the space inside the light, so do you believe using a transistor or something like that might be an option?

As I mentioned, you can put one on each of 4 outputs no problem. That will also let you control them individually.

1 Like

From the data sheet the spec is 1.2A max from the chip and each pin can Source 40mA or Sink 28mA so 3 or 4 loads of 20mA should nor be an issue but it would be a good idea to use them in the Source mode.

esp32 max

esp32 current per pin