Pages: 1 [2] 3   Go Down
Author Topic: A noob resistance question  (Read 1699 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 9
Programming and Math enthusiast venturing into the hardware relm.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

40ma is absolute maximum, but 20-30 ma is a better maximum limit standard to stick to. Keep in mind due to internal resistance of the output pins the output voltage will sag as current draw from the output pin is increased. Just shows that there is a difference from fundamental principal and electrical reality of real world components. That is why the datasheet for devices are so important to study and understand a chip limits and capabilities.
Ok.

Quote
Because there is no exact answer. If the board is being powered via USB then there is a 500ma thermofuse that sets a maximum limit for the board and anything you wire up to it. But if powered from an external DC voltage source then there might be somewhat more but it depends on the exact DC voltage input as there is a heat dissipation limit for the on-board 5vdc voltage regulator. So hard answers are desirable but often allusive in the real world.
Hmmm... Ok.  Where do I find the information for the on-board 5vdc regulator?

Quote
No, totally different components, and a switch doesn't share all the characteristic of a switch and visa versa.
:-\  Just when I thought I found a shortcut... smiley-wink  Ok. 
Logged

the land of sun+snow
Offline Offline
Faraday Member
**
Karma: 149
Posts: 2790
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
When performing Ohm's Law calculations, what specifies the values for V and I?
V, to me, should be the supply voltage (3.3V or 5V would be what I'm using in this case).

No, V is actually the voltage "drop" across the resistor. Eg, if 1K is tied between 5V and
3.3V, the current I = Vdrop / R = (5V - 3.3V) / 1K = 1.7 mA, and not 5 mA or 3.3 mA.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 9
Programming and Math enthusiast venturing into the hardware relm.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
When performing Ohm's Law calculations, what specifies the values for V and I?
V, to me, should be the supply voltage (3.3V or 5V would be what I'm using in this case).

No, V is actually the voltage "drop" across the resistor. Eg, if 1K is tied between 5V and
3.3V, the current I = Vdrop / R = (5V - 3.3V) / 1K = 1.7 mA, and not 5 mA or 3.3 mA.
In your example, you mean a 1K(ohm) resistor, right?  (just making sure--I'm really new, if you haven't figured it out yet.  smiley-red)

So, in this LED (for example), it says "forward voltage drop" is 1.8V-2.2V (DC).  Let's say I have a circuit that has 5V---LED---1K(ohm)---Gnd.  I want to find the current.  I = Vdrop / R = 2.2V / 1K = 2.2mA.

Right?  Or am I still confused... :/
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 505
Posts: 31332
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

No with a forward voltage drop on the LED of 2.2V the drop across the resistor is 5 - 2.2 = 2.7 V
You can not use ohms law for an LED it does not work because it is a non linear device. Only the resistor.
Logged

Johannesburg UTC+2
Offline Offline
Faraday Member
**
Karma: 60
Posts: 3242
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
32Mhz (forgive the capitalized M if it is incorrect please)

The M's right, but the h's not.... Hertz's symbol is Hz, so you should write MHz
Logged

Have you looked for answers in the Learning, Reference, Products and Playground tabs on http://arduino.cc/en/ ?
Look here http://electronicsclub.info/ for basic electronics

Johannesburg UTC+2
Offline Offline
Faraday Member
**
Karma: 60
Posts: 3242
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

My tuppence worth....

I think what might not be becoming clear to messrs anorton and macweenie yet, is the notion that all of the voltage across the LED and its resistor has to be accounted for: the 5v in the 5V---LED---1K(ohm)---Gnd scenario has to disappear by the time we get to the right hand end.

So here's how it all hangs together....

1) What's the input voltage? We're saying 5v, so we have that.
2) What's the voltage we must account for over the LED? Manufacturer will tell us, let's go with the 2.2V mentioned earlier
3) So what voltage must we disappear over the resistor? We started with 5, accounted for 2.2, so we have 2.8 left to drop over the resistor
4) How are we doing with Ohm's Law for the resistor so far? Well we don't know R, that's what we need to calculate; we do know the voltage (2.8v); we don't know the current....
5) But we do know that in a series circuit like this, the current through the LED has to go through the resistor: there's no other path. And we do know (or manufacturer will tell us) that it's 20mA, or 0.020A... this is the value to which we need to limit the current, the object of the exercise.
6) So now we can apply Herr Ohm to the resistor with R=V/I giving R=2.8/0.02 = 140 Ohm

EDIT:

This is all a consequence of Kirchoff's Voltage Law which Wikipedia describes thusly:

Quote
The algebraic sum of the products of the resistances of the conductors and the currents in them in a closed loop is equal to the total emf available in that loop.

