Measuring Current on DC Power Supply  - Page 1
Forum section: electronics / projects

author: maurosmartins
author_rank: Regular Contributor
timestamp: June 12, 2019, 09:13:14 am
content: 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]VCurrent Range: [0-1]Athe 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 thedatasheetI 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.

author: HB9EVI
author_rank: Frequent Contributor
timestamp: June 12, 2019, 09:22:15 am
content: 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

author: xavier60
author_rank: Super Contributor
timestamp: June 12, 2019, 09:50:36 am
content: Where does the 15V come from? If it's well regulated, there would be less CMRR problems sensing current upstream of the MOSFET.

author: maurosmartins
author_rank: Regular Contributor
timestamp: June 12, 2019, 10:01:53 am
content: Hello, thank you for your reply,Quote from: HB9EVI on June 12, 2019, 09:22:15 amI 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.Quote from: HB9EVI on June 12, 2019, 09:22:15 amQuote from: xavier60 on June 12, 2019, 09:50:36 am@xavier60it is more like 18V comming from the rectification / filtration of the secondary winding of the transformer.Best regards, Mauro.

author: HB9EVI
author_rank: Frequent Contributor
timestamp: June 12, 2019, 10:27:23 am
content: 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

author: Brutte
author_rank: Frequent Contributor
timestamp: June 12, 2019, 01:24:20 pm
content: 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.

author: xavier60
author_rank: Super Contributor
timestamp: June 12, 2019, 02:22:30 pm
content: 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.

author: xavier60
author_rank: Super Contributor
timestamp: June 12, 2019, 02:50:09 pm
content: The TL081 is one part that will work. It would likely need to be nulled.http://www.ti.com/lit/ds/symlink/tl081a.pdf

author: xavier60
author_rank: Super Contributor
timestamp: June 12, 2019, 03:34:48 pm
content: The idea has a serious short coming. It can't be made to avoid sensing preload current.

author: David Hess
author_rank: Super Contributor
timestamp: June 12, 2019, 05:04:24 pm
content: Quote from: xavier60 on June 12, 2019, 02:50:09 pmThe 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.Quote from: maurosmartins on June 12, 2019, 10:01:53 amThe 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.

author: xavier60
author_rank: Super Contributor
timestamp: June 12, 2019, 11:02:53 pm
content: 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.

author: larsdenmark
author_rank: Regular Contributor
timestamp: June 13, 2019, 09:06:16 am
content: 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.

author: David Hess
author_rank: Super Contributor
timestamp: June 14, 2019, 04:32:39 pm
content: Quote from: larsdenmark on June 13, 2019, 09:06:16 amIf 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.

author: maurosmartins
author_rank: Regular Contributor
timestamp: June 16, 2019, 05:57:23 pm
content: Hello all, thank you very much for your replies!Quote from: David Hess on June 12, 2019, 05:04:24 pm

author: David Hess
author_rank: Super Contributor
timestamp: June 16, 2019, 11:53:49 pm
content: Quote from: maurosmartins on June 16, 2019, 05:57:23 pmSaid graph is included below.

author: xavier60
author_rank: Super Contributor
timestamp: June 17, 2019, 02:44:16 am
content: 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.

author: xavier60
author_rank: Super Contributor
timestamp: June 17, 2019, 09:01:42 am
content: With the -5V control rail, IC2b can fully control the Non-inverting input of IC2d directly via a diode, eliminating Q2.