# Different Ground Potentials

Discussion in 'The Projects Forum' started by bricke, Aug 15, 2011.

1. ### bricke Thread Starter New Member

Mar 1, 2011
13
0
I am working on a project that has 4 sets of batteries as the power source. Each battery pack (3.6V) is in series with one another so that the power source equals 14.4V. I have to use the negative terminal of each battery pack as my ground in order to measure the correct voltage. (If I measure a voltage point with respect to the power source as a whole's ground, it will give me the measurement of that battery pack as well as those between my point and the pack's ground) The problem is that I am interfacing each battery pack with an ATtiny13a microcontroller. When I connect the positive voltage to the Tiny13's ADC input, it reads a different value because it is trying to read the value compared to the 5V regulator's ground. I know this is confusing but hopefully the schematic helps (I only show 2 of the 4 batteries). I need to find a way to get the readings from the shunt regulator and voltage divider in so that the microcontroller can read it correctly. Is there a way of changing ground potentials like this? The VCC shown is a 5V buck regulator that is taken from the 14.4V supply and the VDD is the converted side of a DC/DC converter which has the buck regulator's 5V on the other side. Thank you!

File size:
21.7 KB
Views:
38
2. ### MrChips Moderator

Oct 2, 2009
12,624
3,451
Use four difference amplifiers:

R1 = R2 = R3 = R4 = 10K will give a gain of 1.

Last edited: Aug 15, 2011
3. ### bricke Thread Starter New Member

Mar 1, 2011
13
0
Thanks for the response MrChips. I had actually tried this already, and unfortunately, it didn't work very well. When I inserted the difference amplifier, the voltage on the output dropped from around 3.6V to 3.1V. I did exactly as you have it in your diagram as well. I also added a voltage follower amplifier to the output to see if that cleared it up but had no luck with that as well.

I've seen these pre-built differential amplifiers, but I didn't know if those were any better than ones built with external resistors. Could the LM324 possibly be a bad amplifier to use for the differential amplifier? Thanks.

4. ### MrChips Moderator

Oct 2, 2009
12,624
3,451
What were the values of the resistors in the circuit you tried?

5. ### bricke Thread Starter New Member

Mar 1, 2011
13
0
Initially, I had them at 560 ohms but changed them all to 10k and still had the same result.

6. ### MrChips Moderator

Oct 2, 2009
12,624
3,451
10K should have worked fine.
Next question, what opamp were you using and what power supply voltages?

7. ### bricke Thread Starter New Member

Mar 1, 2011
13
0
I was using the LM324 just because this is what I had on me at the time. Power supply voltages were from the 5V buck regulator so 5V and circuit ground. I know the input and output voltages are within the chips limits, but I'm wondering if maybe this isn't the best op amp to use for this purpose.

8. ### MrChips Moderator

Oct 2, 2009
12,624
3,451
LM324 will not give an output voltage higher than VCC - 2V.
You can either increase the supply voltage or change to a rail-to-rail opamp.
Another simple solution is to reduce the gain of the opamp to reduce the output signal.

9. ### bricke Thread Starter New Member

Mar 1, 2011
13
0
I'll give it a try with a rail-to-rail then. I didn't see anything about that on the datasheet but I'll take your word on it. Thanks again for all your help.