Notice: This page contains information for the legacy Phidget21 Library. Phidget21 does not support VINT Phidgets, and will not support any new Phidgets. Phidget21 will be maintained until 2020. We recommend that new projects be developed against the Phidget22 Library.
Effects of Long Wires
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 sensor cable, such as our 60cm sensor cable
- A long sensor cable that you wish to use
- The sensor you will be using with the long cable
- The Phidget Interface Kit 8/8/8
- 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 sensor cable uses the same gauge of wire for both VCC and GND.
- Plug the sensor into the 8/8/8 through the short cable.
- Note the SensorValue. We will call this SensorValueShort
- Plug the sensor into the 8/8/8 through the long cable.
- Note the SensorValue. We will call this SensorValueLong.
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 SensorValueShort is from 500. The closer SensorValueShort is to 500, 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 SensorValue 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 SensorValue.
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 SensorValue in the formula for this sensor with:
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.