Sense voltage while isolating MCU ADC port

Thread Starter

Goxeman

Joined Feb 28, 2017
171
Hi,

I am starting a project to read DC voltage from different sources, but the problem I find is that the voltage sources are not always ideal and stable so I fear for the ADC port of the MCU that would be doing the reads.

Initially I have successfully done some tests just by using a voltage divider with a Zener diode as protection but at the end there is a "direct" path from the power source to the ADC pin which kind of troubles me.

I thought of isolators like digital isolators but the output is just digital whatever the input so I can't really use it to sense the variations in the input side. I intend to be able to measure voltages from 40VDC to 12VDC.

Does anyone has experience with this?

Thanks
 

jiggermole

Joined Jul 29, 2016
111
Another option might be an analog IO expander with analog to digital conversion, but I'm not having any luck finding ones on digikey that aren't canbus. Or a cheapo uC to act as sacrificial one.
 

Ian0

Joined Aug 7, 2020
8,938
Use a differential amplifier on each input. That would also take care of any instances where the two 0V supplies are different.
The op-amp in a differential amplifier has series resistance on both positive and negative inputs, which, combined with the op-amp’s own protection circuitry will keep the processor safe,
I use the Microchip MCP60xx range because of its low offset voltage and rail-to-rail in and out. It has protection diodes to one supply, and you need to add the for the other (look in the datasheet)
if you want complete galvanic isolation, then there are isolation amplifiers (expensive) or connect the analogue to digital converter to the remote supply and optically isolate the data (or use a digital isolator if you need the speed)
Zeners, and analogue opto-isolators are not precision devices!
 
Last edited:

Thread Starter

Goxeman

Joined Feb 28, 2017
171
Exactly, I basically want to isolate the data. But I want the output to be the same as the input but I can’t find a device doing that.

I saw isolated amplifiers from texas but they are truly expensive…

HCNR200 could do the job, I have search in the forum and it seems to be recommended over the years several times
 

Ian0

Joined Aug 7, 2020
8,938
I would have thought that the ±15% error was its biggest shortcoming.
Even 5% error on the more expensive HNCR201 is poor for an analogue voltage measurement.

How much isolation is required?
How much accuracy is required?
 

Thread Starter

Goxeman

Joined Feb 28, 2017
171
I would have thought that the ±15% error was its biggest shortcoming.
Even 5% error on the more expensive HNCR201 is poor for an analogue voltage measurement.

How much isolation is required?
How much accuracy is required?
Is that for real? So much margin of error? Up to a 15%? That is a no go for measures then in almost any application I would say.

I would say that 5% margin error would be even high for measures, but it could be the maximum tolerance I would accept. I was using 0,1% tolerance resistors for the resistor divider.

What do you mean with how much isolation? I dont know how to quantify it.

One of my ideas was to only use the resistor divider a series resistor and a TVS but with a its output would be connected through a switch to the MCU, to only get the measures when desired. This wouldnt be isolating the MCU but it would leave it disconnected from power most of the time.
 

ericgibbs

Joined Jan 29, 2010
18,212
hi G,
@Goxeman
Using the support circuit I posted, this 15% or say a zero offset can be corrected.

E

It is NOT a ±15% error was its biggest shortcoming.

The 15% Transfer gain is corrected in the OPA circuitry, it is NOT an error.

Added image.
EG57_ 989.png
 
Last edited:
I have used the HNCR201 extensively, both for professional and personal projects.
The error can EASILY be trimmed out with a trimmer pot. As you are feeding it into an ADC and MCU, such error can also be trimmed in software.
 
Last edited:

Ian0

Joined Aug 7, 2020
8,938
±15% is the ratio of the current in the two photodiodes. There is no feedback that can correct it. The only way to deal with it would be a preset, but who wants to have to calibrate every input (the TS said there were many)?
From the diagram in Post #13 there appears to be no need for isolation. The TVS won't work too well at 3.3V, I would suggest schottky diodes to V+ and V-.
If there is a possibility of two different 0V connections then a differential amplifier would deal with it, as I suggested back in post #4, but if there is no possibility of different 0V connections, then the Post #13 circuit is OK.
 

ericgibbs

Joined Jan 29, 2010
18,212
It is common practice to add Span and Zero adjustment controls to this type of device, not only to correct the Transfer value, but the tolerances etc in the other components.

I have used a fair number of these devices on practical commercial applications with minimum problems.

BYW: @Goxeman
I would not have the Load Switch disconnecting the ADC input at that point in the circuit
 

Thread Starter

Goxeman

Joined Feb 28, 2017
171
Do you mean isolated or protected? They are not the same thing. Your circuit does not provide isolation.
My circuit does not provide isolation because I haven’t implement it. I just showed what I use right now for tests, I’m looking forward using isolation or improve it
 

Thread Starter

Goxeman

Joined Feb 28, 2017
171
I have used the HNCR201 extensively, both for professional and personal projects.
The error can EASILY be trimmed out with a trimmer pot. Or if you are feeding it into an ADC and MCU, such error can be trimmed in software.
Buy I see that it needs a lot of external circuitry…
 

ericgibbs

Joined Jan 29, 2010
18,212
Hi @goxman,
When you say a number of Voltages sources to measure, what are the sources of the voltages and layout and distances etc from your measuring point.?

E
 
Top