Go Down

Topic: Battery Voltage Measurement with OP Amp (Read 9525 times) previous topic - next topic

raschemmel

#15
Apr 08, 2016, 05:23 pm Last Edit: Apr 08, 2016, 05:23 pm by raschemmel
Quote
BTW - how little sense does it make that the forums will host the pictures as attachments, but not as pictures?
The answer is simple. After you post the attachments , click SAVE then put the mouse cursor over the attachment and right click "Copy Link Address", then click Modify, select the image toolbutton (computer monitor icon) and paste the link address into that, then click save.
done.

BigBobby

The answer is simple. After you post the attachments , click SAVE then put the mouse cursor over the attachment and right click "Copy Link Address", then click Modify, select the image toolbutton (computer monitor icon) and paste the link address into that, then click save.
done.
Well, simple would be the img button having an option to enter a URL or a local file.

But thank you for telling me the workaround.

raschemmel

#17
Apr 08, 2016, 06:07 pm Last Edit: Apr 08, 2016, 06:19 pm by raschemmel
Quote
Well, simple would be the img button having an option to enter a URL or a local file.
 
The link address of the attachment would be a "local file" but if I'm not mistaken , I think what you were asking was why isn't the forum software smart enough to know an image file extension of an attachment means it should be displayed as an image instead of us having to copy the link address URL and paste it into the image toolbutton prompt window ?

Quote
I also attached a complete circuit diagram of the current controlled battery simulator. Yes, the battery is floating. But since the OP Amp gives me only the differential voltage between the battery poles it should be ok.
If you are referring to the schematic posted in Reply#14, it is not complete. The comparator "+" input does not have any input voltage associated with it.
There is no part number for the fet.
There is no component type or value or label for the cylindrical object , (is that the battery ?)

There is also no circuit description for what appears to be a fet switched by a comparator and nothing more. Is that a modification or addition to the original op amp subtractor ?

BigBobby

The link address of the attachment would be a "local file" but if I'm not mistaken , I think what you were asking was why isn't the forum software smart enough to know an image file extension of an attachment means it should be displayed as an image instead of us having to copy the link address URL and paste it into the image toolbutton prompt window ?
What I'm thinking of is something like adding pics on ebay, craigslist, gmail, etc:  when you push the "add picture" button you get a dialog in which you can identify a picture on your local PC or a URL on the web. 

If you are referring to the schematic posted in Reply#14, it is not complete. The comparator "+" input does not have any input voltage associated with it.
There is no part number for the fet.
There is no component type or value or label for the cylindrical object , (is that the battery ?)

There is also no circuit description for what appears to be a fet switched by a comparator and nothing more. Is that a modification or addition to the original op amp subtractor ?
The schematic certainly isn't complete, but it isn't that bad compared to other things posted to the forum.

Yes, the cylindrical objects are the two NiMH cells he mentioned in his post.  The FET being controlled by the op amp measuring the current through the FET is almost certainly a constant current control.  I was a bit confused by this circuit as I didn't see how he could achieve CC-CV charging, but then I remembered CC-CV is not how NiMH are charged.

He doesn't show the input to the current control op-amp.  I assume it's a steady reference, but if it's not then possibly that's the cause of his problems.

Hopefully he comes back and answers, as it is an interesting problem.

raschemmel

#19
Apr 08, 2016, 08:39 pm Last Edit: Apr 08, 2016, 08:51 pm by raschemmel
Quote
He doesn't show the input to the current control op-amp.  I assume it's a steady reference, but if it's not then possibly that's the cause of his problems.
There's no current control. That's a simple comparator. What is the cylinder under the comparator ? Is that a battery ? (or is it supposed to be a current limiting resistor ?)


BigBobby

There's no current control. That's a simple comparator. What is the cylinder under the comparator ? Is that a battery ?
That is a resistor.   It's drawn the same as his other resistors.

The current through the battery forms a voltage through that resistor.  The voltage is then fed back into that op amp.

Its an op amp because its drawn the same as his other op amp.  Also, in this application, it can not just turn the FET on and off.  It needs to operate in its linear region to form just the right resistance necessary for the desired current to flow.

