How to power a white led

Hi,
For my volumio projects I want to use some metal push button with white led ring. This white led rings will be On as long as the volumio is on.
I am thinkinf to light it up from txd port. 3.3v
Because those leds have a high forward voltage what will be the best way to power those leds…
I should use 5v rail and let it on all the time?
Many thanks for your response.

1 Like

So do you want to make a power statused or a os status led? And on what platform?

Assuming raspberry pi, you could use either the 3.3v or 5v rail and a resistor. A led in this setup would be powered when ever there is power on the board.

Else you could connect to a gpio and set it as output. Max power draw would be 50ma with 3.3v but that’s more than enough for a few leds.

Search a led resistor calculator to find out what value you need. You can always go higher when the led is to bright.

Hi,

Thanks for your response.
I am using a led resistor calculator. The white led has vf=3.5v but the rpi4 gpio has only 3.3v so if gives an error when doing the math.
It is ok only if I powers from 5v and with 10mA results in a 140ohm.
Thanks.

with 10mA your LED will be extremely bright, I suggest to use a lower value.

anyhow, even if the Vf is 3.5V, the led will be ON with the 3.3V from a GPIO, you can try with a 180Ohm resistor in series with the LED to begin with, then increase or decrease the value to decrease/increase the brightness.

Understood.
So the led will be on even if the vf is higher then gpio voltage.
În that case what will be the current?

Many thanks Darmur. I did not know that.

To estimate the current, you should have the complete V/I characteristic of the LED

image

I don’t think they provide that. In this case some trial&error will be just fine

If you’ve got a spare old USB lead, you can cut it and use the red and black wires to power the resistor / LED with a 5v. supply.
Simply plug it into into a spare USB port. The LED will then come on when Volumio powers up and go off when it’s shutdown.
It’s how I powered the blue LED in my transparent Pi case here:

Hi,
Many thanks for your hint. Great.
Regards.

I like the suggestion from @Volpi I wish I had thought of that.

I use GPIO but it required that I set “enable_uart=1 ” in my userconfig.txt and it required that I edited cmdline.txt and removed the reference to kgdboc

I outlined it here: Adding a Status LED for RP3 B+

Hi awasson
I used plugins to do lights because I don’t know how to instruct the Pi with command lines like you do :wink:

I found that there was 5v on all Pi USB ports…until Volumio was shut down.
Which makes it an easy way to power a ‘Volumio on’ LED (such as your blue LED ring).

1 Like

I like it. Simple always works better. I wish I had thought of that. It’s just a better solution in the long run and doesn’t require any editing of the system files.