LED resistor value

I was just hoping someone could quickly confirm that I’m calculating the resistor value correctly for an LED I have in an arcade button switch that I will be hooking up to a particle Photon.

It’s a clear colored LED. I measured the forward voltage to be 2.76 volts. If I hook up the LED to a digital pin, I would assume the pin can provide 3.3 volts at 15mA safely (please correct me if I’m wrong). So (3.3-2.76)/.015 is about 36.52 ohms. The closest resistor I have available is 33 ohms. Would this be a safe value to go with?

@Proto, the STM32F205 can output a max of 25ma on a GPIO pin (though I wouldn’t push it to that) so you calculated resistor value of 33 ohms will limit the LED current to 16ma. If you have other LEDs do keep in mind that the STM32 total GPIO current is 120ma. :smiley:

1 Like