Go Down

### Topic: Compensating for lead resistance. (Read 2601 times)previous topic - next topic

#### syphex

##### May 23, 2013, 03:11 am
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?

#1
##### May 23, 2013, 03:59 am
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.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

#### GoForSmoke

#2
##### May 23, 2013, 05:20 am

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?  ]
2) http://gammon.com.au/serial <-- techniques howto
3) http://gammon.com.au/interrupts
Your sketch can sense ongoing process events in time.
Your sketch can make events to control it over time.

#3
##### May 23, 2013, 05:34 am
No, you can only get 5V - but at real low current flow.
5/10,000,000 = .5uA.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

#### syphex

#4
##### May 23, 2013, 07:53 am
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)?

#### GoForSmoke

#5
##### May 23, 2013, 12:48 pm
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.

2) http://gammon.com.au/serial <-- techniques howto
3) http://gammon.com.au/interrupts
Your sketch can sense ongoing process events in time.
Your sketch can make events to control it over time.

#### SurferTim

#6
##### May 23, 2013, 12:54 pm

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?

#### GoForSmoke

#7
##### May 23, 2013, 01:07 pm
That doesn't apply in a general way and I can't get magnitudes of voltage increase by adding magnitudes of resistance.

2) http://gammon.com.au/serial <-- techniques howto
3) http://gammon.com.au/interrupts
Your sketch can sense ongoing process events in time.
Your sketch can make events to control it over time.

#### AmbiLobe

#8
##### May 23, 2013, 01:28 pm
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.

#### JChristensen

#9
##### May 23, 2013, 01:48 pm

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.

#### billhowl

#10
##### May 23, 2013, 01:56 pm

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

#### syphex

#11
##### May 24, 2013, 01:53 am
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?

#### DVDdoug

#12
##### May 24, 2013, 02:31 am

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?  ]
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.).

#### THAMER

#13
##### May 24, 2013, 02:59 am
je veux commander mon CNC avec une arduino uno . j'ai besoin d'un code source (arduino) pour 3 unipolair stepper motor.

#### GoForSmoke

#14
##### May 24, 2013, 03:07 am

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?  ]
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!

2) http://gammon.com.au/serial <-- techniques howto
3) http://gammon.com.au/interrupts
Your sketch can sense ongoing process events in time.
Your sketch can make events to control it over time.

Go Up