raschemmel

#21
Apr 08, 2016, 09:11 pm Last Edit: Apr 08, 2016, 09:41 pm by raschemmel
If that's a current limiting resistor, then the value should be chosen to drop the difference after subtracting 1.4V +1.4V + VDSFET .

If we assume:


VDSFET = 1.0 V,

                              Battery 1 = 1.4 V (charged)
                              Battery 2 = 1.4 V (charged)
Then the battery needs to drop 12V -1.4V-1.4V-1.00V = 8.2V

If we assume a Charging current = 300 mA ,

Then RCL   = 12.0v/0.300 A = 27.3 ohms
PR =  0.300A * 8.2V = 2.46 W (round up to 3W)

RCL = 27 ohm/3W

Quote
he current through the battery forms a voltage through that resistor.  The voltage is then fed back into that op amp.
Yes, thats not feedback though, the comparator operates in open loop mode.
Thats the input voltage and the Vref for the comparator is the +V pin.


If +V > -V, Vout = +Vcc
 +V < -V, Vout = 0V

Vref = 8.2 V (in above example)

The "feedback " line , as you call it is connected to the wrong pin on the comparator.
The operation should be :
( 0.30 A * 27 ohms = 8.2 V)

If Icharging < 0.3A +V < 8.2V
If Icharging > 0.3A +V > 8.2V


If Icharging < 0.300 A (-V < 8.2 V)
Vout = +Vcc (fet ON)

If  Icharging > 0.300 A (-V > 8.2 V)
Vout = 0 V (fet OFF)


BigBobby

#22
Apr 08, 2016, 09:27 pm Last Edit: Apr 08, 2016, 09:44 pm by BigBobby
Yes, thats not feedback though, the comparator operates in open loop mode.
Thats the input voltage and the Vref for the comparator is the +V pin.


If +V > -V, Vout = +Vcc
   +V < -V, Vout = 0V

Vref = 8.2 V (in above example)

The "feedback " line , as you call it is connected to the wrong pin on the comparator.
The operation should be :

If Icharging < 0.300 A
Vout = +Vcc (fet ON)

If  Icharging > 0.300 A,
Vout = 0 V (fet OFF)
That is not a current limiting resistor.  It is a shunt to get a current signal.  The current in the resistor has the same direction whether charging or discharging due to S1-S3 changing state.  The current is limited by the FET operated in its linear region.

Honestly, if you don't know this stuff then it might blow your mind to discover this is the same principle behind how an LDO works.  Check out Fig. 2 -> Understanding LDO dropout.pdf

It's a very common circuit, actually.  I have one in my hand right now that uses an ATmega32U's DAC to control the positive input to the op-amp so that the current level is variable.  I verified its operation from 1uA to 2A with an 8.5 digit HP3458A.

raschemmel

#23
Apr 08, 2016, 09:44 pm Last Edit: Apr 08, 2016, 09:57 pm by raschemmel
Quote
That is not a current limiting resistor.  It is a shunt to get a current signal
Ok. I thought you said it was a resistor.

Quote
It's a very common circuit, actually.  I have one in my hand right now that uses an ATmega32U's DAC to control the positive input to the op-amp so that the current level is variable.  I verified its operation from 1uA to 2A with an 8.5 digit HP3458A. 
Thanks for the link. Do you have a schematic for the one you have ?

BigBobby

Ok. I thought you said it was a resistor.
A shunt is a resistor.  It's just a resistor intended to convert a current into a voltage signal.

raschemmel

Can you post the Reply# of the post where the OP describes the current shunt you were talking about . I couldn't find it.

Quote
A shunt is a resistor.
I know what a shunt is. We use them here at work all the time but they are not ordinary resistors. The are made out laminated copper with a plastic mounting base. (and expensive)
We never call them resistors. We call them shunts because if you know what that is you know it is a special form of resistor.

BigBobby

Can you post the Reply# of the post where the OP describes the current shunt you were talking about . I couldn't find it.

