Effects of Long Wires: Difference between revisions

From Phidgets Support
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[Category:General Documentation]]
[[Category:Troubleshooting]]
==Introduction==
==Introduction==
The purpose of this guide is help keep highly accurate measurements when using long wires to connect sensors. Depending on the length and [[Electricity Primer#Cable_Gauges_for_Terminal_Blocks|gauge]] of the wire, the internal properties of the wire – its electrical resistance and inductance – can reduce the accuracy of the measurement. It is important to calibrate the formulae used to compensate for the errors due to these effects.  The errors are negligible when using shorter wires, but they can affect the accuracy if you are sending the measured signal over a large distance.  Depending on how accurate you need to be, it may be acceptable to not have to calibrate any formulae.
The purpose of this guide is help keep highly accurate measurements when using long wires to connect sensors. Depending on the length and gauge of the wire, the internal properties of the wire – its electrical resistance and inductance – can reduce the accuracy of the measurement. It is important to calibrate the formulae used to compensate for the errors due to these effects.  The errors are negligible when using shorter wires, but they can affect the accuracy if you are sending the measured signal over a large distance.  Depending on how accurate you need to be, it may be acceptable to not have to calibrate any formulae.


==Materials Used for Calibration==
==Materials Used for Calibration==
Line 19: Line 19:
==Procedure==
==Procedure==
#Plug the sensor into the 8/8/8 through the short cable.  
#Plug the sensor into the 8/8/8 through the short cable.  
#Note the sensor voltage.  We will call this VoltageShort  
#Note the sensor voltage.  We will call this '''VoltageShort'''
#Plug the sensor into the 8/8/8 through the long cable.  
#Plug the sensor into the 8/8/8 through the long cable.  
#Note the sensor voltage.  We will call this VoltageLong.  
#Note the sensor voltage.  We will call this '''VoltageLong'''.  
'''Note:'''  It is very important that the conditions under which both measurements were taken do not change! For example, if using the Temperature Sensor, the actual temperature that was being measured did not change between measurements.
'''Note:'''  It is very important that the conditions under which both measurements were taken do not change! For example, if using the Temperature Sensor, the actual temperature that was being measured did not change between measurements.


Line 27: Line 27:
This calibration only works if the sensor does not change its current (amperage) consumption over time for the measured property (for example, the 1121 does).  
This calibration only works if the sensor does not change its current (amperage) consumption over time for the measured property (for example, the 1121 does).  


'''Note:''' The calibration for ratiometric sensors will be much more accurate the farther SensorValueShort is from 500.  The closer SensorValueShort is to 500, the less accurate  
'''Note:''' The calibration for ratiometric sensors will be much more accurate the farther VoltageShort is from 2.5V.  The closer VoltageShort is to 2.5V, the less accurate the calibration will be.  
the calibration will be.  


The formula to calculate the gain factor, C, is:  
The formula to calculate the gain factor, C, is:  


<math>C = \frac{\text{SensorValueShort} - 500}{\text{SensorValueLong}-500}\!</math>
<math>C = \frac{\text{VoltageShort} - 2.5}{\text{VoltageLong}- 2.5}\!</math>


If C = 1, then there will not be any noticeable effect from the longer cable and the normal formula for the sensor can be used. If C < 1, repeat the calibration.  This would indicate that by using a longer cable, a more accurate measurement was obtained compared to using the shorter cable. Otherwise if C > 1, replace the SensorValue in the formula for the sensor with:  
If C = 1, then there will not be any noticeable effect from the longer cable and the normal formula for the sensor can be used. If C < 1, repeat the calibration.  This would indicate that by using a longer cable, a more accurate measurement was obtained compared to using the shorter cable. Otherwise if C > 1, replace the voltage in the formula for the sensor with:  


<math>\text{NewSensorValue} = (\text{SensorValue} - 500) * C + 500\!</math>
<math>\text{NewVoltage} = (\text{Voltage} - 2.5) * C + 2.5\!</math>


==Calibration for Non-Ratiometric Sensors==
==Calibration for Non-Ratiometric Sensors==
The difference in doing the same calibration with non-ratiometric sensors comes from the fact that the voltage drop on VCC makes no difference (within reason).  Instead, the current (amperage) consumption only introduces an offset on SensorValue.  
The difference in doing the same calibration with non-ratiometric sensors comes from the fact that the voltage drop on VCC makes no difference (within reason).  Instead, the current (amperage) consumption only introduces an offset on the sensor voltage.  


To calculate the offset, D:
To calculate the offset, D:


<math>D = \text{SensorValueLong} - \text{SensorValueShort}\!</math>
<math>D = \text{VoltageLong} - \text{VoltageShort}\!</math>


If D = 0, there will be no effect from the longer cable. If D < 0, repeat the calibration.  This would mean that by using the longer cable, a more accurate measurement was obtained compared to using the shorter cable. Otherwise if D > 0, in operation, replace SensorValue in the formula for this sensor with:  
If D = 0, there will be no effect from the longer cable. If D < 0, repeat the calibration.  This would mean that by using the longer cable, a more accurate measurement was obtained compared to using the shorter cable. Otherwise if D > 0, in operation, replace voltage in the formula for this sensor with:  


<math>\text{NewSensorValue} = \text{SensorValue} + D\!</math>
<math>\text{NewVoltage} = \text{Voltage} + D\!</math>


==In Conclusion==
==In Conclusion==
This should be repeated with each sensor or wiring harness in order to be as accurate as possible. Any change in resistance or current consumption may affect the accuracy of each individual sensor differently.
This should be repeated with each sensor or wiring harness in order to be as accurate as possible. Any change in resistance or current consumption may affect the accuracy of each individual sensor differently.

Latest revision as of 18:48, 22 October 2019

Introduction

The purpose of this guide is help keep highly accurate measurements when using long wires to connect sensors. Depending on the length and gauge of the wire, the internal properties of the wire – its electrical resistance and inductance – can reduce the accuracy of the measurement. It is important to calibrate the formulae used to compensate for the errors due to these effects. The errors are negligible when using shorter wires, but they can affect the accuracy if you are sending the measured signal over a large distance. Depending on how accurate you need to be, it may be acceptable to not have to calibrate any formulae.

Materials Used for Calibration

  • A short Phidget cable, such as our 60cm Phidget cable
  • A long Phidget cable that you wish to use
  • The sensor you will be using with the long cable
  • The Phidget Interface Kit 8/8/8

Assumptions

  • The resistance of the short cable should be very small compared to the long cable.
  • Both cables are made of the same material.
    • Different materials have different conductivity properties and it is possible that a longer cable made of one material has the same internal resistance and inductance as a shorter cable of another material.
  • Both cables are at the same temperature.
    • Most conductors (not all) tend to increase their internal resistance as their temperature increases. The greater the temperature difference between the cables is, the higher the error in calibration will be.
  • The long Phidget cable uses the same gauge of wire for both VCC and GND.

Procedure

  1. Plug the sensor into the 8/8/8 through the short cable.
  2. Note the sensor voltage. We will call this VoltageShort
  3. Plug the sensor into the 8/8/8 through the long cable.
  4. Note the sensor voltage. We will call this VoltageLong.

Note: It is very important that the conditions under which both measurements were taken do not change! For example, if using the Temperature Sensor, the actual temperature that was being measured did not change between measurements.

Calibration for Ratiometric Sensors

This calibration only works if the sensor does not change its current (amperage) consumption over time for the measured property (for example, the 1121 does).

Note: The calibration for ratiometric sensors will be much more accurate the farther VoltageShort is from 2.5V. The closer VoltageShort is to 2.5V, the less accurate the calibration will be.

The formula to calculate the gain factor, C, is:

If C = 1, then there will not be any noticeable effect from the longer cable and the normal formula for the sensor can be used. If C < 1, repeat the calibration. This would indicate that by using a longer cable, a more accurate measurement was obtained compared to using the shorter cable. Otherwise if C > 1, replace the voltage in the formula for the sensor with:

Calibration for Non-Ratiometric Sensors

The difference in doing the same calibration with non-ratiometric sensors comes from the fact that the voltage drop on VCC makes no difference (within reason). Instead, the current (amperage) consumption only introduces an offset on the sensor voltage.

To calculate the offset, D:

If D = 0, there will be no effect from the longer cable. If D < 0, repeat the calibration. This would mean that by using the longer cable, a more accurate measurement was obtained compared to using the shorter cable. Otherwise if D > 0, in operation, replace voltage in the formula for this sensor with:

In Conclusion

This should be repeated with each sensor or wiring harness in order to be as accurate as possible. Any change in resistance or current consumption may affect the accuracy of each individual sensor differently.