The products of the resistances of the conductors and the currents is simply the voltages (Ohm's Law).

Do we have a loop though? The 5V---LED---1K(ohm)---Gnd doesn't look like a loop... but it is if you think of the 5v and Gnd being eg the two terminals on a battery... then it would look like a loop: 5V---LED---1K(ohm)---Gnd---Battery---5v

So now we can see Kirchoff's Voltage Law at work in our simple circuit...

1) Total EMF available in loop: 5V
2) Sum of the voltages in the loop: Vled + Vresistor = 2.2 + Vresistor
3) So 5 = 2.2 + Vresistor or Vresistor = 5 - 2.2

Does that help?
« Last Edit: January 03, 2013, 01:19:28 am by JimboZA » Logged

Have you looked for answers in the Learning, Reference, Products and Playground tabs on http://arduino.cc/en/ ?
Look here http://electronicsclub.info/ for basic electronics

the land of sun+snow
Offline Offline
Faraday Member
**
Karma: 149
Posts: 2790
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
No, V is actually the voltage "drop" across the resistor. Eg, if 1K is tied between 5V and
3.3V, the current I = Vdrop / R = (5V - 3.3V) / 1K = 1.7 mA, and not 5 mA or 3.3 mA.
In your example, you mean a 1K(ohm) resistor, right?  (just making sure--I'm really new, if you haven't figured it out yet.  )

So, in this LED (for example), it says "forward voltage drop" is 1.8V-2.2V (DC).  Let's say I have a circuit that has 5V---LED---1K(ohm)---Gnd.  I want to find the current.  I = Vdrop / R = 2.2V / 1K = 2.2mA.

Right?  Or am I still confused... :/

Yeah, the other guys are correct, and as I said you use "the voltage "drop" across the resistor"
to get the current through it. Ohm's Law is for resistors.

Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 9
Programming and Math enthusiast venturing into the hardware relm.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

JimboZA's post really cleared it up for me--I needed that background information that is probably really basic to a lot of people here... smiley

Thanks, everyone, for all your help!

//Andrew
Logged

US
Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks JimboZA,

Although I got a great deal of information before your post, you gave me the piece of the puzzle I was lacking. I hadn't understood just WHERE the current I needed to power, in this case, an LED was coming from. Having looked briefly at the datasheets for different chips and sensors I wasn't making the now obvious connection that the items current requirements was in there. I was under the assumption that 15mA (right?) was the rule of thumb for ALL LEDs, but now it's so obvious I could face-palm.

So using the following datasheet:



I would subtract 4V (maximum forward voltage) from the 5V the Arduino is putting out to get a drop voltage of 1V which using V = r * I would be 1V = r * 20mA or 1 / .2 = a 5 Ω resistor? I combed the datasheet for any other values that looked right but theses were the only ones that seemed to fit the bill.
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 331
Posts: 16459
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
or 1 / .2 = a 5 Ω resistor?

No .2 is 200 ma, you need to use .02 in your calculation.

Lefty
Logged

US
Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The moment I hit post I knew I screwed up, but the dog asked to go out and you caught it before I could fix it smiley-red.

so it should be a 50Ω resistor... Do you know HOW I know I want to learn this? Because I keep on trying even though I have been wrong 100% of the time!
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 331
Posts: 16459
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The moment I hit post I knew I screwed up, but the dog asked to go out and you caught it before I could fix it smiley-red.

Oh, the old "the dog eat my correct posting" excuse, go to the corner.  smiley-wink

so it should be a 50Ω resistor... Do you know HOW I know I want to learn this? Because I keep on trying even though I have been wrong 100% of the time!
Logged

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 118
Posts: 4537
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

No with a forward voltage drop on the LED of 2.2V the drop across the resistor is 5 - 2.2 = 2.7 V

Are you sure?
Logged

No, I don't answer questions sent in private messages...

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 118
Posts: 4537
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks JimboZA,

Although I got a great deal of information before your post, you gave me the piece of the puzzle I was lacking. I hadn't understood just WHERE the current I needed to power, in this case, an LED was coming from.

Glad you understand it.

Now you're getting good a reading datasheets, the second thing you need to look at is the graph of voltage vs. current and the min/max range of voltages that the LED needs. As you'll see the graph shows that ass you approach maximum current, even minor variations in voltage (eg. 0.1V) can produce <b>huge</b> difference differences in current. The LEDs voltage tolerances are often more than 0.1V either way, so what voltage do you aim at...?

This is why controlling LEDs with resistors is a bad idea, and why they make special chips for driving LEDs - you need to control the current, not the voltage.
Logged

No, I don't answer questions sent in private messages...

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 505
Posts: 31332
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
This is why controlling LEDs with resistors is a bad idea,
It is not a bad idea it is done all the time in a lot of professional applications and is quite satisfactory technique. It is not the technique to get the absolute exact control over the current but often this is not necessary.
Logged

Pages: 1 [2] 3   Go Up
Jump to: