Pages: [1] 2   Go Down
Author Topic: Compensating for lead resistance.  (Read 1060 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Full Member
***
Karma: 0
Posts: 159
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

E.g. I have a DHT11 sensor which I would like to extend. At the moment I have only a short 10cm long data cable and it works fine, but what if I wanted it longer. Or if I wanted to power a 5v relay over a distance of say 5m

My question is: If I know the resistance of the long wire, how can I compensate for the resistance to supply the original/intended voltage/current.

V=IR so an increase in resistance means increase in voltage, but the arduino pins only supply 5v? Still trying to wrap my head around it.

I thought of a voltage divider but apparantly its not that simple. The ratio of current through each path of the divider is equal to the ratio of resistances correct?
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 525
Posts: 26570
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You can use heavier guage wire so there is less resistance drop.
Relay coils can often be driven from 5V, typically needing just 4.5V.

Another option is to use a higher voltage at the source and then regulate it at the remote end.
Yes, V=IR. As V drops, so does I. Voltage divider suffers the opposite - as I changes across the load R, so will the voltage. Thats why voltage divider is not used as a current source.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Pittsburgh, PA, USA
Offline Offline
Faraday Member
**
Karma: 96
Posts: 4781
I learn a bit every time I visit the forum.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

V=IR so an increase in resistance means increase in voltage,

So I can get real high voltage if I put a 10 megohm resistor in my normally 5V line?  smiley-razz smiley-roll smiley-eek smiley-evil
Logged

I find it harder to express logic in English than in Code.
Sometimes an example says more than many times as many words.

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 525
Posts: 26570
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

No, you can only get 5V - but at real low current flow.
5/10,000,000 = .5uA.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Full Member
***
Karma: 0
Posts: 159
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If I=V/R, then an increase in resistance will lower the current (maybe too low to the relay). What are the arduino uno's max current through the pins and how much current do I actually need for my 5v-240v relay?

Also, can nothing affect the voltage output of the pins (apart from code)?
Logged

Pittsburgh, PA, USA
Offline Offline
Faraday Member
**
Karma: 96
Posts: 4781
I learn a bit every time I visit the forum.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Honest, I was just making a joke about what I saw as a ridiculous statement.
I do know that resistance does not cause voltage to increase.

Logged

I find it harder to express logic in English than in Code.
Sometimes an example says more than many times as many words.

Miramar Beach, Florida
Offline Offline
Faraday Member
**
Karma: 140
Posts: 5874
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Honest, I was just making a joke about what I saw as a ridiculous statement.
I do know that resistance does not cause voltage to increase.
I don't see it as ridiculous. It doesn't take long to figure out that an unregulated power supply's output voltage increases as the current decreases. Oh, and the output voltage decreases with a current increase. Isn't that weird?
 
Logged

Pittsburgh, PA, USA
Offline Offline
Faraday Member
**
Karma: 96
Posts: 4781
I learn a bit every time I visit the forum.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

That doesn't apply in a general way and I can't get magnitudes of voltage increase by adding magnitudes of resistance.

Logged

I find it harder to express logic in English than in Code.
Sometimes an example says more than many times as many words.

New England
Offline Offline
Sr. Member
****
Karma: 7
Posts: 295
Natural Semiinductor
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The wire resistance can be calculated from this information

http://wiki.xtronics.com/index.php/Wire-Gauge_Ampacity

22 gauge wire can carry 5 amps and it has 16 ohms per 1000 feet

Calculate wire length for 1.2 ohms

1000 * 1.2/16 =  75 feet of wire

If your relay needs 100mA to switch then the voltage lost in 75 feet is

v = ir = 0.1Amp * 1.2 ohms - 0.12 volts lost from 5 volts

5.0 - 0.12 = 4.88 volts delivered to the relay 75 feet away.


Logged

I am going to get going.

Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 93
Posts: 3980
CODE is a mass noun and should not be used in the plural or with an indefinite article.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

E.g. I have a DHT11 sensor which I would like to extend. At the moment I have only a short 10cm long data cable and it works fine, but what if I wanted it longer. Or if I wanted to power a 5v relay over a distance of say 5m

5m is a fairly modest distance and I'm not sure how much I'd worry about it. Given Ambilobe's example, I'm sure the relay would operate reliably with 75 feet of wire. If I wanted to be extra safe I might go to 18 gauge. But remember that with 75 feet of wire for example, the relay would only be 37.5 feet away.

For a sensor, I'd be even less worried about voltage drop as the current would be probably an order of magnitude less. For long runs, I'd worry about EMI first.
Logged

MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

SG
Online Online
God Member
*****
Karma: 11
Posts: 500
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

V=IR so an increase in resistance means increase in voltage, but the arduino pins only supply 5v? Still trying to wrap my head around it.

driving DC relays using a transistor connected to an Arduino pin.
http://playground.arduino.cc/uploads/Main/relays.pdf, the transistor being used to increase the voltage to more then 5V
Logged

Offline Offline
Full Member
***
Karma: 0
Posts: 159
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok so by the sounds of it I don't have much to worry about, this is more for interest/educational sake now.

The wire resistance can be calculated from this information

http://wiki.xtronics.com/index.php/Wire-Gauge_Ampacity

22 gauge wire can carry 5 amps and it has 16 ohms per 1000 feet

Calculate wire length for 1.2 ohms

1000 * 1.2/16 =  75 feet of wire

If your relay needs 100mA to switch then the voltage lost in 75 feet is

v = ir = 0.1Amp * 1.2 ohms - 0.12 volts lost from 5 volts

5.0 - 0.12 = 4.88 volts delivered to the relay 75 feet away.

I know theres an equation to calculate resistance based on wire length and diameter. But I was wondering more how to overcome this extra resistance, thanks for the information though I'll no doubt use it.


V=IR so an increase in resistance means increase in voltage, but the arduino pins only supply 5v? Still trying to wrap my head around it.

driving DC relays using a transistor connected to an Arduino pin.
http://playground.arduino.cc/uploads/Main/relays.pdf, the transistor being used to increase the voltage to more then 5V

Thanks this is what I was looking for I think.. But this is using the transistor as a switch right? So where is the relay +V coming from? Wikipedia says this to use a transistor as an amplifier http://upload.wikimedia.org/wikipedia/commons/thumb/8/8c/NPN_common_emitter_AC.svg/200px-NPN_common_emitter_AC.svg.png

What is the downside to using thicker wire though, what happens if you use too large a guage? I cant be bothered remembering physics right now but wouldent it affect the charge carrier density, or just draw more current?
Logged

Offline Offline
Edison Member
*
Karma: 33
Posts: 1290
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

V=IR so an increase in resistance means increase in voltage,

So I can get real high voltage if I put a 10 megohm resistor in my normally 5V line?  smiley-razz smiley-roll smiley-eek smiley-evil
Of course not with a "5V line", but if you have a constant current source, yes!   Ohm's Law is actually God's Law (or a law of nature, if you like), discovered/described by Ohm, and it's always true!

If you want to understand or predict what's going to happen under certain conditions, you need to understand the nature of your power source and the nature of your load resistance/impedance.  Most power supplies are designed to be "constant voltage" (approximately, within the limits of their design).  If you connect a very low resistance to a power supply, you don't get unlimited current.    Since Ohm's Law always holds, if you exceed the current available the voltage must drop (and maybe the a fuse blows or the power supply burns-up, etc.).
Logged

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

je veux commander mon CNC avec une arduino uno . j'ai besoin d'un code source (arduino) pour 3 unipolair stepper motor.
Logged

Pittsburgh, PA, USA
Offline Offline
Faraday Member
**
Karma: 96
Posts: 4781
I learn a bit every time I visit the forum.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

V=IR so an increase in resistance means increase in voltage,

So I can get real high voltage if I put a 10 megohm resistor in my normally 5V line?  smiley-razz smiley-roll smiley-eek smiley-evil
Of course not with a "5V line", but if you have a constant current source, yes!   Ohm's Law is actually God's Law (or a law of nature, if you like), discovered/described by Ohm, and it's always true!

If you want to understand or predict what's going to happen under certain conditions, you need to understand the nature of your power source and the nature of your load resistance/impedance.  Most power supplies are designed to be "constant voltage" (approximately, within the limits of their design).  If you connect a very low resistance to a power supply, you don't get unlimited current.    Since Ohm's Law always holds, if you exceed the current available the voltage must drop (and maybe the a fuse blows or the power supply burns-up, etc.).

Which is why I don't believe that Ohm's Law which I learned about 1971 is some magic key to controlling voltage.

Sure IF I have a power supply that will give me extra potential then I can get higher voltage up to the limit of the supply but that's not stated by Ohm' Law.

Geez, try to make light of something as a gentle nudge..... let's hear about the difficulty of controlling big turbines like at Niagara Falls while we're at it!

One more time: I was making a joke!

Logged

I find it harder to express logic in English than in Code.
Sometimes an example says more than many times as many words.

Pages: [1] 2   Go Up
Jump to: