I am going to need a large length of wire from my microcontroller analogue input to a LDR or similar sensor. The length of wire is likely to be about 100m so will it have any affects on the reading the ADC? Is there anyway I can reduce the effects?
Answer
Yes, normally you would not put a sensor 100 meters from the ADC.
Why? Because that length of wire will experience voltage drop due to the resistance of the copper wire, doing a quick estimate to demonstrate, using 24 AWG (wire gauge chart) the resistance would be in about 8 ohms.
Using Ohm's Law and say 10mA of current (my guess, small signal level) that would equal about 0.1 volts drop.
V = I * R
voltage drop = 10mA times 8 ohms
V = 0.010 * 8 = 0.08
or approximately 0.1 V.
If it's a 5V signal that's 2%, enough to lose accuracy.
Normally for a signal to be transmitted reliably over a longer distance, and resist interference as well as handle the wire resistance, you can do a few things.
The first is to increase the voltage, say use a 24 Volt signal rather than 5V (or 3.3V) or whatever the limit of your ADC input is. This can be useful, and is what RS-232 (EIA-232) serial protocol does to improve communication reliability over a distance.
The second is to use a current loop, where the information is encoded as current differences, such that LDR value is encoded near the sensor, and the current loop spans the 100 meter distance. This would require a current loop transceiver at either end of the distance, and at least one end of the loop should have a robust power supply to provide the necessary power for the loop.
A third way would be to use a differential signal, where two wires (balanced transmission lines) span between the LDR sensor and the ADC. The difference between the two values is the actual signal. This has very good common mode interference rejection (filtering). Examples include RS-422, and most Ethernet modes. There are line-drivers ICs for RS-422, similar to the popular MAX232 transceiver / driver for RS-232 serial communications.
No comments:
Post a Comment