THRobinson
Posts: 18
Joined: Mon Aug 15, 2016 6:22 pm

Adding a Power LED

Wed Apr 26, 2017 7:46 pm

I was looking to add a power switch with an LED... which I guess would need a momentary switch? Though my understanding is that pressing it would start a script for shutdown, once shut down, button is useless?

So I may not bother... but I still wanted an LED light for the game console I am building and I liked how the switch looked, may just wire up the LED and from my understanding, I'll need to add a resistor. But... no idea how to calculate what I'll need.

I have a RaspPi3 with a 5v 2.5A power supply. I'll connect direct to the GPIO.

The PiHut switch specs say "The forward voltage of the LED is about 2.2V so connect a 220 to 1000 ohm resistor in series just as you would with any other LED to your 3V or higher power supply."

I don't know much about this stuff, just looking to build an arcade playing game console.... what resistor size would I need? 220-1000ohm seems to be a wide range... or not, again, I have very little knowledge about them expect what they do and that they have colour codes on them. :)

https://thepihut.com/products/adafruit- ... -momentary

drgeoff
Posts: 10354
Joined: Wed Jan 25, 2012 6:39 pm

Re: Adding a Power LED

Wed Apr 26, 2017 8:10 pm

The lower the resistor value, the brighter the LED will be.

THRobinson
Posts: 18
Joined: Mon Aug 15, 2016 6:22 pm

Re: Adding a Power LED

Wed Apr 26, 2017 8:41 pm

So... anything between 220-1000 will work? regardless if my power supply is 5v2.5A...

When it said 3V or higher power supply, I figured that range was in general, like for everything 3-12v... and you'd need to know exactly what your power supply was to narrow it down.

That's good, I have a mixed bag of them... when the switch comes, something should work. Figured if there was a more specific answer, I'd order what I needed at the same time as I ordered the switch and powered USB hub (which is for the arcade buttons).

Thanks

dgerman
Posts: 12
Joined: Sat May 04, 2013 7:27 pm

Re: Adding a Power LED

Wed Apr 26, 2017 10:01 pm

CAUTION: lower values draw more current, reduce battery life and (if low enough) will blow out GPIO port!
Stick with the highest value that gives suitable illumination. :mrgreen:

boyoh
Posts: 1419
Joined: Fri Nov 23, 2012 3:30 pm
Location: Selby. North Yorkshire .UK

Re: Adding a Power LED

Wed Apr 26, 2017 10:47 pm

5vdc+---------------( S )-----------( R )---------( a led k )---------0v-

5v - 2v = 3v / 15ma = 200r ( 2v across led passing a current of 15ma )

3,3v - 2v = 1.3v / 15ma = 86r ( 2v across led passing a current of 15ma )

Sugest keep the voltage across led at no greater than 2v and current no greater than 20ma
You will find this a good working level
BoyOh ( Selby, North Yorkshire.UK)
Some Times Right Some Times Wrong

Return to “Beginners”