0
\$\begingroup\$

I have an LED with a 3.3v supply and 3.2v forward voltage. The cathode is being grounded (very sparingly) by an STM32 which can sink up to 20 mA. Can I get away without a resistor?

\$\endgroup\$
1
  • 3
    \$\begingroup\$ the LED does not 'have a forward voltage of 3.2 V'. It has a nominal forward voltage somewhere around that. Small changes in the difference between the drive and forward voltages, with LED temperature, batch, MCU supply voltage, will cause huge changes in current. \$\endgroup\$
    – Neil_UK
    Commented Jun 28 at 13:26

1 Answer 1

3
\$\begingroup\$

While it’s technically possible to connect the LED directly to the STM32 output pin without a current-limiting resistor, I recommend using a resistor for safety and reliability.

LEDs are current-driven devices. The STM32 can sink up to 20 mA, but the LED might not require exactly 20 mA. A small variation in LED forward voltage or STM32 output voltage could lead to excessive current, potentially damaging the LED or the STM32 GPIO.

Running an LED at its maximum current continuously can reduce its lifespan. A current-limiting resistor ensures a safe current level, extending the LED’s life.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.