Differential ADC with Analog Switch: Is Negative Voltage Safe? - Page 1
Forum section: electronics / projects

author: Dele
author_rank: Contributor
timestamp: September 28, 2024, 08:11:10 pm
content: I have a 16-bit purely differential ADC (MCP3465RT), and I plan to measure voltage up to ±50V using a voltage divider. At some point, I need to disconnect the lower leg of the voltage divider so that the ADC inputs (with just one series resistor) can measure direct voltage, up to ±2.5V.Initially, I used a solid-state relay, such as GAQY212, but it has a high leakage current (1μA), which, combined with the resistor it disconnects, significantly affects the measurement results.Then I switched to an analog switch TS5A3166, which has a leakage current of 4nA (100nA max), and the results became acceptable.However, I’m concerned about one thing: since the ADC is differential, the measured voltage can be connected with any polarity.However, according to the datasheet of the analog switch, negative voltage relative to the ground is not allowed.But, everything generally works fine.My question is: how acceptable is this in a real project?In theory, the differential inputs aren’t tied to the ground of the ADC and the analog switch, which is possibly why it works, but am I missing something?

author: Kleinstein
author_rank: Super Contributor
timestamp: September 28, 2024, 09:31:41 pm
content: The analog swiches and switched capacitor ADCs usually work a little (like 0.3 V) below the negative supply, but not much lower. When the input tries to go lower the current from internal "diodes" towards the supply will go up and clamp the voltage.The differential ADC can measure a negative voltage with one input in the center or the range or both inputs moving in opposite directions.A voltage divider could be not towards ground, but towards a point at have the ADC range (e.g. 1.2 V). This way the divider output could be something like 0-2.5 V for a -50 to +50 V input range.

author: tggzzz
author_rank: Super Contributor
timestamp: September 28, 2024, 10:51:50 pm
content: Quote from: Dele on September 28, 2024, 08:11:10 pmThat ADC cannot accept negative inputs. "Analog Inputs w.r.t. A GND ..... -0.3V to AV DD + 0.3V".From your post it is not clear you appreciate the difference between the differential voltage and the common mode voltage. Your differential voltage ±50V might have each input swinging between 0V and 25V (or 50V and 75V). In the first case the common mode voltage is 12.5V, in the second case 62.5V

author: Dele
author_rank: Contributor
timestamp: September 29, 2024, 02:02:48 pm
content: [ Specified attachment is not available ] [ Specified attachment is not available ]Quote from: Kleinstein on September 28, 2024, 09:31:41 pmFor clarity, I’ve attached a picture where I’ve illustrated both the voltage divider and how I made one leg of it switchable.As I understand, you are suggesting adding a 1.2V power supply to the divider to shift the voltage for the ADC. I would like to avoid this because a good voltage reference costs something, and especially since the current setup is working fine for measuring 50V, whether it's applied in forward or reverse polarity... (how does it relate to the internal diodes?)As you can see, I’ve drawn the ground separately, and it’s not connected to the measured voltage. Could it be that this is why the system works overall? (Considering the working analog switch as well—after all, the datasheet mentions the minimum voltage limit, but it's relative to its own ground...)

author: Dele
author_rank: Contributor
timestamp: September 29, 2024, 02:14:36 pm
content: Quote from: tggzzz on September 28, 2024, 10:51:50 pmYes, most likely I don't understand something.However, in the ADC's datasheet, I see a differential input range: -VREF to +VREF, where VREF is 2.4V...Regarding the second case with 50V and 75V, if we think of it as connected batteries where we tap into the connections between the batteries at a potential difference of 50V and 75V, what difference does it make if the ADC has its own ground that is not connected to the starting point of the battery connections where 0V is?

author: Kleinstein
author_rank: Super Contributor
timestamp: September 29, 2024, 03:01:27 pm
content: It can still work as shown, if the voltage to measure is galvanic isolated from the ADC supply. The side that would go negative to much or positive too much gets clamped with the diodes at the ADC or analog switch and than shifts the voltages relative to each other.The input ranges is differential. Do get the full +2.4 V input the -input needs to be near GND and the + input positive. For -2.4 V the + input needs to be lower, closer to GND and the - input that higher, like +2.4 V.There are still the constraints for the individual voltages to be inside some -0.3 V to VCC+0.3 V.The current situaltion with the clamping diodes acting to limit the common mode voltage is not ideal. The ADC may not work that linear with extreme voltages and current through those clamping diodes (e.g. peaks from mains hum) may effect the accuracy. Ideally one would have a buffer from the input side and the drive the other side to the inverted and LP filtered signal relatively to a crude 1.2 - 1.5 V. This 1.2 V ref. does not need to be accurate (e.g. could be Vcc/2) as it only sets the common mode voltage, not the difference.If the ADC supply is connected to the voltage to measure, this makes quite some difference, as one can not longer shift the CM voltage around at will.

author: tggzzz
author_rank: Super Contributor
timestamp: September 29, 2024, 05:03:23 pm
content: Quote from: Dele on September 29, 2024, 02:14:36 pmMy quote was from the datasheet too.You need to think in terms ofbothdifferential input voltageandcommon mode input voltage. Violate either and the ADC will not work as expected. That's the problem with your last paragraph.

