Author Topic: Measuring Current on DC Power Supply  (Read 3702 times)

0 Members and 1 Guest are viewing this topic.

Offline maurosmartinsTopic starter

  • Regular Contributor
  • *
  • Posts: 62
  • Country: pt
    • Electronics and Embedded systems
Measuring Current on DC Power Supply
« on: June 12, 2019, 09:13:14 am »
Hello all,

I've been working on a small DC power supply controlled by two DAC (one for setting the voltage and the other for setting the current limit).
Voltage Range: [0-12]V
Current Range: [0-1]A

the output voltage is ok and measuring the current is also ok with load (for example 100 or 200mA). The problem happens when no current is flowing and I still have around 0,5V at the output of the differential amplifier (pin 8 highlighted on the schematic).



I think it has to due with ampop limitation to set 0V output because it is supplied with V-=0V and V+~=18V I'm using a portion of an LM324D to make the differential amplifier. Checking the datasheet I think that the maximum "Output Voltage − Low Limit" should be 20mV.

do you have any idea what can be happening?

I'm thinking on adding something like the lower left corner of following design to create a negative rail and supply the ampop:


looking forward your reply,
Best regards, Mauro.


 

Offline HB9EVI

  • Frequent Contributor
  • **
  • Posts: 722
  • Country: ch
Re: Measuring Current on DC Power Supply
« Reply #1 on: June 12, 2019, 09:22:15 am »
two points:

- high side current sense is better done with a chip matching the purpose like the LTC6105
- the LM324 is no rail to tail opamp, so you cannot reach either of both rails; as a single supply opamp you can get close to GND but not close enough; since you use it on the high side, it's not going to work at all, since it cannot reach the positive rail close than maybe VDD - 2V
 

Offline xavier60

  • Super Contributor
  • ***
  • Posts: 3034
  • Country: au
Re: Measuring Current on DC Power Supply
« Reply #2 on: June 12, 2019, 09:50:36 am »
Where does the 15V come from? If it's well regulated, there would be less CMRR problems sensing current upstream of the MOSFET.
HP 54645A dso, Fluke 87V dmm,  Agilent U8002A psu,  FY6600 function gen,  Brymen BM857S, HAKKO FM-204, New! HAKKO FX-971.
 

Offline maurosmartinsTopic starter

  • Regular Contributor
  • *
  • Posts: 62
  • Country: pt
    • Electronics and Embedded systems
Re: Measuring Current on DC Power Supply
« Reply #3 on: June 12, 2019, 10:01:53 am »
Hello, thank you for your reply,

two points:
- high side current sense is better done with a chip matching the purpose like the LTC6105
- the LM324 is no rail to tail opamp, so you cannot reach either of both rails; as a single supply opamp you can get close to GND but not close enough;

I agree with both, the first one was because I had no such IC and had LM324 in the part bin, the second I'm addressing it with a negative supply rail to supply the ampop as in the previous post. Nevertheless I was not expecting 0,5V this is much larger than what the datasheet states (20mV), or am I interpreting it wrong?

Additionally can you please explain a bit more on the following? it does work when current is flowing for example at 200mA it is supposed to wield 1V and it does.
since you use it on the high side, it's not going to work at all, since it cannot reach the positive rail close than maybe VDD - 2V

Where does the 15V come from? If it's well regulated, there would be less CMRR problems sensing current upstream of the MOSFET.

@xavier60
it is more like 18V comming from the rectification / filtration of the secondary winding of the transformer.


Best regards, Mauro.
 

Offline HB9EVI

  • Frequent Contributor
  • **
  • Posts: 722
  • Country: ch
Re: Measuring Current on DC Power Supply
« Reply #4 on: June 12, 2019, 10:27:23 am »
if you have enough headroom with the voltage, so 15V on opamp supply and 12v on the rail to measure, it can actually work, but still the LM324 is not the choice;

the bigger the current draw you have, the bigger the voltage drop on the resistor is - so CMRR of the opamp is less a problem; additionally comes the voltage offset which is more critical the smaller the difference between the two input voltages is.

discrete high side current sensing is possible with some tricks; for example you can bootstrap a RRIO opamp for low voltages like a MCP6001 together with a P-Fet, but still is working easier with a dedicated high side current sense chip
« Last Edit: June 12, 2019, 10:30:18 am by HB9EVI »
 

Offline Brutte

  • Frequent Contributor
  • **
  • Posts: 614
