[solved] Compensate for voltage drop with ADC

Hello everyone.

I am finishing up my project and overlooked something concerning. I have two MCP3208 connected to a few sensors (Thermistors 10k, Photoresistors 1k, some probes 1-10M, DHT11).

In the development stage the microcontroller and the 4 boxes where in close proximity to each other (~0.25m). Now the boxes are located in a rather big room with the microcontroller connected to some lab equipment, therefore the boxes are now located at different positions in the room

  • Thermistor, Photo, 10M Probe, 1M Probe @ 0.5m
  • Thermistor, Photo, 1M Probe, 2.2M Probe @ 0.725m
  • DHT11, 1M Probe, 10M Probe @ 5.2m
  • DHT11, 1M Probe, 10M Probe @ 8.5m

The cables are measured from connector to connector.

Checking the measurments (and voltages) I noticed a small voltage drop. Measuring inside the boxes results in a 2.7mV higher value than at the connected pin from the MCP3208. This makes sense for 8m cable (2.5mm2) with the 20mA current. It is roughly the voltage drop for cables with this length and currents.

My question is: Since the current is constant for the measurement pins and the 5V supply for the boxes is stable do I have to measure every voltage drop and compensate (either in the measurement or the analysis) each box individually. Or is there a better solution (maybe a 4point measurement over the ADC pins).

Thanks for the help

The ADC draws essentially no current (input leakage < 1 nA), so there should be no voltage drop along a signal wire. You need to have the signal box voltage to be sensed as well.

Please post a wiring diagram of one of your boxes and the connection to the Arduino, as your description is pretty meaningless.

Consider putting the ADCs in the boxes and send a digital result.

Note that I2C doesn't work over long cables, so you would need to convert the digital result to TTL serial or similar.

The solution is to use 12C sensors that convert to digital at the sensor location.

Thats not possible for, because the probes do not support it (unless we build it ourselfs).

Also the I2C is already reserved for communications. When I use the same i2c sensors multiple times these sensors need an extra pin for enabling (same address).

The sensorelements we use may change in the future (more accuracy, stability). Do you have a standard circuit (or a link), or a chip which can send analog/ digital data via I2C?

I found some circuits from Adafruit, but I cant zoom onto the chip they use.

You will have to do some research. Here's an I2C thermistor with 4 different addresses...

TMP112

"The TMP112 family features an address pin to allow up to four devices to be addressed on a single bus."

You would know best what you are looking for for your particular project.

@jremington: excellent point. I will measure the datalines. There should be almost no current and therefore no drop.

@wolframore: Maybe I can switch some of the sensors (if necessary) in v2.

Sadly I have to wait till tomorrow (Europe).

If you can't put the ADC in the box, use a sense wire to measure the box supply voltage back at the ADC location.

I2C does not work over long cables. It is designed for chip to chip communications on a PCB.

i2C will work for 10 meters just reduce the baud rate to counter the capacitance of the wires.

Does the sensor signal change or is it steady? Could be impedance you're experiencing on the ADC wires.... either way a digital transmission would fix that. Can you change to a wireless transmission of the data?

The long range would not be a problem (I2C extender P82B96 tested with <30m).

jremington:
If you can't put the ADC in the box, use a sense wire to measure the box supply voltage back at the ADC location.

another good tip.

wolframore:
Can you change to a wireless transmission of the data?

I never tried adding a wireless module for an Arduino, and for some reason I do not trust wireless communication (maybe my age). Also the Arduino (all controller) are behind a heavy shielded casing, 0.5m below concrete (there is guaranteed iron grating in it as well -> foundation).

how do you get wires through the heave shielded case and 0.5m concrete with iron grating???

When the main experiment is turned off, the shielding can be removed from the top side and then we have access to all the pumps and high voltage parts. It is bolted to the foundation to reduce vibration. For your interest: It is a highly sensitive TEM.

The current on the datalines was not measurable with common methods. But even with 5V there must be at least 10mA on the line to produce a voltage drop in the error range the temperature sensors are measuring (2%).

Measuring back the supply voltage and set these offsets (wherever they come from) as relative to each other almost every parasitic resistance should be cut out.

The measurements are now in the expected error margins.

For future installments I may look at the IC Attiny85 since it is programmable. Depends on the application of course.

Thanks for the help everyone