### Author Topic: how to design fast bench supply with CC and CV?  (Read 10276 times)

0 Members and 1 Guest are viewing this topic.

#### Zero999

• Super Contributor
• Posts: 14587
• Country:
• 0999
##### Re: how to design fast bench supply with CC and CV?
« Reply #100 on: May 01, 2020, 10:10:57 pm »
The idea didn't work. In this arrangement, in CC mode the reference voltage V7 goes below ground. The clamping diode would clamp it forever. So, time to try other solutions from the thread. I have thoughts to give up on this idea, but I still would like to figure out how other solutions work.
I'm still not sure what you're trying to achieve. Let me guess: a ground referenced current control input and high side current sense, after the pass transistor, so the base current doesn't affect the current limit and the output voltage can easily be measured using a potential divider?

Another way to shift the reference voltage to the high side is to use a non-inverting adder circuit, as per a circuit I posted earlier (note U3) and use another op-amp, for the current amplifier, rather than another one in Howland configuration. Unfortunately, as per the Howland, resistor matching will be important. Everything is a compromise. I've already done a quick draft in LTSpice, but will post it tomorrow, as it's needs a bit more work.

The following users thanked this post: exe

#### Zero999

• Super Contributor
• Posts: 14587
• Country:
• 0999
##### Re: how to design fast bench supply with CC and CV?
« Reply #101 on: May 02, 2020, 03:36:18 pm »
Here's the sort of thing I was talking about. U3 divides V4 by 4 and adds it to the output voltage. R6, R7 and R8 divides it again by 1.25, so the voltage at the input of the current amplifier (U2) is V4/5. Q2 is the fast current limit, which clamps Q1's base at the voltage on Q1's base.
[attachimg=2]
[attachimg=1]

The following users thanked this post: exe

#### Marco

• Super Contributor
• Posts: 4880
• Country:
##### Re: how to design fast bench supply with CC and CV?
« Reply #102 on: May 03, 2020, 08:47:25 am »
I think that if you really want to have a power supply functional as a good current source, you're going to need to go with PNP/P-MOSFET despite the stability problems. A circuit expecting CV will likely have some capacitance of its own any way, a circuit expecting CC won't generally have inductance. So between CC and CV, the former is more important. If you short out an emitter follower, you're shorting out the capacitance in front of it before regulation catches up, regardless of the capacitance behind it.

The following users thanked this post: exe

#### xavier60

• Super Contributor
• Posts: 1667
• Country:
##### Re: how to design fast bench supply with CC and CV?
« Reply #103 on: May 03, 2020, 09:19:24 am »
I think that if you really want to have a power supply functional as a good current source, you're going to need to go with PNP/P-MOSFET despite the stability problems. A circuit expecting CV will likely have some capacitance of its own any way, a circuit expecting CC won't generally have inductance. So between CC and CV, the former is more important. If you short out an emitter follower, you're shorting out the capacitance in front of it before regulation catches up, regardless of the capacitance behind it.
That's correct if the output stage is driven from the low-side via a level shifter. Designs of the Harrison topology typically use an NPN Darlington driven WRT the + output terminal. They are current sourcing, which is desirable.
Hioki AS100D vom, HP 54645A dso, Fluke 87V dmm, AN8008 dmm, Agilent U8002A psu,  FY6600 function gen, New! Brymen BM857S-(With Battery)

#### Marco

• Super Contributor
• Posts: 4880
• Country:
##### Re: how to design fast bench supply with CC and CV?
« Reply #104 on: May 03, 2020, 10:22:53 am »
Ah okay, I see your point. Now the common emitter vs. emitter follower discussion earlier in the thread make sense to me ... even though it abuses the normal meanings of the terms.

The following users thanked this post: xavier60

#### xavier60

• Super Contributor
• Posts: 1667
• Country:
##### Re: how to design fast bench supply with CC and CV?
« Reply #105 on: May 03, 2020, 11:15:34 am »
This is my attempt at a Harrison design. Using a MOSFET caused the voltage regulation to be a bit on the slow side.
The current limiting is very fast. The CC op-amp operates in open loop until it takes control.
The precharge on C1 sets the allowed current overshoot. It is controlled by the PSU's micro-controller according to the CC setting.
The amount of allowed current overshoot could be made selectable.
This fast limiting idea might not work as well with a BJT output stage.

Using a MOSFET avoids the problem of drive current being measured by the CS resistor.
Or a MOSFET/BJT Darlington.
« Last Edit: May 04, 2020, 08:52:55 am by xavier60 »
Hioki AS100D vom, HP 54645A dso, Fluke 87V dmm, AN8008 dmm, Agilent U8002A psu,  FY6600 function gen, New! Brymen BM857S-(With Battery)