Re: Measuring Current on DC Power Supply
« Reply #5 on: June 12, 2019, 01:24:20 pm »
The discrete differential amplifier for sensing high side current can be made with any op-amp and any high side voltage. The problem here is the matching of resistors tolerances. And with LM324 also the offset voltage might be a problem.
 

Offline xavier60

  • Super Contributor
  • ***
  • Posts: 3034
  • Country: au
Re: Measuring Current on DC Power Supply
« Reply #6 on: June 12, 2019, 02:22:30 pm »
This should work well on the upstream side. A suitable op-amp needs to be found that isn't too expensive.
A BJT would work almost as well as the P-ch MOSFET. The op-amp can have extra gain also.

Edit: I no longer see any point in the op-amp having more gain.
« Last Edit: June 12, 2019, 03:02:49 pm by xavier60 »
HP 54645A dso, Fluke 87V dmm,  Agilent U8002A psu,  FY6600 function gen,  Brymen BM857S, HAKKO FM-204, New! HAKKO FX-971.
 

Offline xavier60

  • Super Contributor
  • ***
  • Posts: 3034
  • Country: au
Re: Measuring Current on DC Power Supply
« Reply #7 on: June 12, 2019, 02:50:09 pm »
The TL081 is one part that will work. It would likely need to be nulled.
http://www.ti.com/lit/ds/symlink/tl081a.pdf
HP 54645A dso, Fluke 87V dmm,  Agilent U8002A psu,  FY6600 function gen,  Brymen BM857S, HAKKO FM-204, New! HAKKO FX-971.
 

Offline xavier60

  • Super Contributor
  • ***
  • Posts: 3034
  • Country: au
Re: Measuring Current on DC Power Supply
« Reply #8 on: June 12, 2019, 03:34:48 pm »
The idea has a serious short coming. It can't be made to avoid sensing preload current.
« Last Edit: June 14, 2019, 05:09:43 am by xavier60 »
HP 54645A dso, Fluke 87V dmm,  Agilent U8002A psu,  FY6600 function gen,  Brymen BM857S, HAKKO FM-204, New! HAKKO FX-971.
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 17427
  • Country: us
  • DavidH
Re: Measuring Current on DC Power Supply
« Reply #9 on: June 12, 2019, 05:04:24 pm »
The TL081 is one part that will work. It would likely need to be nulled.

The TL081 and similar JFET operational amplifiers will work.  A TL031 or TL051 would have a lower offset voltage and is a better choice.

In the old days, they used the LM301A bipolar part and it is still a good choice.  Of course now there are lots of parts available with an input common mode range which includes the positive supply although they are a little more expensive.

Nevertheless I was not expecting 0,5V this is much larger than what the datasheet states (20mV), or am I interpreting it wrong?

The datasheet graph for negative output saturation voltage versus current shows the problem.  The LM324/LM358 can only actively pull down to about 0.5 volts with a PNP emitter follower.  The rest of the current is provided by a 50 microamp current sink down to 20 millivolts or so.

As shown below in a full schematic of the LM324, Q11 pulls down to 0.5 volts and Q10 pulls down with 50 microamps below that.

The LM1014 is an improved drop in replacement for the LM324 which can sink current all the way to ground.  The LT1013 is an improved replacement for the LM358.

The circuit Xavier60 suggests is a better way to do this.
 

Offline xavier60

  • Super Contributor
  • ***
  • Posts: 3034
  • Country: au
Re: Measuring Current on DC Power Supply
« Reply #10 on: June 12, 2019, 11:02:53 pm »
The TL051 is a good choice. Suitable op-amps need to have a common mode input range that includes the + rail.
If a BJT is used, a diode or pull-up resistor is likely to be needed for it to be turned off fully.
 A diode and resistor could be added to the series pass MOSFET to allow the op-amp to mostly discharge the output capacitor, making a preload circuit less needed.
The loops should be properly compensated to allow a much smaller output capacitor to be used.
« Last Edit: June 12, 2019, 11:05:26 pm by xavier60 »
HP 54645A dso, Fluke 87V dmm,  Agilent U8002A psu,  FY6600 function gen,  Brymen BM857S, HAKKO FM-204, New! HAKKO FX-971.
 

Offline larsdenmark

  • Regular Contributor
  • *
  • Posts: 139
  • Country: dk
Re: Measuring Current on DC Power Supply
« Reply #11 on: June 13, 2019, 09:06:16 am »
What about using an LMV324A as replacement for the LM324?

