857 Views - Created 30/11/2020
We have an ADC Differential PI which we are using to calculate resistance values. When we put known resisistors in the circuit, our calculations are reliably within tolerance with the resistor and with our multimeter. However, when there is no resistor in the circuit we are getting voltage measure of around 24 mV. What can we do to get rid of this ghost reading?
What type of circuit are you using to measure the resistance?
If the wire attached to the ADC input is floating when you do not have a resistor connected you will often get a small voltage reading as the wire will act as an antenna and pick up any nearby electrical noise.
We have connected the PI to an H bridge and are attempting to use this to measure soil resistance. We have two sets of probes, one set are fixed (remote) and the other set moves (mobile), to take measurements. We included a shunt resistor, whose resistance we separately determined, to enable us to calculate the current from the voltage, initially. We get ghost voltages from the mobile probes when the circuit is open, which we assume is down to the mobile probes acting as antennae, Previously the circuit allowed us to accurately calculate the resistances of some resistors that were placed in where the probes would go for testing purposes (327 ohms for a 330 ohm resistor and 151 for a 150 ohm resistor). Now the circuit is giving readings that are often exact multiples of the shunt resistor, although there is no consistency in these values (e.g. the same circuit when measuring once per second can give 2, 3 or even 20 times the shunt value).
Is the Raspberry Pi powered by a battery or a switching power supply and are the probes pushed into the earth or soil in a plant pot which is isolated from the earth? If you are using a switching power supply and the probes are pushed into the earth you may have a ground loop between the power supply input and output wires. A ground loop on switching supplies can generate voltages in excess of 70V AC between the earth and the power supply output wires which would cause problems with the ADC readings. It would also explain why the voltage on the ADC input changes as each sample would be at a different part of the AC cycle.
The easiest way to test for a ground loop is to measure the voltage both AC and DC between the probe, when it is pushed into the ground and the Raspberry Pi ground pin. If there is a voltage you will need to isolate the Raspberry Pi's power from the earth. The easiest way to do this is to use a linear power supply which contains an isolation transformer.
Note: documents in Portable Document Format (PDF) require Adobe Acrobat Reader 5.0 or higher to view, download Adobe Acrobat Reader or other PDF reading software for your computer or mobile device.