ADC Voltage Measurement for shifted DC GND using microcontroller - Help Needed

geekoftheweek

Joined Oct 6, 2013
1,216
There are also small switch mode regulators the size of a linear regulator that could also be used to power your micro and eliminate the shifted ground and all the headaches that would come with it altogether... plus be fairly efficient doing so. I am assuming you are building an add on circuit to an existing circuit though and this may not even apply.
 

Thread Starter

mishra87

Joined Jan 17, 2016
1,036
There are also small switch mode regulators the size of a linear regulator that could also be used to power your micro and eliminate the shifted ground and all the headaches that would come with it altogether... plus be fairly efficient doing so. I am assuming you are building an add on circuit to an existing circuit though and this may not even apply.
Thanks !

Yes, its not new development so it is difficult to make any change in exiting design.
My headache was to measure both battery voltage and this shifted GND is hurdle.
 

crutschow

Joined Mar 14, 2008
34,432
As i understand we can not use opamp for negative voltage measurement why because opamp negative supply will be GND level which will above the measured signal. So signal below this GND will be 0V for opamp.
Your understanding is not correct.
An inverting op amp can amplify voltages below ground because the negative feedback keeps the negative input node at virtual ground (of course you need a single supply or rail-rail op amp for this).
Example circuit LTspice simulation below:

1593960599037.png
 
Last edited:

Irving

Joined Jan 30, 2016
3,885
If your mcu VFD drops to 4v then your adc readings may be wrong as many mcu use VFD as ref.

Why bother with such a complex regulator if you are happy for it to go out of regulation

If series pass transistor is at Vce of 0.3v it's saturated in which case it's not regulating...
 

Beau Schwabe

Joined Nov 7, 2019
156
I still don't see why a Howland Current Pump won't solve the problem here ... In the example, the Op-AMPs "-V" connection is 0V or Gnd. The Op-AMPs supply voltage is +10V (it just needs to be higher than the highest voltage you want to measure). The "input leads" to the Op Amp measure the voltage across each resistor in the divider to the LEFT ... notice the supply on the divider ranges from +5V to -5V ... the Howland Current Pump configuration correctly presents all of the tapped voltages with an output reference to GND so any micro should be happy.


Edit: I suppose this derivitive is just a Differential Amp, but still the heart of a Howland Current Pump. It still works as described above.
 

Attachments

Last edited:

crutschow

Joined Mar 14, 2008
34,432
I suppose this derivitive is just a Differential Amp, but still the heart of a Howland Current Pump. It still works as described above.
Yes, a differential type amp is the basis for a Howland Current Pump.
If you remove the constant-current output, then you are left with a standard differential amp configuration.

Note that the common-mode voltage rejection of such a circuit depends on the matching of the resistor ratios.
Thus for 1% resistor values, the worst-case rejection would be 1% or 40dB.
Measuring a signal 4V above ground could thus have an error up to 40mV.
 

geekoftheweek

Joined Oct 6, 2013
1,216
I thought I was done since this is outside of my basic hobby level understanding of such things, but I did notice a ground symbol drawn below the two 27.4K resistors which if in fact is true would bypass R if the ground is also common to the battery ground. Also it looks to be the circuit shown in figure 33 of the TL431 datasheet which does not show an R in the circuit. What is the purpose of R and what does the ground symbol actually connect to?

This is for my own curiosity as the TL431 looks like something that could be useful in a later project down the road.
 
Last edited:

geekoftheweek

Joined Oct 6, 2013
1,216
Nevermind it's starting to make sense. I just have a need to understand this.

The ground symbol is the shifted ground and the R is what shifts the ground. Like others I don't understand why shift ground? If I'm thinking right the transistor would cut out at 5.2 (or whatever it takes) no matter where your ground is. Wouldn't it be easier to just eliminate R or do you need the shifted ground for a reason or is it just plain too late to change?

My apologies for my jibberish.
 

Irving

Joined Jan 30, 2016
3,885
@geekoftheweek

The TL431 'programmable zener' is a really useful device for building series pass & shunt voltage regulators and constant current supplies, when used properly.

Here 'R' has been added to shift the AGND for reasons the OP has not made entirely clear but I suspect is to provide a -ve bias for an opamp. Indeed it's not been explicitly stated, AFAIK, that the bottom of the battery stack is AGND. It could equally be the battery CT.

Unfortunately it seems, IMHO, that whoever made that decision didn't fully understand the implications of doing so.
 

geekoftheweek

Joined Oct 6, 2013
1,216
@Irving thanks. It took entirely too long for me to see it, but it did finally make sense to me.

Unfortunately the OP did kind of work themselves into a corner. In the end I'm it seems there is not going to be any way to use the ADC to find even the total voltage to start with since the ground potential will always change. Maybe some careful observation can come up with a way to predict it, but not actually calculate it without some redesign work (which it sounds like it is too late for that).
 

Irving

Joined Jan 30, 2016
3,885
If the OP replaced R with a precision 1v reference as I suggested in post #16 then this fixes the relationship between AGND and DGND at 1v. Then accurate measurement can be done.

Doesn't fix the regulation issue though...
 
Top