I know what a shunt is. We use them here at work all the time but they are not ordinary resistors. The are made out laminated copper with a plastic mounting base. (and expensive)
We never call them resistors. We call them shunts because if you know what that is you know it is a special form of resistor.
Well, that's one kind of shunt.  When I designed batteries for electric vehicles, I used shunts like you describe -> http://www.digikey.com/product-detail/en/ohmite/TGHGCR0005FE/TGHGCR0005FE-ND/1817152

Now that I'm doing power IC designs, I have much smaller shunts -> http://www.digikey.com/en/product-highlight/s/stackpole-electronics/hcs-series-high-current-shunt-sense-chip-resistors

As long as it's a resistor being used for current measurement, it's perfectly correct to call it a shunt.

And yes...as they get more and more accurate, with lower and lower temperature coefficients, they can get very expensive.


raschemmel

#27
Apr 08, 2016, 11:02 pm Last Edit: Apr 08, 2016, 11:15 pm by raschemmel
How did you deduce so much about the OP's circuit when none of that is mentioned ?
(no mention of shunts, operating in the linear region etc etc etc) There's certainly no code posted and the schematic is not what you describe (whether you are right or not, that is not what the schematic shows). I'm interested in building a circuit like that. Can you post a link to an example project that includes a "REAL" schematic and code ? (I also use ATtiny85s which I would think would be ideal for that application) I built my own ATmega328/ATtiny85 Programmer board.

Incidently, the schematic on page 9-2 of the tutorial on LDO's shows a circuit similar to the comparator circuit the OP posted, with the exception that it has a voltage divider for -V input, and also the comparator drives a Gate drive device for the fet. I don't see a shunt there but the circuit is very similar. I haven't read it yet because I'm at work. I'll check it out tonight.

BigBobby

#28
Apr 08, 2016, 11:42 pm Last Edit: Apr 08, 2016, 11:49 pm by BigBobby
How did you deduce so much about the OP's circuit when none of that is mentioned ?
(no mention of shunts, operating in the linear region etc etc etc) There's certainly no code posted and the schematic is not what you describe (whether you are right or not, that is not what the schematic shows). I'm interested in building a circuit like that. Can you post a link to an example project that includes a "REAL" schematic and code ? (I also use ATtiny85s which I would think would be ideal for that application) I built my own ATmega328/ATtiny85 Programmer board.
Well, while I used to proudly develop products, my job now entails making demo circuits for and reviewing customers implementations of my company's ICs.  Customers expect me to be able to recognize circuits like these without explanation.  I was confused yesterday as I couldn't tell how he got a CV mode out of this, but then today I realized that NiMH didn't need a CV mode.

I'm afraid I could only give you a schematic snippet of the electronic load that operates from 1uA-2A.  Here it is, and I hope it's enough to help you:



Incidently, the schematic on page 9-2 of the tutorial on LDO's shows a circuit similar to the comparator circuit the OP posted, with the exception that it has a voltage divider for -V input, and also the comparator drives a Gate drive device for the fet. I don't see a shunt there but the circuit is very similar. I haven't read it yet because I'm at work. I'll check it out tonight.
Yes, the LDO uses voltage feedback as the input to its error amplifier (please stop calling it a comparator...it's marked as Error Amplifier in the figure).  I hope that it actually does blow your mind, as I remember my mind being blown when I first learned how LDOs work.  It's a really simple concept, using feedback so that a FET can find the exact resistance it needs to control some output.  Once you understand how it works, a lot of the behaviors of LDOs become clear too.

Many LDOs can be used with current feedback instead of voltage feedback to create a current source.  For example this datasheet shows the LDO being used as a current source on page 17 -> http://cds.linear.com/docs/en/datasheet/3080fc.pdf

Honestly, the best way for the OP to probably solve his problem is to replace his homegrown circuit with an IC.  Although the cartoon in the datasheet shows something with the same detail as the OP's block diagram, we can see in my schematic snippet that there are other components.  While I'm not a great analog engineer (I almost never have to think about FETS in any state other than off/on), I know that this control can get tricky as the system is open loop if the FET is ever totally off.  It's very likely that the OP has some instability under some condition, where the engineer who designed the LDO is unlikely to have missed a stability condition.

raschemmel

That's an integrator with a very small cap.

Go Up