Is this newer opamp any good for this? It is rail to rail and much cheaper than the LT1014.
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 17427
  • Country: us
  • DavidH
Re: Measuring Current on DC Power Supply
« Reply #12 on: June 14, 2019, 04:32:39 pm »
What about using an LMV324A as replacement for the LM324?

Is this newer opamp any good for this? It is rail to rail and much cheaper than the LT1014.

If its 5 volt supply limit is acceptable, then the LMV324A can be used.  But there are lots of similar low cost CMOS parts with at least a 15 volt supply voltage.

The LT1014 is expensive but supports the full 30 volt supply range of the original LM324.
 

Offline maurosmartinsTopic starter

  • Regular Contributor
  • *
  • Posts: 62
  • Country: pt
    • Electronics and Embedded systems
Re: Measuring Current on DC Power Supply
« Reply #13 on: June 16, 2019, 05:57:23 pm »
Hello all, thank you very much for your replies!


Nevertheless I was not expecting 0,5V this is much larger than what the datasheet states (20mV), or am I interpreting it wrong?
The datasheet graph for negative output saturation voltage versus current shows the problem.  The LM324/LM358 can only actively pull down to about 0.5 volts with a PNP emitter follower.  The rest of the current is provided by a 50 microamp current sink down to 20 millivolts or so.
Can you please post the mentioned graph I was unable to find this information.

in the meanwhile I've included the following to my circuit:



and supplied the LM324 with the -5V from the zener voltage, the no load voltage came down to about 50mV.

The TL051 is a good choice. Suitable op-amps need to have a common mode input range that includes the + rail.
If a BJT is used, a diode or pull-up resistor is likely to be needed for it to be turned off fully.
 A diode and resistor could be added to the series pass MOSFET to allow the op-amp to mostly discharge the output capacitor, making a preload circuit less needed.
The loops should be properly compensated to allow a much smaller output capacitor to be used.
The advantage of this circuit is that it doesn't rely on matching resistors, correct? additionaly can you please explain better why the TL081 is a better choice then the LM324? Is it because of the ability null out the output?

on a different topic I've also started to test the current limiting feature:


placing the LED2 in that location was a bad idea and was removed as it changes the output voltage, additionally there is something wrong with the circuit I still haven't figure out what it is, if I increase the load something starts buzzing possibly due to oscillating of Q2 turning on and off.

I'll continue to investigate.

Again thanks for the replies,
best regards, Mauro.


 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 17427
  • Country: us
  • DavidH
Re: Measuring Current on DC Power Supply
« Reply #14 on: June 16, 2019, 11:53:49 pm »
Nevertheless I was not expecting 0,5V this is much larger than what the datasheet states (20mV), or am I interpreting it wrong?

The datasheet graph for negative output saturation voltage versus current shows the problem.  The LM324/LM358 can only actively pull down to about 0.5 volts with a PNP emitter follower.  The rest of the current is provided by a 50 microamp current sink down to 20 millivolts or so.

Can you please post the mentioned graph I was unable to find this information.

Said graph is included below.
 
The following users thanked this post: maurosmartins

Offline xavier60

  • Super Contributor
  • ***
  • Posts: 3034
  • Country: au
Re: Measuring Current on DC Power Supply
« Reply #15 on: June 17, 2019, 02:44:16 am »
Many single op-amp packages have the offset nulling pins. The TL081 just happened to be the first one I found that has an input common mode input range including the +rail.   An op-amp with better offset specs can be chosen.
Providing the -5V control rail is sounding like a good idea. It will allow the MOSFET to be properly controlled by compensated CV and CC op-amps via OR-ing diodes with a constant current source for Gate pull-up.
« Last Edit: June 17, 2019, 02:46:07 am by xavier60 »
HP 54645A dso, Fluke 87V dmm,  Agilent U8002A psu,  FY6600 function gen,  Brymen BM857S, HAKKO FM-204, New! HAKKO FX-971.
 

Offline xavier60

  • Super Contributor
  • ***
  • Posts: 3034
  • Country: au
Re: Measuring Current on DC Power Supply
« Reply #16 on: June 17, 2019, 09:01:42 am »
With the  -5V control rail, IC2b can fully control the Non-inverting input of IC2d directly via a diode, eliminating Q2.
HP 54645A dso, Fluke 87V dmm,  Agilent U8002A psu,  FY6600 function gen,  Brymen BM857S, HAKKO FM-204, New! HAKKO FX-971.
 
The following users thanked this post: maurosmartins


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf