ESP32 power on the 5v pin

Hello,

I hope someone can give me some clarity.
The following setup:
ESP32 DevKit C
LED WS2801 0.5m
Motion Sensor HC-501
Two power supplies: one for the ESP32 and one for the LEDs.

I would like to reduce to one power supply unit. So I came up with the following idea: I could supply the ESP32 with power via the 5V PIN. I also have a power supply unit with 5V 1A. I don’t know if the 1A will be too much for the ESP32. And whether the current will still go through the converter. I can’t find anything in the data sheets or on google. Does anyone know?

Or how would you wire it? I am grateful for any information!

Regards,
Manuel

Vin 5volt = USB in 5v pin
Connect your PS to Vin and it will work. You can also connect a battery to that pin, 18650 cell or eq.

There is no such thing as:

As long as your supply is only 5V on the ESP Vin pin, the ESP will draw whatever current it needs.
A 1A supply would be considered pretty minimal as the ESP boards can often take 0.250A up to 0.750A (peak). That doesn’t leave much for your LEDs, which is why you often see a suggestion for separate dedicated power supplies for the MCU and the LEDs. They both can have very different power needs to work properly.

Are your LEDs 12 V or 5 V?

You can use either and still supply your ESP32 board. I typically supply mine using the micro USB connection. Even if using one power supply for the lights and ESP together, you can branch off the barrel connector with parallel circuits – one for the LEDs and another for the ESP32. Cut a USB cable in half and connect the hot and neutral from the supply to the appropriate wires in the cable. If my power supply is 12 V, i’ve used a buck voltage converter (https://www.amazon.ca/MP1584-MP1584EN-Converter-Voltage-Module/dp/B0CJ9VBFFB/ref=sr_1_25?crid=3UK6INUJWYO6M&keywords=buck+voltage+converter&qid=1703892717&sprefix=buck+voltage%2Caps%2C270&sr=8-25) to step down to 5 V for the ESP32. Just ensure to add a 1 uF capacitor to the ESP32 power circuit to stabilize it.

I recently did a display with 190 LEDs using a 12 V / 10 A wall-wart style power supply. That type of amperage is about right for that amount of LEDs. Each chip uses between 30 and 50 mA.

Thank you very much to all for your input. It helped me a lot!

@theScud Conveniently, my LEDs have 5V.I don’t think I need to share the connections. Do I need the capacitor anyway or is it recommended?

If you make sure you have adequate power for your strip, capacitors on the power strip are irrelevant.

The only place you definitely want one is for the 74AHCTxxx levelshifters. They require a 100nF ceramic bypass cap near the power pins.

I’m guessing you are trying to drive a small display of perhaps 30 LEDs?
I’d guess a worst case of perhaps 0.75A for the LEDs, so a 5V 3A supply might be sufficient to reliably drive both the ESP32 and the LEDs.

I’d suggest separate power lines from the supply for the ESP32 and the LEDs, that way the ESP board will get the power it needs regardless of the LEDs. Just make sure you use a ground and +5V wire for each connection.

What does your layout look like?
How far are the LEDs from the MCU and/or power supply?

Hello, a lot of time has now passed. I was very limited in time. But now I have more time and have dedicated myself to this project again.

I took the time to create a layout.
I’m not an electrician and this is the first time I’ve done this. Hope it’s not too bad :slight_smile: I didn’t find a ws2801 strip graphic or any with 4 connectors so just a connector.

There are 2 different wires for +5V and GND. Hope you can recognize it.
Does this circuit work?

Setup:

  • LED-Strip ws2801 - 31 LEDs
    fyi: Brightness will drop to approx. 20 % (do not need full brightness).
  • TexasInstruments SN74AHCT125 Level-shifter
  • D1 Mini Esp32 Controller
  • HC-SR501 Motion sensor

best regards,
Manuel

Looks reasonable, I notice pin 9 on the '125 has a GND line near it but not connected. I assume that’s just a typo in your drawing?

Only other potential issue is the use of a barrel connector for power.
With only 31 LEDs that shouldn’t be an issue.

If you expand in the future, probably the simplest thing you could do would be to attach both your LED power wires and the power supply wires together in the terminal block end, don’t use the barrel connector at all. The only power through the addon board will be for the ESP, which should be very small (<400mA) so the wiring is much less critical.
That will let get you a much better power connection for the LEDs.

Thank you very much for the quick reply.
Ah, that’s interesting. I would be in favor of leaving out the DC socket.

But the question for me is how to get the amps for the ESP to <400mA. Do you have any tips? I googled it, but there are a lot of different opinions.

I’ll draw another drawing with the tips you mentioned. I actually want to leave the option open to expand.

The Esp will only draw the current it needs. You don’t drop the amps. Also, I would test without the resistors. Very likely you don’t need them.

Ah understand. I will try without resistors.
Here is the new circuit.

Is this correct?

That should work fine.
As per Jinx’s comment, the resistors on the '125 outputs are definitely optional.

Hi there,

one last question, i think:
The 100nf ceramic bypass cap is a normal 100nf ceramik capacitor, right?
Like this:
https://www.amazon.de/AUKENIEN-Kondensator-Kondensatoren-Keramikkondensator-Kit/dp/B09NLZBC7R/ref=sr_1_2?__mk_de_DE=%C3%85M%C3%85%C5%BD%C3%95%C3%91&dib=eyJ2IjoiMSJ9.LDIR6F8y0_g7PDtNxSZOXCspCcDQ4oPQ6o1zntMnCtdXgwZEHwUF4_3bGO9YhWywKENMmYd-6wj2JNesq3CVhS_MHupVw_UMPHssvDxh3tR3GE_k66jNb_c5AYK7YDXuY2ze1WwA9pa2KxRMqOEmu7ijTDa0zKl9RzmQwx0rUcrkDn6oj4_trVT1qFI51AENNdF8Ft9nmU9Mn4VyBpgimM9-qiaTw4_9x8ENj1m37LliV1-xaA3axecWRRYT2YuwkxdAQB6JeNvB1vQ_G4ve4aY07H40K99RpFHPVYd9uhY.BEaPJRR4TqSd8SwulGhQznEzU1L1GC-UNN9Y8D2y0_M&dib_tag=se&keywords=keramik+bypass+kondensator&qid=1708700482&sr=8-2-spons&sp_csd=d2lkZ2V0TmFtZT1zcF9hdGY&psc=1

Yes, those are fine.