Properly powering 5mm LED on GPIO pin

Imstarboard
Posts: 6
Joined: Thu Sep 17, 2020 3:17 pm

Properly powering 5mm LED on GPIO pin

Postby Imstarboard » Sun Oct 02, 2022 10:00 pm

I have read quite a bit about needing a resistor when powering a 5mm LED from an esp32 GPIO pin, however, other experts say that if a LED is powered correctly, it won't need a resistor at all and won't burn out.

1. Is it as easy as purchasing a LED that is powered properly for an esp32 GPIO pin so that it won't likely burn out in a reasonable amount of time (years)?

2. If so, what is the current on each GPIO pin? (I know that the voltage on each GPIO pin is 3.3V)

3. Instead of adding a resistor, I can add a second LED in parallel to add resistance and meet the power requirements, right?

Thanks!

lbernstone
Posts: 832
Joined: Mon Jul 22, 2019 3:20 pm

Re: Properly powering 5mm LED on GPIO pin

Postby lbernstone » Sun Oct 02, 2022 11:57 pm

The maximum power per pin is 40mA. You should not push more than 150 mA through all your output pins (and probably less than that to avoid overheating). You can find the correct resistor value using any led resistor calculator online and the datasheet for your led. I don't see how parallel resistors will be useful if you are powering directly through the pin, and you don't have to get the exact resistance calculated. If you need more than milliamps, you should have a transistor gating a separate power supply for the light.

Who is online

Users browsing this forum: No registered users and 48 guests