The following users thanked this post: exe

#### exe

• Supporter
• Posts: 1811
• Country:
• self-educated hobbyist
##### Re: how to design fast bench supply with CC and CV?
« Reply #106 on: May 14, 2020, 04:56:03 pm »
My friends, it's been a while since I touched this topic. I didn't forget, I just don't have enough time bandwidth to move it as fast as I would like to do.

I'm playing with Zero999 circuit. I like it. Took me forever to learn how it works. Then I realized that it's like a differential amplifier with a reference pin where reference is tight to the positive rail. There was a reason why I didn't want to mess up with differential amplifier (resistor matching, etc), but I think I can afford a set of 0.1% resistors and a trimpot

xavier60, thanks for your circuit, still figuring out how the overshoot circuit works.

#### xavier60

• Super Contributor
• Posts: 1667
• Country:
##### Re: how to design fast bench supply with CC and CV?
« Reply #107 on: May 14, 2020, 09:27:40 pm »

xavier60, thanks for your circuit, still figuring out how the overshoot circuit works.
To keep things simple, assume the MOSFET's Gate is always 4V and ignore diode drops.
In CV mode, the CV opamp is sinking Q4's current, controlling the Gate at 4V.
The CC opamp's output will be near its full + rail voltage.
Q2 acts as an analog switch which is off in CV mode.
When increasing PSU load current reaches the CC set threshold, because the CC opamp has no feedback path, it acts as a fast comparitor.
When its output slews down to 3.4V causing Q2's  B-E junction to conduct, two things happen at the same time.
The CC opamp is now sinking Q4's current  so controlling the Gate.
Because Q2 is turned on, it has effectively enabled the feedback path via C1. The CC opamp becomes a slow Miller Integrator.
Q2 is not acting as an amplifier. It could be said to be in a saturated state and because of the relatively high drive current, the B-E junction has a low dynamic resistance.

I'm finding it difficult to explain how the precharge on C1 affects the allowed current overshoot.

Edit: I had to correct some of the transistor references.
« Last Edit: May 14, 2020, 11:21:47 pm by xavier60 »
Hioki AS100D vom, HP 54645A dso, Fluke 87V dmm, AN8008 dmm, Agilent U8002A psu,  FY6600 function gen, New! Brymen BM857S-(With Battery)

The following users thanked this post: exe

#### Zero999

• Super Contributor
• Posts: 14587
• Country:
• 0999
##### Re: how to design fast bench supply with CC and CV?
« Reply #108 on: May 14, 2020, 10:26:20 pm »
My friends, it's been a while since I touched this topic. I didn't forget, I just don't have enough time bandwidth to move it as fast as I would like to do.

I'm playing with Zero999 circuit. I like it. Took me forever to learn how it works. Then I realized that it's like a differential amplifier with a reference pin where reference is tight to the positive rail. There was a reason why I didn't want to mess up with differential amplifier (resistor matching, etc), but I think I can afford a set of 0.1% resistors and a trimpot
Which circuit? I've posted two completely different topologies in this thread: the Howland and voltage reference shifter.

Have you got as far as prototyping it with real components?

#### exe

• Supporter
• Posts: 1811
• Country:
• self-educated hobbyist
##### Re: how to design fast bench supply with CC and CV?
« Reply #109 on: May 15, 2020, 08:30:19 am »
Which circuit? I've posted two completely different topologies in this thread: the Howland and voltage reference shifter.

Have you got as far as prototyping it with real components?

The last one, with voltage shifter.

As of building the actual circuit: not yet, I'm still experimenting. I want to try a push-pull output stage, that is adding another bjt to suck the current (unless someone tells me it's a stupid idea). Realistically it will take me weeks, unless I give up on improving the cuircuit and just build a power supply with what we have already.

#### Marco

• Super Contributor
• Posts: 4880
• Country:
##### Re: how to design fast bench supply with CC and CV?
« Reply #110 on: May 16, 2020, 06:18:29 pm »
It's kind of boring, but the LT3081 looks like a pretty nice regulator which can work with no output capacitor.

#### Zero999

• Super Contributor
• Posts: 14587
• Country:
• 0999
##### Re: how to design fast bench supply with CC and CV?
« Reply #111 on: May 16, 2020, 07:26:48 pm »
It's kind of boring, but the LT3081 looks like a pretty nice regulator which can work with no output capacitor.
At first glance the LT3081 appears to be ideal, but it's unsuitable for the project the original poster is building because a resistor sets the current limit and the requirement is for it to be voltage controlled. The minimum load current is also a nuisance, but a current sink can fix that.

Which circuit? I've posted two completely different topologies in this thread: the Howland and voltage reference shifter.

Have you got as far as prototyping it with real components?

The last one, with voltage shifter.

As of building the actual circuit: not yet, I'm still experimenting. I want to try a push-pull output stage, that is adding another bjt to suck the current (unless someone tells me it's a stupid idea). Realistically it will take me weeks, unless I give up on improving the cuircuit and just build a power supply with what we have already.
Prototyping with real components is part of experimenting. Don't purely rely on simulation results, especially for a project such as this one.

#### Marco

• Super Contributor
• Posts: 4880
• Country:
##### Re: how to design fast bench supply with CC and CV?
« Reply #112 on: May 16, 2020, 08:19:05 pm »
At first glance the LT3081 appears to be ideal, but it's unsuitable for the project the original poster is building because a resistor sets the current limit

What happens if you use a 450 Ohm resistor on ILim, but then inject some extra current there? If internally there's just a high side current source using the resistor to the output to set an output referenced voltage for the inner current limiting circuit, then this should let you set a current limit with a voltage.

It works in LTSpice at any rate, it seems to pump a constant 6 uA out of ILim in their model and you can just add some extra current for the same effect as increasing the resistor.

Even if it works in practice it's not a very precise current limit, but you could wrap it in a digital control loop to walk it to the desired current limit.
« Last Edit: May 20, 2020, 07:42:14 pm by Marco »

#### exe

• Supporter
• Posts: 1811
• Country:
• self-educated hobbyist
##### Re: how to design fast bench supply with CC and CV?
« Reply #113 on: May 28, 2020, 04:28:54 pm »
Hi there,

Just a quick update. I feel like the project is slowly duying, and additional research doesn't bring much value, and only furthers me away from finishing it. So, I'll take the circuit proposed by  Zero999 with the following modifications:

1. Output sensing will be buffered because CV and CC circuits sink some noticeable current from the output.
2. Instead of "discrete" diffamp that sets CC threshold I'll use ad8476 just not to bother with resistor matching (https://www.analog.com/media/en/technical-documentation/data-sheets/AD8476.pdf)
3. To minimize errors introduced by the diffamp. the final divider (R1/R2 on https://www.eevblog.com/forum/projects/how-to-design-fast-bench-supply-with-cc-and-cv/msg3045938/#msg3045938) will be at the output. This way it will attenuate offset voltage.
4. No pulling capability except for constant current sink at the bjt output because it seems designing a push-pull stage is beyond my skills and adds new problems, such as limiting pull current. But if one wants to change my mind I'm fine . At the end, ad8476 provides two symmetrical output voltages: above and below reference. So, technically, it can be used to set the maximum sink current. But too much trouble for now and I'm not sure I'll ever use it.

Any suggestions for maximum voltage across shunt under full load? I was thinking of 0.5V to get a good precision, but now I'm thinking it's kinda too much. Or may be not. I want to build two versions of this power supply: one is 0..2A, and another one is 0..0.2A. So, for the later I think higher voltage is fine.

#### Kleinstein

• Super Contributor
• Posts: 7895
• Country:
##### Re: how to design fast bench supply with CC and CV?
« Reply #114 on: May 29, 2020, 12:32:58 pm »
For the maximum drop at the shunt 0.5 V sounds reasonable, maybe at the upper limit for 2 A. It should be a relatively high power shunt - more like 5-10 W power rating to keep the temperature rise small.
It is a compromise between the temperature rise from self heating and the effect of offsets and low frequency noise when the CC limit is set relatively low.  A larger resistance gives better performance at low currents, but more drift near for high currents (like more than 50%).

The following users thanked this post: exe

#### exe

• Supporter
• Posts: 1811
• Country:
• self-educated hobbyist
##### Re: how to design fast bench supply with CC and CV?
« Reply #115 on: June 01, 2020, 09:16:11 pm »
@Zero999  compensation for CV opamp includes the diode. Is this an error? (see pic). Interestingly that the circuit is stable.

#### David Hess

• Super Contributor
• Posts: 11903
• Country:
• DavidH
##### Re: how to design fast bench supply with CC and CV?
« Reply #116 on: June 01, 2020, 09:29:49 pm »
@Zero999  compensation for CV opamp includes the diode. Is this an error? (see pic). Interestingly that the circuit is stable.

Doesn't that allow faster recovery from integrator windup?  I seem to recall seeing the same external compensation scheme used for integrated switching controllers which include a pair of error amplifiers driving the compensation node through diodes.

It should be stable because the compensation network is only disconnected when the other amplifier is controlling the output.

The following users thanked this post: exe

#### xavier60

• Super Contributor
• Posts: 1667
• Country:
##### Re: how to design fast bench supply with CC and CV?
« Reply #117 on: June 02, 2020, 12:06:05 am »
@Zero999  compensation for CV opamp includes the diode. Is this an error? (see pic). Interestingly that the circuit is stable.
A simulation showing the much reduced overshoot.
https://www.eevblog.com/forum/projects/oscillation-in-psu-simulation/msg3023772/#msg3023772
« Last Edit: June 02, 2020, 01:44:58 am by xavier60 »
Hioki AS100D vom, HP 54645A dso, Fluke 87V dmm, AN8008 dmm, Agilent U8002A psu,  FY6600 function gen, New! Brymen BM857S-(With Battery)

The following users thanked this post: exe

#### schmitt trigger

• Super Contributor
• Posts: 1790
• Country:
##### Re: how to design fast bench supply with CC and CV?
« Reply #118 on: June 02, 2020, 01:31:58 am »

#### exe

• Supporter
• Posts: 1811
• Country:
• self-educated hobbyist
##### Re: how to design fast bench supply with CC and CV?
« Reply #119 on: June 02, 2020, 12:35:05 pm »
Wow, I'm glad I asked. What looked like an error to me turned out to be that secret sauce that makes the circuit fast. I was wondering why it's so fast, now I know.

@Zero999  compensation for CV opamp includes the diode. Is this an error? (see pic). Interestingly that the circuit is stable.
A simulation showing the much reduced overshoot.
https://www.eevblog.com/forum/projects/oscillation-in-psu-simulation/msg3023772/#msg3023772

Thanks for the link, it has an interesting idea I haven't considered before: using a differential amp to sense current. This will solve multiple problems at once:
1. max current is set via voltage referenced to the ground
2. May be I don't need a separate current sense amplifier to feed ADC? Can I feed a sigma-delta adc directly? LTC2402 is my current choice.

I found ad8421 chip that looks very promising (https://www.analog.com/media/en/technical-documentation/data-sheets/AD8421.pdf). Unlike current sense amplifiers, it has quite more bandwidth. The downside is CMRR is not as good. I wonder if can trim it somehow. I think by attaching a resistor to REF pin I can do that, but only one way...

I'll give it a try in the simulator.

#### exe

• Supporter
• Posts: 1811
• Country:
• self-educated hobbyist
##### Re: how to design fast bench supply with CC and CV?
« Reply #120 on: June 02, 2020, 02:35:55 pm »
Concerning ADC, I think I found the answer in the datasheet. They say the input of an ADC is a 2.5pF capacitor that they sample at ~153kHz frequency. So, I guess, this does add some disturbance. Fortunately, they provide some guidance how to implement the input filtering with an RC-filter.

I think I need to finish reading the datasheet before asking questions .

#### exe

• Supporter
• Posts: 1811
• Country:
• self-educated hobbyist
##### Re: how to design fast bench supply with CC and CV?
« Reply #121 on: June 02, 2020, 08:18:03 pm »
Thanks for the link, it has an interesting idea I haven't considered before: using a differential amp to sense current. This will solve multiple problems at once:
1. max current is set via voltage referenced to the ground
2. May be I don't need a separate current sense amplifier to feed ADC? Can I feed a sigma-delta adc directly? LTC2402 is my current choice.

Ah, silly me, it has to be on the high side so speed-up diodes clamp the output.

#### David Hess

• Super Contributor
• Posts: 11903
• Country:
• DavidH
##### Re: how to design fast bench supply with CC and CV?
« Reply #122 on: June 03, 2020, 04:22:50 pm »
Wow, I'm glad I asked. What looked like an error to me turned out to be that secret sauce that makes the circuit fast. I was wondering why it's so fast, now I know.

That configuration is particularly suitable for transconductance error amplifiers (current output) commonly used in power supply controllers including the 723 because it completely disconnects the frequency compensation from the unused amplifier.

It works with conventional operational amplifiers but not to the same extent because the internal compensation still limits performance which neatly explains why you never see it when no external compensation is required; there is no external compensation to disconnect.  Clamping provides higher performance but almost no operational amplifiers support clamping.

#### exe

• Supporter
• Posts: 1811
• Country:
• self-educated hobbyist
##### Re: how to design fast bench supply with CC and CV?
« Reply #123 on: June 03, 2020, 07:39:42 pm »
Do I need to include the diode of CC opamp into the compensation too? It seems to make the transition from CC to CV a bit more stable.

#### NoRaster

• Newbie
• Posts: 1
• Country:
##### Re: how to design fast bench supply with CC and CV?
« Reply #124 on: June 04, 2020, 09:51:28 pm »
Where would you point someone who's interested in designing op-amp circuits and feedback loops like whats in this post?
I'm not an absolute beginner but I don't have much experience with it  .

Smf