author: Dele
author_rank: Contributor
timestamp: September 29, 2024, 06:06:09 pm
content: Quote from: Kleinstein on September 29, 2024, 03:01:27 pmYes, the voltage being measured is galvanically isolated, that’s correct. It seems I understand that it all comes down to the shifting of the entire circuit relative to the measured voltage, and in the case of the ADC, it’s more or less clear how this works.As for the analog switch, how does it operate? It seems that when we apply a voltage, say -2.4V (which is already below the limit of -0.3V), to one terminal (COM) and 0V to the other terminal (NO), this setup doesn't make sense, as this applied voltage is not referenced to the switch's ground. The actual voltage across the switch is merely the result of the voltage drop across its internal resistance, which is quite low, and the current flowing through it is also very small. Thus, the result is very far from the limit of -0.3V. How accurate is my thinking?

author: Dele
author_rank: Contributor
timestamp: September 29, 2024, 06:24:08 pm
content: Quote from: tggzzz on September 29, 2024, 05:03:23 pmI don't use a common ground between the measured voltage and the ADC; the ADC is galvanically isolated from the system. In my case, I can only exceed the differential voltage, but I'm within the limits of the ADC. Since I have large resistors in the voltage divider, I expect the internal protection diodes can handle any reasonable excess voltage.

author: tggzzz
author_rank: Super Contributor
timestamp: September 29, 2024, 07:14:14 pm
content: Quote from: Dele on September 29, 2024, 06:24:08 pmSo, it is unlike this schematic, which you suppliedYou need to supply a complete circuit diagram which accurately represents all components, connections - and absence of connections (particularly with various power and ground).Hint: the ADC is part of the system, not isolated from it.

author: Kleinstein
author_rank: Super Contributor
timestamp: September 29, 2024, 08:15:02 pm
content: The analog switch will act similar to the ADC input. There are internal "diodes" that will clamp the voltage and this way bring the voltage at least close to the 300 mV limits from the supplies. So there will be no voltage far outside the working range. One is still not sure that the voltages are well withing the range where the ADC actually works well. With some external hum and leakage currents the voltages may well be in a range where the ADC is not damaged and kind of working, but still outside the range where the specs are made for. So correct operation is possible, but not guarantied.Ideally one would want a better defined common mode voltage (e.g. with 2 more extra OP-amps).One may still want to test the maximum acceptable common mode hum.

author: Dele
author_rank: Contributor
timestamp: September 30, 2024, 11:52:23 am
content: Quote from: tggzzz on September 29, 2024, 07:14:14 pmYes, of course, I’ve attached the schematic with the key components indicated.The analog switch TS5A3166 and the ADC MCP3465RT.I believe that optocoupler, digital isolators, DC-DC converters, and missing capacitors shouldn't play a significant role.

author: Dele
author_rank: Contributor
timestamp: September 30, 2024, 07:08:21 pm
content: Quote from: Kleinstein on September 29, 2024, 08:15:02 pmCan I assume that if I apply a reversed 50V, after the divider it becomes 2.3V, where +In will be 0V (the entire circuit will shift relative to +In), and -In +2.3V, and so it turns out that there will be no situation with negative voltage on the analog key either, this key is bidirectional and in fact for it this is a voltage pass in the other direction, in general a standard situation?Regarding noise protection, there is a TVS SMAJ60CA diode at the input in series with a small 100Ω resistor, to prevent any fire in case the TVS shorts, etc. Additionally, due to its capacitance, the TVS will act as a small RC filter. The total resistance of one leg of the divider is 20kΩ + 0.1kΩ, but for simplicity, I omitted that detail.

author: tggzzz
author_rank: Super Contributor
timestamp: September 30, 2024, 07:36:47 pm
content: Quote from: Dele on September 30, 2024, 11:52:23 amThere are two unnamed (terminals?) wires on the left of the dotted line; presumably the inputs.You indicate the voltage relationship between those two wires, i.e. +-50V, the differential voltage.What is their voltage relative to the pin marked GND on the ADC?0V to 25V, -25V to 0V, -12.5V to +12.5V, 1012.5V to 1025V, etc.As a separate point, I presume the ADC PSU voltage is 3.3V, not 33V. That's why it would often be written 3V3, or a 3300ohm resistor shown as 3k3.

author: Dele
author_rank: Contributor
timestamp: September 30, 2024, 09:05:18 pm
content: Quote from: tggzzz on September 30, 2024, 07:36:47 pmYes, the two unnamed terminals are inputs, and the voltage is 3.3V, sorry for unclear diagram.So, the answer for all options is ~1.2V(after the divider), except the last one, ~0.6V, relative to the GND of ADC.

author: tggzzz
author_rank: Super Contributor
timestamp: September 30, 2024, 09:59:12 pm
content: Quote from: Dele on September 30, 2024, 09:05:18 pmI specified a voltage range for a reason. We need a voltage range from you.

author: Dele
author_rank: Contributor
timestamp: October 01, 2024, 12:02:42 pm
content: Quote from: tggzzz on September 30, 2024, 09:59:12 pmThe input voltage, which is applied to the terminals, is a maximum of 50V. It can be 0V on the -In terminal and +50V on the +In terminal, or vice versa. It seems I confused everyone by saying ±50V; it would probably be more accurate to say that the allowable input range is ±25V, or from 0 to +50V, and from -50V to 0...

author: tggzzz
author_rank: Super Contributor
timestamp: October 01, 2024, 12:21:06 pm
content: Quote from: Dele on October 01, 2024, 12:02:42 pmSo, Vdiff=+-50V, Vcm=25V (cm=common mode), relative to the GND pin.