sachinwable
Posts: 13
Joined: Fri May 13, 2016 9:17 am
Location: Pune
Contact: Website

LED on gpio

Tue May 17, 2016 2:40 pm

Hi, I am a software guy with very less knowledge of electronics. This is not a question about Raspberry but general electronics.

What will happen if I connect a 2 volt LED to 3.3 v and GND pin without a resistor? Will that damage my pi or LED? I dont care if that damage LED. :p

Thank you
Sachin

User avatar
MarkHaysHarris777
Posts: 1820
Joined: Mon Mar 23, 2015 7:39 am
Location: Rochester, MN
Contact: Website

Re: LED on gpio

Tue May 17, 2016 2:53 pm

sachinwable wrote:What will happen if I connect a 2 volt LED to 3.3 v and GND pin without a resistor? Will that damage my pi or LED?
You will burn out the LED, most probably; it will light very brightly for a brief time and then go out forever. If the LED short to ground draws more than 16ma from the GPIO pin you may damage your PI as well... depends how long the current flows... I never tried it!

LEDs are semi-condictors--- not resistance loads. They operate at a specific forward voltage and forward current (to produce a specific luminescence). There is a formula for determining how to calculate the proper current limiting resistor.

Always use a current limiting resistor with your LEDs (at least the ones you want to use again!)

:mrgreen:
marcus
:ugeek:

blaablaaguy
Posts: 623
Joined: Sun Sep 27, 2015 3:26 pm

Re: LED on gpio

Tue May 17, 2016 3:00 pm

Normal leds that can be powered from the gpio directly need resistors anyway or theyll damage the pi. Try powering the led from 2 fresh aa/aaa batteries. If it doesnt break you could probably use it with the gpio with a 400ohm or larger resistor.

By the way, try this at your own risk. I cannot be held responsible for any damage caused
This signature intentionally left blank.

User avatar
MarkHaysHarris777
Posts: 1820
Joined: Mon Mar 23, 2015 7:39 am
Location: Rochester, MN
Contact: Website

Re: LED on gpio

Tue May 17, 2016 3:06 pm

blaablaaguy wrote:use it with the gpio with a 400ohm or larger resistor.

By the way, try this at your own risk. I cannot be held responsible for any damage caused
Low power 3mm Red LEDs (2ma) will work with a 470 ohm resistor.

Low power 3mm Green LEDs (3ma) will work with a 330 ohm resistor.
marcus
:ugeek:

User avatar
Burngate
Posts: 5967
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Re: LED on gpio

Tue May 17, 2016 5:00 pm

MarkHaysHarris777 wrote:Low power 3mm Red LEDs (2ma) will work with a 470 ohm resistor.
Low power 3mm Green LEDs (3ma) will work with a 330 ohm resistor.
Actually either will work with either resistor, and indeed will work even with a 10k resistor. You'll just need better dark-adapted eyes to see them

Just sayin' ;)

User avatar
MarkHaysHarris777
Posts: 1820
Joined: Mon Mar 23, 2015 7:39 am
Location: Rochester, MN
Contact: Website

Re: LED on gpio

Wed May 18, 2016 2:28 am

Burngate wrote:
MarkHaysHarris777 wrote:Low power 3mm Red LEDs (2ma) will work with a 470 ohm resistor.
Low power 3mm Green LEDs (3ma) will work with a 330 ohm resistor.
Actually either will work with either resistor, and indeed will work even with a 10k resistor. You'll just need better dark-adapted eyes to see them
yeah, not really. When I speak of 'working' I mean specifically in reference to the forward voltage and forward current calculation of the current limiting resistor to produce the designed luminescence. There is in fact, only one correct current limiting resistor based on the calculation. If you choose a resistor of lessor value the current will go up, the heat will go up, and eventually the LED will burn out. If you chooe a resistor of greater value the luminescence will go down until finally you can't see it any longer... but you won't harm it! The low power LEDs are designed to 'work' at 2-3ma, but will take 20ma without harm (supposedly, I've never tried it).
marcus
:ugeek:

masa-aud
Posts: 144
Joined: Fri Feb 26, 2016 9:20 am

Re: LED on gpio

Wed May 18, 2016 5:20 am

reply to sachinwable on LED on gpio

LEDs always need assistance of limiting current from it's run away.
If the current source that is gpio output is strong then the LED runs away to off and if the LED is stronger then the source gpio port will be un-recoverably deteriorated. So a series of register to limit current within the max is used as a simple method although with some loss.

masa

User avatar
Burngate
Posts: 5967
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Re: LED on gpio

Wed May 18, 2016 10:00 am

Simply saying "low power" and then quoting 470Ω or 330Ω as the correct value isn't good enough

We're going to have to specify which "low power LED" we're talking about. Then we can look at its designed maximum current, beyond which it may die, and specify a "luminescence" (or should that be luminosity?).

Just as a matter of interest, even giving figures for light output for different-coloured leds won't tell you how bright it looks to any given observer - how about a colour-blind person - a deuteranope?
And are we talking about centre of vision (where the cones mostly are) or peripheral vision (mostly rods)?
One guy recently posted that he can't see blue flashing leds except in his peripheral vision - he's possibly a triteranope - rods have a different spectral response from the cones.

vk4tec
Posts: 131
Joined: Thu Mar 07, 2013 9:05 am
Location: Brisbane QLD
Contact: Website

Re: LED on gpio

Wed May 18, 2016 12:41 pm

Get an adjustable resistor and have a play
---------------------------------
Andrew Rich
email: [email protected]
http://www.tech-software.net/ ( hobby website )
http://59.167.159.165/ ( Raspberry Pi ADS-B server ) RTL SDR

Return to “General discussion”