# DC Volt Meter using ADS1115 - Impedance, AC signal filter and over voltage protection questions

#### stephanjohnson

Joined Apr 17, 2012
6
Hello,

Background
I have a project that I have been working on for a few years off and on. It is basically a wireless DC volt meter that uses a GPS to obtain measurements at a very specific interval and record the data with a timestamp, location, etc. I have been successful with making the GPS work and obtaining somewhat accurate voltage measurements simply using an Arduino mega's ADC. My next step is to switch over to the ADS1115 in hopes to increase my precision as the 8bit ADC in the mega isn't quite enough.

My specific questions today have to do with designing the DC volt meter circuitry. I need to know what impact the presence of an AC signal has on the measurement of the DC signal.

The signal I am measuring is actually a corrosion potential (Cathodic Protection related) between a buried pipeline and the ground (electrolyte). Occasionally, AC interference occurs when a power corridor parallels the pipeline and the pipeline also ends up with a certain amount of AC on it as well.

Typical parameters of what the signal I'm trying to measure are:
+4.0 to -4.0 DCV (it is possible the signal may exceed these and would need to protect the inputs)
0 to 5 VAC@60Hz (it is possible the signal may exceed these and would need to protect the inputs)
The VDC signal will be shifting every few seconds, and the VAC signal will remain constant. I only need to obtain a VDC measurement within 200-500mS after the shift. A very typical reading would be signal "ON" @ 0mS. Wait 200mS and then obtain a measurement (usually -1200mVDC and then wait. Signal shifts to "OFF" @3000mS, wait 200mS and then obtain a measurement (usually -900mVDC). The cycle repeats.

List of Questions I would like answers to:

AC Filter Required?
Does the presence of an AC signal cause a measurement error when measuring the VDC with the ADS1115? If so, can I simply put a passive low pass filter in front of the ADC input to block anything beyond 25Hz? I understand the signal would attenuate slightly if I did this, but could it be managed by compensating in the software or perhaps keeping the required resistor so low that it doesn't much matter?

Over-voltage Protection Circuit
The signal I am measuring is usually low voltage, however it is entirely possible that the VDC or VAC may exceed the maximum 6.144 scale and I need to have the inputs protected against this particular danger. My first thought is to use the 6.144V scale and a 5V Zener diode to clamp the voltage to a maximum of 5V. However, I don't fully understand if this is sufficient protection (does that work with AC?) and does it impact my measurement accuracy? I had the thought that I could simply use one of the Mega's ADC channels and a voltage divider to "check" the approximate voltage before measuring with the ADS1115 on the lower scale, but I'd like to make this project as rugged as possible. Relying on the user not attempting to measure voltages outside the range seems like a bad design.

Voltmeter Input Impedance
The impedance of the meter is important to the particular measurements I am attempting to take. The reason being that the half-cell contact (the connection to ground) is occasionally very high resistance and anything below 10Mohm will cause errors in measurement more frequently. I see that the ADS1115 has different input impedance for the various scales. For example, in differential mode the 6.144 scale is 22Mohm and 4.096 is 15Mohm. There is actually a formula that would be useful to use that requires the same measurement to be taken with two different impedance values and the calculated result would tell me if the measurement is error free. I am therefore considering switching between the scales on the ADS1115 to take advantage of this feature. However, is there a way to externally increase the impedance of an ADC (for example the ADC of the mega itself) just by adding external resistors and does this impact my accuracy?

Measuring low voltage AC
Is it possible to measure 0-5VAC with the ADS1115 or is there a better unit/module/circuit that would be better? It seems like I'd have to rectify the AC to DC to measure it, but would likely have to amplify it if it's under a few volts. I'm inclined to avoid the whole mess altogether but thought it worth asking. My only other thought was that since the ADS1115 can measure both positive and negative voltages, would it be possible to sample fast enough to capture a 60Hz waveform? I understand the ADS1115 is rather slow so again, I'm inclined to leave it alone but would be a nice feature if it would work.

Thank you for anyone that reads this and is willing to shine a light on it. I hope that I have been specific enough, although I'm sure I've somehow left out important information. I will update the post once I am able to take pictures of the circuits.

Joined Mar 10, 2018
4,057
AC Filter Required?
You could do it using filter, or using code, or circuit to get rid of AC CM.

Over-voltage Protection Circuit
I would be more inclined to use schottkys tied to rails and an input
R to limit current. So input is clamped to Vcc + Vf > Vin > Vss - Vf

If you buffer the input then the buffer small Ibias would
result in very low Voffset.

Voltmeter Input Impedance
You could buffer with unity G OpAmps, eg. followers, and achive very high Z.
You would have to do an error budget to see if signal path end to end meets your
requirements. Also a good RRIO, low drift, low Ibias makes sense for this.

Measuring low voltage AC
Sure, using A/D, sampling and some code you could measure its freq, Vrms, Vpeak,
Vavg. Its really a sample set coding problem, quite straightforward. Find Vmin, Vmax,
in the sample set, the rest falls into place.

Just an FYI, A PSOC with onboard 20 bit Delsig, gives you an ARM core and
OpAmps and Vref and a whole lot more. A natural for this kind of design. In fact
there is even DSP filter onboard, analog muxes, DAC, COM, LCD......

And you can do this differential to get rid of CM problems. Note DelSig common modes
to 100 mV outside its rails, and measures accurately in that region of input. And it has
an input buffer if you choose to enable it. Note design below is configed single ended,
ignore that. And if you needed more channels drag and drop a diff mux (also internal)
onto schematic and wire that up with tool.

Regards, Dana.

#### ebp

Joined Feb 8, 2018
2,332
I know how you feel about having to learn a whole bunch of new stuff every time. It can be pretty daunting.

I wish I could help more with some important generalities, but ...

One thing I can address, because it is "universal" in analog electronics, is input protection.

The big would-be advantage to Schottky diodes is that their lower forward voltage means that you can do a better job of preventing the protection diodes at IC inputs (almost all inputs have them) from conducting any current. But the reverse leakage current is a killer in high impedance circuitry. Low-leakage diodes can be had, but the choices are few and they are rather expensive (not in absolute terms, but certainly relative to ordinary switching diodes). The junctions of ordinary small bipolar transistors, such as the 2N3904 & 3906 actually do quite well as low leakage diodes. The collector-base junction is more broadly useful because of higher reverse breakdown voltage, but the base-emitter junction is a bit faster. The gate-body diode of a JFET can be very good, but they are a good deal more expensive. The late Bob Pease wrote a fair bit about diode characteristics. I know there was some in his book Troubleshooting Analog Circuits which I recommend as a source of all sorts of helpful information (just ignore his fanatic hatred of computers). He may have also written on the topic in his column in EDN, in which case it can probably be found free on the web.

I can't recall if I ever found any low leakage diodes that are available in surface mount packages and reasonably priced. If I did, the info is on another computer. I'll check later & report one way or the other.

Be very careful with overvoltge at the inputs of any analog to digital converter that has a multiplexer. This is something I learned the hard way in a CP circuit design. I had used two channels of the ADC for measuring the same thing, one channel with a high gain amplifier and one with a low gain, more or less as an alternative to a programmable gain amp. I clamped the outputs of the amps to the supply rails for the ADC using moderate resistance and ordinary signal diodes. It turned out that with that particular ADC, any voltage more than a few tens of millivolts, far below the clamping voltage, on any channel would interfere with all channels. Of course my high gain amp was usually operating where the output was clamped and when wanted to read the low-gain channel. It took a phone call to Linear Technology to find out that little detail that wasn't in the datasheet at the time. I had to rework a chunk of circuitry to fix the problem. Precision clamping is quite tricky, so I used a "clamping rail" to prevent the overvoltage and reduced my reference voltage for the ADC to have some margin between full scale and clamping.

The issues with signals beyond the rails can render on-chip variable gain amplifiers nearly useless, but it does depend entirely on the way the IC has been made. It is one of those things where talking to a manufacturer's aps engineer can be very valuable. Sometimes the added cost and complexity of not trying to do everything on one IC is worth it / necessary.

From your descriptions, I'm guessing your equipment is intended to do surveys on existing systems, rather than real-time control of the rectifier, and that GPS is both a convenience in terms of locations for the logs (it's not as if CP'd structures wander about the countryside, as a rule) and to facilitate synchronization of interruption of protection current over a long stretch of pipe.