justaskliba
Posts: 4
Joined: Fri Jun 19, 2015 6:09 pm

Connecting a LED without resistor.(HELP)

Tue Jul 07, 2015 5:08 pm

I saw a way but I don't remember it could anyone help It included only wires and a LED and a raspberry pi with a breadboard of course. A picture would help.

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 13100
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Connecting a LED without resistor.(HELP)

Tue Jul 07, 2015 5:16 pm

Its possible, but not recommended!

Normally you should ALWAYS use a current limitation resistor.
Ive seen some people use the trick of using the 1,8K pullup resistor of the two I2C GPIO's as the current limiting resistor, but its a very nasty trick, not recommended at all.

The trick is that if you open the GPIO as an output to GND OR as an input you can directly connect a LED.
Problem is that if you accidentally program the GPIO as an output to 3V3, you will blowup the LED AND the PI!

justaskliba
Posts: 4
Joined: Fri Jun 19, 2015 6:09 pm

Re: Connecting a LED without resistor.(HELP)

Tue Jul 07, 2015 5:23 pm

Well thanks!

User avatar
PeterO
Posts: 5880
Joined: Sun Jul 22, 2012 4:14 pm

Re: Connecting a LED without resistor.(HELP)

Tue Jul 07, 2015 5:56 pm

These 5V LEDs aren't as bright on 3V3 but they do work.

http://www.rapidonline.com/Electronic-C ... -12V-60113

PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 13100
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Connecting a LED without resistor.(HELP)

Fri Jul 10, 2015 1:26 am

PeterO wrote:These 5V LEDs aren't as bright on 3V3 but they do work.

http://www.rapidonline.com/Electronic-C ... -12V-60113

PeterO
Yes because they have the resistor built right in! Normal LEDs have not, and thus these LEDs are only confusing the matter. :roll:

W. H. Heydt
Posts: 12654
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Connecting a LED without resistor.(HELP)

Fri Jul 10, 2015 4:44 am

The thing to remember is that (a) a LED is a diode, and is forward biased to make it light, and (b) a diode connected from a +v to ground is a short circuit (less the voltage drop across the junction). Would you even consider shorting a connection through a diode? No? Then don't do it through a LED, either.

User avatar
PeterO
Posts: 5880
Joined: Sun Jul 22, 2012 4:14 pm

Re: Connecting a LED without resistor.(HELP)

Fri Jul 10, 2015 8:58 am

mahjongg wrote:
PeterO wrote:These 5V LEDs aren't as bright on 3V3 but they do work.

http://www.rapidonline.com/Electronic-C ... -12V-60113

PeterO
Yes because they have the resistor built right in! Normal LEDs have not, and thus these LEDs are only confusing the matter. :roll:
Yes thanks for that, but I did actually read the link that I posted so I had already read that "The Kingbright 5mm LEDs are a superb, high quality range of components incorporating an inbuilt series resistor enabling the LED to be directly connected to 5V or 12V supply lines."

How are they confusing ? Since the OP asked " It included only wires and a LED and a raspberry pi " , and since this is exactly what these do , I would have thougth they were helpful, but I'll remember next time not to post helpful replies !

PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

mikerr
Posts: 2825
Joined: Thu Jan 12, 2012 12:46 pm
Location: UK
Contact: Website

Re: Connecting a LED without resistor.(HELP)

Fri Jul 10, 2015 9:51 am

If the reason you want to avoid resistors is because you have multiple LEDS, you can have a single resistor serving many LEDs like this:

Image
Android app - Raspi Card Imager - download and image SD cards - No PC required !

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 13100
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Connecting a LED without resistor.(HELP)

Fri Jul 10, 2015 10:03 am

PeterO wrote:
mahjongg wrote:
PeterO wrote:These 5V LEDs aren't as bright on 3V3 but they do work.

http://www.rapidonline.com/Electronic-C ... -12V-60113

PeterO
Yes because they have the resistor built right in! Normal LEDs have not, and thus these LEDs are only confusing the matter. :roll:
How are they confusing ? Since the OP asked " It included only wires and a LED and a raspberry pi " , and since this is exactly what these do , I would have thougth they were helpful, but I'll remember next time not to post helpful replies !

PeterO
Its unhelpful claiming there are LED's that don't need the resistor as it might confuse naive users into thinking that the average LED they have might also not need one, with disastrous consequences. LED's with built in resistors are rare and relatively expensive, and ones designed for 3V3 are non existent (yeah I know that 5V ones might "work").

LED's need a series resistor, lets teach users that!

Yes, if you are lazy you can buy a "5V LED", but I won't recommend it.

sprinkmeier
Posts: 410
Joined: Mon Feb 04, 2013 10:48 am
Contact: Website

Re: Connecting a LED without resistor.(HELP)

Fri Jul 10, 2015 11:02 am

mikerr wrote:If the reason you want to avoid resistors is because you have multiple LEDS, you can have a single resistor serving many LEDs like this:

Image
The more LEDs you turn on the more current through the resistor, the more voltage it drops, the less voltage for the LEDs, the dimmer the LEDs.
Also, if the LEDs are different colour then they'll have different turn-on voltages meaning the closer-to-the-red-end-of-the-rainbow ones may be the only ones that light up.

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

Re: Connecting a LED without resistor.(HELP)

Fri Jul 10, 2015 3:16 pm

sprinkmeier wrote:The more LEDs you turn on the more current through the resistor, the more voltage it drops, the less voltage for the LEDs, the dimmer the LEDs.
Close but no cigar.

Turning on more LEDs gives only slight increase in current through the resistor. The percentage increase tends to zero as the supply voltage is increased.

By the same token the voltage increase across the resistor is mimimal.

Yes the LEDs become dimmer but not because the voltage across them is less. It is because the almost contant current through the resistor is shared between them.

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

Re: Connecting a LED without resistor.(HELP)

Sun Jul 12, 2015 2:18 pm

drgeoff wrote:
sprinkmeier wrote:The more LEDs you turn on the more current through the resistor, the more voltage it drops, the less voltage for the LEDs, the dimmer the LEDs.
Close but no cigar.

Turning on more LEDs gives only slight increase in current through the resistor. The percentage increase tends to zero as the supply voltage is increased.

By the same token the voltage increase across the resistor is mimimal.

Yes the LEDs become dimmer but not because the voltage across them is less. It is because the almost contant current through the resistor is shared between them.
I might be missing something here, How is the supply voltage
Increased with more than one led switching on. They are all
comming off the same 3.3v+ Pi power supply GPIO out/puts.
BoyOh ( Selby, North Yorkshire.UK)
Some Times Right Some Times Wrong

User avatar
rpdom
Posts: 17174
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Connecting a LED without resistor.(HELP)

Sun Jul 12, 2015 2:48 pm

I'm not understanding those posts completely, but I can understand
Yes the LEDs become dimmer but not because the voltage across them is less. It is because the almost constant current through the resistor is shared between them.
The LEDs, being diodes, will have a fixed forward voltage (Vled). Therefore the resistor will have a fixed voltage across it of (Vsupply - Vled), no matter how many LEDs. If V is a constant and R is a constant, then I must be a constant too. That means that current (I) will be shared over however many LEDs there are. The more LEDs the less current through each one and the dimmer they will be.

User avatar
PeterO
Posts: 5880
Joined: Sun Jul 22, 2012 4:14 pm

Re: Connecting a LED without resistor.(HELP)

Sun Jul 12, 2015 3:16 pm

mahjongg wrote:Its unhelpful claiming there are LED's that don't need the resistor
Yeah, lets assume they are all too stupid to understand what they are reading and dumb everything down to the point of uselessness.... :evil:
PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

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

Re: Connecting a LED without resistor.(HELP)

Sun Jul 12, 2015 7:33 pm

There is one calculation I have not seen
mentioned, is the diversity factor, that not
all the led's will be on at the same time,
But we must assume that at some time they
will all be on at the same time,
BoyOh ( Selby, North Yorkshire.UK)
Some Times Right Some Times Wrong

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

Re: Connecting a LED without resistor.(HELP)

Sun Jul 12, 2015 7:45 pm

boyoh wrote:There is one calculation I have not seen
mentioned, is the diversity factor, that not
all the led's will be on at the same time,
But we must assume that at some time they
will all be on at the same time,
The first mention of more than one LED being on was by sprinkmeier - "The more LEDs you turn on...."

Where has anyone confined the discussion to the case of all the LEDs being on?

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

Re: Connecting a LED without resistor.(HELP)

Sun Jul 12, 2015 7:56 pm

rpdom wrote:The LEDs, being diodes, will have a fixed forward voltage (Vled). Therefore the resistor will have a fixed voltage across it of (Vsupply - Vled), no matter how many LEDs. If V is a constant and R is a constant, then I must be a constant too.
No, that is a good engineering approximation but is not strictly correct. A diode does not have a fixed forward voltage. Although it is approximately 0.6 volts for a conducting silicon PN junction, it does vary with the current. As more LEDs are turned on the current through each one decreases and the voltage across the LEDs decreases slightly. The total current increases slighly each time another LED is turned on. (But not by enough to get worried about!)

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

Re: Connecting a LED without resistor.(HELP)

Sun Jul 12, 2015 8:05 pm

boyoh wrote:
drgeoff wrote:
sprinkmeier wrote:The more LEDs you turn on the more current through the resistor, the more voltage it drops, the less voltage for the LEDs, the dimmer the LEDs.
Close but no cigar.

Turning on more LEDs gives only slight increase in current through the resistor. The percentage increase tends to zero as the supply voltage is increased.

By the same token the voltage increase across the resistor is mimimal.

Yes the LEDs become dimmer but not because the voltage across them is less. It is because the almost contant current through the resistor is shared between them.
I might be missing something here, How is the supply voltage
Increased with more than one led switching on. They are all
comming off the same 3.3v+ Pi power supply GPIO out/puts.
I didn't write that the supply voltage increased with more than one LED switching on. The circuit given by mikerr with a single resistor does not specify a supply voltage. I was saying that the effect becomes less significant when this arrangement is used with higher voltages.

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

Re: Connecting a LED without resistor.(HELP)

Mon Jul 13, 2015 4:44 pm

I admire a man who will admit when he is wrong
But not a man who will will wriggle out of a statement,
he made by using words.
BoyOh ( Selby, North Yorkshire.UK)
Some Times Right Some Times Wrong

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

Re: Connecting a LED without resistor.(HELP)

Mon Jul 13, 2015 5:08 pm

boyoh wrote:I admire a man who will admit when he is wrong
But not a man who will will wriggle out of a statement,
he made by using words.
I have not wriggled out of anything. The supply voltage increasing with more LEDs being switched on was a figment of your imagination.

As I explained above, the voltage across the LEDs and across the resistor does change very slightly depending on the number of LEDs that are on. That changes the current in the resistor. The change is less and less when the circuit is used with higher and higher voltages.

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

Re: Connecting a LED without resistor.(HELP)

Mon Jul 13, 2015 6:54 pm

drgeoff wrote:
boyoh wrote:I admire a man who will admit when he is wrong
But not a man who will will wriggle out of a statement,
he made by using words.
I have not wriggled out of anything. The supply voltage increasing with more LEDs being switched on was a figment of your imagination.

As I explained above, the voltage across the LEDs and across the resistor does change very slightly depending on the number of LEDs that are on. That changes the current in the resistor. The change is less and less when the circuit is used with higher and higher voltages.
( Turning on more LEDs) gives only slight increase in current through the resistor . The percentage increase tends to zero (as the( supply voltage is increased.) drgoff Did you write this post
BoyOh ( Selby, North Yorkshire.UK)
Some Times Right Some Times Wrong

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

Re: Connecting a LED without resistor.(HELP)

Mon Jul 13, 2015 9:15 pm

Either you genuinely do not understand or you are trolling. I'll give you the benefit of the doubt and explain again.

Let the supply voltage be S
Let the nominal current through the resistor be I
Let the voltage drop of a LED passing current I be L
Assume the slope of the volts versus current of a LED be linear and of value D. (That assumption of linearity is false but does not invalidate the discussion.)

With one LED operating at current I the voltage across the resistor is S-L.

The resistor value is therefore (S-L)/I

With two LEDs operating the voltage across the resistor is close to S-L+D/(2I). (Not exact because the current through the resistor is no longer I so the LED drop is not precisely L+D/(2I).)

With three LEDs operating the voltage across the resistor is close to S-L+2D/(3I).

With N LEDs operating the voltage across the resistor is close to S-L+(N-1)D/(NI).

The change of resistor voltage from one LED on to N LEDs on is (N-1)D/(NI).

Dividing by the resistor value gives the change in resistor current as (N-1)DI/((NI(S-L)).

This reduces to (N-1)D/((N(S-L))

from which, noticing that (S-L) is in the divisor, we conclude that:

1. When S is not much more than, such that (S-L) approaches zero, the change of current increases sharply.

2. If we operate the circuit with a high S the change is much less. In the limiting case of infinite S, the change is zero.

That is the meaning of "Turning on more LEDs gives only slight increase in current through the resistor. The percentage increase tends to zero as the supply voltage is increased."

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

Re: Connecting a LED without resistor.(HELP)

Mon Jul 13, 2015 10:31 pm

drgeoff wrote:Either you genuinely do not understand or you are trolling. I'll give you the benefit of the doubt and explain again.

Let the supply voltage be S
Let the nominal current through the resistor be I
Let the voltage drop of a LED passing current I be L
Assume the slope of the volts versus current of a LED be linear and of value D. (That assumption of linearity is false but does not invalidate the discussion.)

With one LED operating at current I the voltage across the resistor is S-L.

The resistor value is therefore (S-L)/I

With two LEDs operating the voltage across the resistor is close to S-L+D/(2I). (Not exact because the current through the resistor is no longer I so the LED drop is not precisely L+D/(2I).)

With three LEDs operating the voltage across the resistor is close to S-L+2D/(3I).

With N LEDs operating the voltage across the resistor is close to S-L+(N-1)D/(NI).

The change of resistor voltage from one LED on to N LEDs on is (N-1)D/(NI).

Dividing by the resistor value gives the change in resistor current as (N-1)DI/((NI(S-L)).

This reduces to (N-1)D/((N(S-L))

from which, noticing that (S-L) is in the divisor, we conclude that:

1. When S is not much more than, such that (S-L) approaches zero, the change of current increases sharply.

2. If we operate the circuit with a high S the change is much less. In the limiting case of infinite S, the change is zero.

That is the meaning of "Turning on more LEDs gives only slight increase in current through the resistor. The percentage increase tends to zero as the supply voltage is increased."
Thanks for the excise in OHMS LAW.
and giving me the benefit of the doubt.
The original post by " Justaskliba"
asking was it possible to connect a Led
to the RaspberryPi ,with out a resistor,
He was advised not to do this, witch was
correct, Knowing that he would be using
a GPIO 3.3v+ out/puts, and the possibility
Of using more LEDs using GPIO 3.3v+
and using one current limiting resistor
This would create a series parallel
Circuit coming from the same 3.3v+
Pi power supply, making the increase
of voltage not possible.
BoyOh ( Selby, North Yorkshire.UK)
Some Times Right Some Times Wrong

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

Re: Connecting a LED without resistor.(HELP)

Tue Jul 14, 2015 12:39 am

The circuit is a generic one and is not restricted to being used only with a RPi. The main point of my first post in this thread was to point out that sprinkmeier's explanation was completely incorrect. I quoted his "The more LEDs you turn on the more current through the resistor, the more voltage it drops, the less voltage for the LEDs, the dimmer the LEDs." As I explained, the increase in current with more LEDs turned on is minimal. That the increase becomes even less when the circuit is used with higher supply voltages was an additional secondary point. You then asked "How is the supply voltage increased with more than one led switching on." but you have never shown how or where I or anyone else claimed that it does. You have not because you cannot. I took the trouble to explain again, hoping it would aid you in realising your misinterpretation of what had been written. You also demonstrated a low level of comprehension when you posted about "diversity factor" in which you were under the mistaken impression that no-one apart from yourself had considered the possibility of only some LEDs being on simultaneously. I quote you: "There is one calculation I have not seen mentioned, is the diversity factor, that not all the led's will be on at the same time".

That you persist in unsubstantiated arguing and have provided no useful input whatsoever to the thread means that I can no longer give you the benefit of the doubt and I will heed three pieces of advice.

“Never wrestle with pigs. You both get dirty and the pig likes it.” George Bernard Shaw:

“Never argue with an idiot. They will only bring you down to their level and beat you with experience.” George Carlin

"Do not feed the trolls". Unknown

I suggest that the time is fast approaching for a moderator to lock this thread, possibly after you have had an opportunity to reply. I rest my case. In the unlikely event that anyone else is really interested I don't have any worries over the the judgement they will come to.

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

Re: Connecting a LED without resistor.(HELP)

Tue Jul 14, 2015 10:15 am

drgeoff wrote:The circuit is a generic one and is not restricted to being used only with a RPi. The main point of my first post in this thread was to point out that sprinkmeier's explanation was completely incorrect. I quoted his "The more LEDs you turn on the more current through the resistor, the more voltage it drops, the less voltage for the LEDs, the dimmer the LEDs." As I explained, the increase in current with more LEDs turned on is minimal. That the increase becomes even less when the circuit is used with higher supply voltages was an additional secondary point. You then asked "How is the supply voltage increased with more than one led switching on." but you have never shown how or where I or anyone else claimed that it does. You have not because you cannot. I took the trouble to explain again, hoping it would aid you in realising your misinterpretation of what had been written. You also demonstrated a low level of comprehension when you posted about "diversity factor" in which you were under the mistaken impression that no-one apart from yourself had considered the possibility of only some LEDs being on simultaneously. I quote you: "There is one calculation I have not seen mentioned, is the diversity factor, that not all the led's will be on at the same time".

That you persist in unsubstantiated arguing and have provided no useful input whatsoever to the thread means that I can no longer give you the benefit of the doubt and I will heed three pieces of advice.

“Never wrestle with pigs. You both get dirty and the pig likes it.” George Bernard Shaw:

“Never argue with an idiot. They will only bring you down to their level and beat you with experience.” George Carlin

"Do not feed the trolls". Unknown

I suggest that the time is fast approaching for a moderator to lock this thread, possibly after you have had an opportunity to reply. I rest my case. In the unlikely event that anyone else is really interested I don't have any worries over the the judgement they will come to.
Lets call a truce, and put the Sword's away
We are both correct , You are correct with
general application of LEDs and resistor circuits
I was correct with confining the connection of the
LEDs and single resistor to the RaspberryPi.
I'm to old at 84yrs, to keep arguing,
So lets shake Hand's ,and be friends.

Best regards BoyOh ( John )
BoyOh ( Selby, North Yorkshire.UK)
Some Times Right Some Times Wrong

Return to “Beginners”