EEVblog Electronics Community Forum

Electronics => Projects, Designs, and Technical Stuff => Topic started by: Remondepemon on July 10, 2014, 08:19:57 pm

Title: Current limiting stability problems
Post by: Remondepemon on July 10, 2014, 08:19:57 pm
Hi everybody,

I'm also working on power supply project.  ;D My voltage control works fine, but I have problems with my current control. I use the schematics of David's power supply  with an LT3083, but with an ASC712-5 current sensor. Everything works fine, 1V/A into the comparator and it actually limits the current. But when it limits the current, the voltage goes down and the current as well. Then the current starts to rise and so on. This results in an oscillating current control loop.

I have been searching and reading, but it seems that nobody experiences this problem. What am I doing wrong here?
Second question is the location of the current sensor. What are the pros and cons of placing the current measurement before or after the regulator or even in the negative line.

Hopefully somebody can help me out.

Thanks,
Remon
Title: Re: Current limiting stability problems
Post by: void_error on July 10, 2014, 08:33:58 pm
Everything works fine, 1V/A into the comparator and it actually limits the current. But when it limits the current, the voltage goes down and the current as well. Then the current starts to rise and so on. This results in an oscillating current control loop.

I have been searching and reading, but it seems that nobody experiences this problem. What am I doing wrong here?
Second question is the location of the current sensor. What are the pros and cons of placing the current measurement before or after the regulator or even in the negative line.

Hopefully somebody can help me out.

Thanks,
Remon

I actually had that oscillation happen in a simulation. One way of dealing with it is to reduce the high frequency gain of your current comparator (I suppose it's an opamp) by placing a capacitor in the negative feedback loop. Reducing the opamp gain to something less than open loop gain will also help improve stability.

The ACS712 is isolated, so it doesn't actually matter where you put it. It's series resistance is also tiny. Since it can measure currents of both polarities it's output voltage for 0 current flowing through it will be half the supply voltage. You could take a look at what I've done so far with my PSU design, maybe it helps.
Title: Re: Current limiting stability problems
Post by: dannyf on July 10, 2014, 08:34:31 pm
Two issues:

one, for most of the designs, the constant current portion oscillates. That's by design thus unavoidable.

two, most designs get around your issues by using two diodes, and making the regulators :active low: when a faulty condition, either over voltage or over current, the circuits pulls down the output. The diodes act to OR the conditions.
Title: Re: Current limiting stability problems
Post by: Remondepemon on July 10, 2014, 08:51:13 pm
Thanks void, I will try this tomorrow as it is almost midnight now.  I will post my findings here of course.

Dannyf, I have seen the dual diode designs as well. This design requires a negative power supply to work. That is something I try to avoid.
Title: Re: Current limiting stability problems
Post by: void_error on July 10, 2014, 09:27:04 pm
Thanks void, I will try this tomorrow as it is almost midnight now.  I will post my findings here of course.

Dannyf, I have seen the dual diode designs as well. This design requires a negative power supply to work. That is something I try to avoid.

You're welcome :)

You won't need a negative rail unless you're using an LM317 or something similar. I might have found a way to avoid it https://www.eevblog.com/forum/projects/psu-design-help/?action=dlattach;attach=101510;image (https://www.eevblog.com/forum/projects/psu-design-help/?action=dlattach;attach=101510;image).

The outputs of the opamps have to swing close enough to 0V. Even a dirt cheap LM358 can do that at a low enough Isink.
Q1 & Q2 will start conducting when their added base voltages are above about 1.2V (more as Ic increases).
To put it another way, if the voltage on the base of Q2 is below 1.2V with respect the the output, none of the two will be conducting. The minimmum base voltage is V(D2) or V(D3) + V(out) of LM358. According to the datasheet, output voltage will be about 1V while sinking 1-10mA. It's pretty close but it might work (if not then I'll use Schottky diodes). I have yet to test it.
Title: Re: Current limiting stability problems
Post by: akis on July 10, 2014, 09:31:27 pm
In all my designs (three so far) I do exactly that, 10nF capacitor on the op-amp that controls voltage or current since there is no feedback resistor.

Current limiting sense resistor behind the voltage regulator so that the output voltage is not offset by the voltage drop on the sense resistor. I have had good results with 0.05R (1%) or two 01R 1% in parallel, and an Av of about 10-15 at the diff op-amp stage. Unless you have sense wires on the load, in which case it does not matter where the sense resistor is.
Title: Re: Current limiting stability problems
Post by: David Hess on July 11, 2014, 12:42:28 am
Two issues:
one, for most of the designs, the constant current portion oscillates. That's by design thus unavoidable.

Most of which power supply designs?  Mikes?

Is there a specific reason the current limit would be deliberately designed to oscillate?
Title: Re: Current limiting stability problems
Post by: David Hess on July 11, 2014, 01:00:17 am
In all my designs (three so far) I do exactly that, 10nF capacitor on the op-amp that controls voltage or current since there is no feedback resistor.

Frequency compensation in power supplies is a common problem.  One disadvantage to using excessive frequency compensation at the error amplifier with separate voltage and current loops is the long recovery time as one or the other amplifier comes out of overload.

Quote
Current limiting sense resistor behind the voltage regulator so that the output voltage is not offset by the voltage drop on the sense resistor. I have had good results with 0.05R (1%) or two 01R 1% in parallel, and an Av of about 10-15 at the diff op-amp stage. Unless you have sense wires on the load, in which case it does not matter where the sense resistor is.

Some designs avoid using a differential amplifier by referencing the current limit to one side of the sense resistor.  This neatly avoids adding another active device to the current limit feedback loop.
Title: Re: Current limiting stability problems
Post by: akis on July 11, 2014, 08:40:04 am
I presume I could have the sense resistor on the ground (negative) terminal, and therefore measure the voltage drop directly on it without a need for the differential amp, I would only need a comparator amp. I am not sure of the implications that the voltage drop might cause eg putting two supplies in series to make a symmetrical one. Maybe it's a good idea.
Title: Re: Current limiting stability problems
Post by: Remondepemon on July 11, 2014, 09:51:13 am
Thanks for all the replies, they have been very helpful.

This morning I took the time to draw a schematic diagram of the power supply. Let me comment on it.
At this time, the Voltage and Current are manual controlled. At the end, there will be a DAC that controls this.

First of all, there is a switching regulator that tracks the second linear regulator, the LT3083. This regulator is fed by a voltage from a amplifier (opamp). There is also a transistor that can cut off the voltage when the maximum current is reached. I have been experimenting with C's over de feedback loop and found out that 1 uF was sufficient to deal with the oscillation. I decided to measure the current after my linear regulator since the current there is more stable. My ACS712-5 delivers 2.5V at 0A, so I decided to use an opamp to substract 2.5V and multiply the voltage by 5.4. This gives me 1V/A on the output. Unfortunately I cannot go all the way down to 0V @ 0A, so I decided to set it to 1V @ 0A. This gives me enough resolution for my 10bit ADC later on.

All comments on this design are welcome!

Thanks,
Remon

Title: Re: Current limiting stability problems
Post by: David Hess on July 11, 2014, 10:15:20 am
I presume I could have the sense resistor on the ground (negative) terminal, and therefore measure the voltage drop directly on it without a need for the differential amp, I would only need a comparator amp. I am not sure of the implications that the voltage drop might cause eg putting two supplies in series to make a symmetrical one. Maybe it's a good idea.

It is a great idea and I have done it in the past without problems except maybe for the issue you mention.  The old Tektronix PS501 has the current sense resistor in series with the output after the pass transistor instead of the ground which makes the tracking implementation in the PS503 straightforward.  It might be fun to redraw the PS503 schematic and see what changes are necessary to move the current sense resistor to the ground side.

These power supplies avoid using a difference amplifier in the current sense loop in the way I mentioned.

I have really grown to like the PS503 design for development work.  Having a variable tracking supply with a floating ground is incredibly useful.
Title: Re: Current limiting stability problems
Post by: blackdog on July 11, 2014, 10:38:45 am
Hi Remon,

Uhm... You wil NOT get this stable!
Look @ your schematic, how many poles thit you create?
1e 10K+100nF opamp A=5.41, 2ecurent set opamp 1uF+10K, 3e BC547+100-Ohm+22uF.

Your disign is NOT nice to its load...
Think about this, set the current to 25mA and your Voltage is 12V.
You want to test a LED, connect the LED now to your powersupply and its gone  ;D

Wat happend? 1e the charge from de 22uF output capacitor is dumpt in your LED and afther that your LT3083 is pomping 10A in your LED!!!
It wil take about 0.1 a.2 Sec to get stable, bey, bey LED. PIC Arduino enz.

It wil get even wors if you use the recomended output capacitor on de LT1083, ~150uF Low ESR.
Sorry, there is in my opinion no solution for kindness to the load and stability in your design.

If you wanth a good design use the HP/Harison desing from de late 50  :D
A lot of powersuply builders use this design, old but stil very capable.

Take a look @ this topic: http://www.circuitsonline.net/forum/view/110029/1 (http://www.circuitsonline.net/forum/view/110029/1)
It is in Dutch, but i think you can read it...


Kind regarts,
Blackdog




Title: Re: Current limiting stability problems
Post by: akis on July 11, 2014, 10:41:59 am
I agree about the floating supply. All my 4 bench supplies are floating, that allows me to power anything and then attach the Ground crocodile clip of the oscilloscope anywhere I want, pretty much.

However I am not sure why having one more stage (a differential op-amp  that references the Vsense to ground) in the current limiting circuitry is considered a problem. I believe we are in a thread where people are discussing placing two LM317s in series...  Maybe it introduces some extra latency in the limiting, maybe, I have not checked it on the scope. That would come into play if the DUT is very sensitive to ns spikes, like for example I was reading about how to power/drive laser diodes, where even a 1 ns spike will kill them.

Title: Re: Current limiting stability problems
Post by: akis on July 11, 2014, 10:52:58 am
Uhm... You wil NOT get this stable!
Blackdog

I agree about the possible latencies and in addition the circuit looks way too complicated and for what?

In my opinion what you need in a power supply is:
1) Switcher to track the output voltage so as not to waste heat on the pass transistors - you already have that, albeit in a very complicated way
1A) get rid of switcher and use large heatsinks and fans, that creates a very clean output, but be prepared to waste 150W-200W as heat (30V-35V/5A input, 0.1V/5A output).

2) Current limiting circuit
3) Voltage control circuit
4) Voltage sense on load circuit with two extra leads, and compensation when load is not connected or grounded
5) Relay to disconnect load on push button (imagine you have X number of power supplies in the same box, and you wish to switch them on/off individually and imagine you want to set the voltage/current BEFORE taking the load live...

6) Relay or circuit to discharge the transformer's filter's large caps when power switch is off.

In my opinion functionality comes first, and things like the relay to take the load offline instantly or remote voltage sense are extremely important.
Title: Re: Current limiting stability problems
Post by: akis on July 11, 2014, 11:13:34 am


Not the LED test for the current limit again. The current limit is their to protect the power supply not the load, if the load is drawing more then anticipated chances are it’s already fried.

The ADJUSTABLE current limit is precisely there to protect the load, down to a few mA. On my supplies I go down to 0mA, ie the current limit starts from negative values.

The problem with using the LM317 type regulators is that you cannot go to 0 unless you have a negative rail but why bother with those regulators and extra complexity in the first place, an op-amp driving a FET or transistor and a good voltage reference does the job very well.
Title: Re: Current limiting stability problems
Post by: blackdog on July 11, 2014, 01:48:38 pm
Hi AcHmed99,

Hi AcHmed99, try to see what I'm trying to explain ...
I do NOT test LED's this way on a power supply as I suggested.
I try to let you understand, what kind of energy there are present, in a power supply, and wat the reasen can be, that your load is killed...

I "kind" LAB powersupply needs a fast/stable CC/VC circuit!
If you want energie for short pulses, than you need good decoupling in your circuit, not a slow acting powersupply.
My opinion is, that a LAB power suply is not used, to start cars, bus sensitiv electronics :-)

I use different power supply's for different jobs.

Kind regarts
Blackdog


Title: Re: Current limiting stability problems
Post by: akis on July 11, 2014, 02:11:54 pm


Not the LED test for the current limit again. The current limit is their to protect the power supply not the load, if the load is drawing more then anticipated chances are it’s already fried.

The ADJUSTABLE current limit is precisely there to protect the load, down to a few mA. On my supplies I go down to 0mA, ie the current limit starts from negative values.


Why does a load draw more current then anticipated? Either inrush or something is shorted. If your current limit is hit before your voltage setpoint your current will likely have minimal overshoot  if thats what your talking about. Thats because your current limiter has control of the loop early. That assumes the Voltage loop hasn't already pumped up the the voltage to max out.

If the current loop controls the loop before the voltage loop then the current loop dominates and you have a current source, with a voltage limit.
Try your test with your supply outputting max voltage (already powered) and current limit set to 20mA then hook it up to your LED let me know what happens to your LED?

I don't think I would want a PSU that kicks in CL fast enough to save a 20mA LED, that would be similiar to what I'm experienceing with the Analog Discovery. It's a bloody nussiance, you want a supply to be able to deliver short burst of peak current. If I want to test LED's I would have a dedicated CC source output on the regulator.

You are confusing two separate issues. One is the idea of an adjustable and very low current limit to protect any kind of device you are currently testing. It is not as black and white as you have mentioned either. For example you could have a badly biased transistor running away thermally over 15 seconds, at 1A it is toast, your PSU is 5A, what do you suggest, we wait for the full 5A to kick in before the red lights come on? The answer is we adjust the current limit to the smallest we can get away with, especially when the DUT is new and we have low confidence.

Secondly there is the idea of quality and speed - how quickly does the current limit react, how much does it overshoot, or ring, what sort of energies are stored in the output capacitors that the current limit cannot control and so on. This is an entirely different matter. It is perfectly reasonable to have a current limit that reacts within, say, 100ns, and during that time it may allow the current to overshoot by X%, and this may be perfectly acceptable, or completely disastrous for some sensitive device, eg a laser LED.

But it does not mean to say that the Bench PSU should not have an adjustable current limit. It just means that your PSU is not appropriate for the type of load.
Title: Re: Current limiting stability problems
Post by: blackdog on July 11, 2014, 03:18:44 pm
Hi AcHmed99,

I get the inpression that you'r talking about current foldback wat you don't like.
That kind of current control is not my favorite, the same for SCR control, thats "Switch Off" above a limit.

The power supply's i design, are not of the "Fold Back" limiting type, but CC.
And for the electronic's i design this CC is a must.

Kind regarts,
Blackdog
Title: Re: Current limiting stability problems
Post by: Remondepemon on July 11, 2014, 03:43:28 pm
Is has been busy here since I posted my 'unworkable' design, but I leared stuff and hopefully others do too. Many thanks to everybody that want to help guys like me!

I decided to borrow the current limiting implementation of Void from the "bench power supply design" blog.
Also, I realised that my original design did not have a feedback loop for the output voltage. Now it has.

I have changed the schematics and I have to say that this works a lot better. :D As Blackdog was discussing, I had a very large overshoot in current and this is not acceptable. This design works fine with the LT3083 as well since there is a current source inside. I did power the opamp only from +25V and GND, no negative rail. Now, my power supply starts around 0.9V. With a negative power rail this might go to zero. Also, there is quite some noise from the current sensor that is superimposed on the output voltage.

Here is the schematics v2, so please shoot again!

Title: Re: Current limiting stability problems
Post by: David Hess on July 11, 2014, 04:43:28 pm
Here is the schematics v2, so please shoot again!

I guess the output does not need any bulk decoupling because the current sense element is essentially zero ohms but this points to a problem.  The 22 microfarad bulk decoupling capacitor at the output of the LT3083 is going to screw up the frequency compensation of the current limit feedback loop.  The current sense should be between the LT3083 and the bulk decoupling capacitor.

I would tune the constant current feedback loop by adding zeros so that value of the feedback capacitor can be lowered significantly speeding up the response time.  That would entail at least a resistance in series with the feedback capacitor and another series RC in parallel with the 4.7k input resistor.

Title: Re: Current limiting stability problems
Post by: David Hess on July 11, 2014, 05:06:22 pm
I agree about the floating supply. All my 4 bench supplies are floating, that allows me to power anything and then attach the Ground crocodile clip of the oscilloscope anywhere I want, pretty much.

I like them because they can be used to implement a bipolar power supply at any low impedance node in a circuit.  This is handy for powering auxiliary test circuits during development without worrying about single supply operation.

Quote
However I am not sure why having one more stage (a differential op-amp  that references the Vsense to ground) in the current limiting circuitry is considered a problem. I believe we are in a thread where people are discussing placing two LM317s in series...  Maybe it introduces some extra latency in the limiting, maybe, I have not checked it on the scope. That would come into play if the DUT is very sensitive to ns spikes, like for example I was reading about how to power/drive laser diodes, where even a 1 ns spike will kill them.

It just adds another delay into the current limit feedback loop resulting in longer recovery and slower response because of the increased frequency compensation needed for stable operation.  They make fast difference amplifiers but they are not common and you still have to account for common mode rejection.

The single ended designs which I mentioned are much faster and are arguably simpler as well although probably not as intuitive without more analog design experience.  The first bench power supplies I designed for myself used difference amplifiers in the current limit feedback loops but I would not do that now.

I disagree with AcHmed99 on this.  A fast current loop has many advantages and few or no disadvantages.  It does not create startup problems except when driving a negative resistance load and even that is an advantage because it reveals something the designer may want to consider carefully.

As far as the LED test, in many cases even the minimum of bulk output decoupling will damage the LED before any current loop responds anyway.
Title: Re: Current limiting stability problems
Post by: David Hess on July 11, 2014, 05:12:53 pm
Take a look @ this topic: http://www.circuitsonline.net/forum/view/110029/1 (http://www.circuitsonline.net/forum/view/110029/1)
It is in Dutch, but i think you can read it...
I notice that the second schematic shows type of single ended current loop without a difference amplifier that I mention.  It uses a separate floating bias supply but that is not always a requirement.
Title: Re: Current limiting stability problems
Post by: blackdog on July 11, 2014, 06:13:27 pm
Hi David Hess,

Not the last version but good workable is this one...
http://www.bramcam.nl/NA/NA-01-PSU/NA-PSU-SCH-17.gif (http://www.bramcam.nl/NA/NA-01-PSU/NA-PSU-SCH-17.gif)
Forget the Fet on the output, and for the transformer i have a different plan.

No power On or Off Glitch.
Fast acting U en I control.
Low output resistence, DC not measureble (depents on were to connect the sense wires)
Max output current limited outside the "i" control loop.

This is a "real" picture of the load stability, Wire = 2x0.5M to my Active load, over de active a 6,8uF Low ERS capacitor.
That why you see a little ringing, short cable's and no capacitor, no ringing!
http://www.bramcam.nl/NA/NA-01-PSU/NA-PSU-30.png (http://www.bramcam.nl/NA/NA-01-PSU/NA-PSU-30.png)

Its a big topic on that forum, a lot to read, i explane a lot why and how.
Happy reading :-)

Kind regarts,
blackdog
Title: Re: Current limiting stability problems
Post by: David Hess on July 11, 2014, 06:57:20 pm
No power On or Off Glitch.
This is important but often overlooked until it is too late and something expensive is in ruins.  DSOs are especially handy for finding output glitches.

Another consideration is that shutting the power supply off or losing AC power should not damage the supply itself when a large output capacitor is used.  At most, it should blow a fuse.

Quote
Fast acting U en I control.
It looks like you clamped the integrators so they never saturate to prevent excessive overload recovery time.  My first adjustable current bench supply design suffered from this making the current limit very slow to respond.

Quote
Low output resistence, DC not measureble (depents on were to connect the sense wires)
This is not normally important in a bench power supply but I have had the same results.  0 to 30 amps with an output voltage change of 10 microvolts or less makes me wonder if my voltmeter is broken.

Quote
Max output current limited outside the "i" control loop.
One reason I like to use integrated regulators as pass elements is their built in fast current limit , safe operating area protection, and thermal shutdown.

Quote
This is a "real" picture of the load stability, Wire = 2x0.5M to my Active load, over de active a 6,8uF Low ERS capacitor.
That why you see a little ringing, short cable's and no capacitor, no ringing!
http://www.bramcam.nl/NA/NA-01-PSU/NA-PSU-30.png (http://www.bramcam.nl/NA/NA-01-PSU/NA-PSU-30.png)
It is difficult to argue against the results.

Quote
Its a big topic on that forum, a lot to read, i explane a lot why and how.
Happy reading :-)
Your English is better than my Dutch so I will have to be satisfied with Google Translate and the schematic which is easy to understand.  Thanks for the link.
Title: Re: Current limiting stability problems
Post by: Remondepemon on July 11, 2014, 07:47:53 pm
Hi everybody,

Thanks to David that pointed out my output cap messing up the current loop. I moved the current measurement before the cap and lowered it from 22 to 10uF. Also, added the -5V ICL7660 to be able to regulate all the way down to 0V. I have to say that everything feels better since I added the -5V to the opamps.

There is still some noise on the output, especially when in current limiting. What can I expect here?
I measured my factory regulated power supply and that also gives quite a lot of noise when in current limiting state.

Here is the updated schematic v3.

Have a good night,
Remondepemon
Title: Re: Current limiting stability problems
Post by: David Hess on July 11, 2014, 08:02:41 pm
There is still some noise on the output, especially when in current limiting. What can I expect here?
I measured my factory regulated power supply and that also gives quite a lot of noise when in current limiting state.

The bandwidth of your current control loop is lower which will have an effect on the output noise either way.

If the frequency compensation is marginal then the output noise will be higher.  I would do a transient response test to check how stable the output is.

The ACS712-5 you used as a current sensor may be inherently noisy.  I seem to recall that being the case with hall effect sensors.

Operation in current limiting is not usually designed with low noise in mind.
Title: Re: Current limiting stability problems
Post by: akis on July 11, 2014, 10:06:59 pm
In terms of reaction times and oscillations / noise, if your pass element was a simple transistor/FET eg an MJL3281A/MJL1302A or FETs like the IRF9540, all of which react in a given time, there are no sub-circuits lurking in there to generate delays, oscillations or whatever. Grounding the pin of the voltage controller will bring the output low, but what are the characteristics? I think it would be much simpler to use a simple transistor driven by an op-amp rather than a linear voltage regulator which does not have an adjustable current limit ability and you have to "hack" its ADJ pin to implement the current limiting. I know it is very common method and I have used it too, an LM317 and a BC327 grounding the ADJ pin if needed.

In terms of protection my bench PSUs have a diode (Schottky 20A) at the output, so if you plug in a large battery (or similar) nothing bad will happen. Actually the PSU resembles a battery charger which also has a diode at the output (mine do anyway). Sure there are a couple of Watts wasted there, but the PSU is almost indestructible. The voltage drop on the diode is of no consequence since the voltage is sampled in two separate places past the diode.

Title: Re: Current limiting stability problems
Post by: David Hess on July 12, 2014, 12:42:44 am
I have always had excellent results using an integrated regulator as a pass element.  A 317 or 7805 provides fault protection in the form of thermal shutdown, safe operating area protection, and a peak current limit.  Used in combination with thermally mated pass transistors, an integrated regulator can somewhat provide these protections to them in a high output current design.

Old application notes show a very similar design with an external reference, error amplifier, and Kelvin connections to considerably improve low frequency noise and stability.  Last time I designed one, I used an OP-27 class operational amplifier for low noise and tweaked the frequency compensation for best transient response.  Line and load regulation was so good that I was not able to measure it on my best voltmeter.  I think a discrete output stage would have been lower noise and faster but not by a lot.
Title: Re: Current limiting stability problems
Post by: akis on July 12, 2014, 10:32:15 am
You got it right, the external bypass transistor must be mounted on the same heatsink... I had for years a PSU with LM317/337 bypassed by MJL3281/1302 and the LMs blew many times, more times that I care to remember. Accidental shorts in particular would simply blow them up, I do not know why. I ended up bolting a fuse on the output as a way to prevent the LMs from dieing.
Title: Re: Current limiting stability problems
Post by: David Hess on July 12, 2014, 04:27:57 pm
Those are mighty fast transistors so it would not surprise me if parasitic inductance allowed the output to rise above the input, if leakage inductance in the transformer allowed the input voltage to rise above the maximum rated input of the regulator if the input capacitance was low, or if just a parasitic oscillation was the culprit.

I have had a couple of failures like this but they all came down to the output voltage being higher than the input voltage for whatever reason and that is easy enough to protect against with a shunt diode across the regulator and any pass elements.  A shunt diode to the adjustment terminal might be needed as well if it is bypassed.  Good application notes usually cover adding these two diodes but most designs do not need them.
Title: Re: Current limiting stability problems
Post by: Remondepemon on July 22, 2014, 07:13:17 pm
Hi guys,

Thanks for all the advice and tips! Designing a power supply is not so simple as I expected. I couldn't get the LT series stop oscillating and I decided to try the good old 2N3055 transistor instead. And what a blessing: simple, robust and stable! Have been playing around with the current limiting as well and was able to get it free of oscillations very simple.

So this is my schematic so far. Now I have to continue the digital part. The pots for the current and voltage will be replaced by an 12 bit DAC and controlled by a uP.

What do you all think?

Remon


Title: Re: Current limiting stability problems
Post by: dannyf on July 22, 2014, 07:23:21 pm
High speed devices are evil. Glad that you found it out.

you will need to provide a means to get the PS started. Depending on how you implement it, you can implement soft on or off, or one key on off here.

the voltage error amp needs an led in its output.

the current sense amp can be simplified.

Title: Re: Current limiting stability problems
Post by: Remondepemon on July 22, 2014, 07:40:10 pm
the voltage error amp needs an led in its output.
Why do I need an LED there? Only 0-100 uA runs there.

the current sense amp can be simplified.
I do not want to use a negative rail and my ACS give 2.5V at 0A. I decided to first zero the ACS to 1V@0A (0V is not possible without a negative rail) and then set the slope to 1A/V. What can be simplified to that?

Thanks,
Remon
Title: Re: Current limiting stability problems
Post by: dannyf on July 22, 2014, 07:53:42 pm
You can pad the pots output to null the 2.5v output, via a resistor or in software.

also, you need r2ri opamps here, or on that will swing to the negative rail, or one with pnp input stage. Lm358 or 393 would work here.
Title: Re: Current limiting stability problems
Post by: void_error on July 24, 2014, 05:52:34 pm
Either use rail-to-rail opamps or use a negative supply. It can be easily done using a voltage inverting charge pump.
The problem is that the voltage at the base of the TIP31 isn't going low enough. You could use a NPN transistor with your current loop opamp.
Title: Re: Current limiting stability problems
Post by: Remondepemon on August 10, 2014, 02:35:35 pm
Hi guys,

Did some basic ADC tests in my digital part, but just couldn't stop thinking about the analog part.

@dannyF: I want to have maximum resolution in my ADC conversion, so zeroing everything in software will decrease my resolution to much.

@void-_error: I changed one of my opamps to a CA3140 because of the strobe input and being it rail-to-rail as well.

On the current limiting part I got rid of the pots and replaced it with fixed resistors. Now, 0A gives me about 1.1V output but I discovered that the first amp is not to linear. Hopefully somebody can give me some advise on this. The goal is to get 1V/A as linear as possible from the ACS712. The main problem is to get rid of the 2.5 base voltage at 0A.
As I only have to get rid of 15W of heat in my linear regulator, I got rid of the TIP31 and the second 3055 transistor.
Then I discovered something else while performing high current tests. It seems that the higher the current, the lower the maximum output voltage. To be sure that my input voltage was high enough, I raised it to 30V. To be sure that my current limiting was not kicking in, I disconnected pin 8 (strobe) of the CA3140. Then I connected three loads to the power supply and these are my findings:

1. fixed resistor of 30 ohms
maximum voltage: 26.1V
current at 26.1V: 830 mA
P = 26.1 x 0.830 = 21.7W
R = 26.1 / 0.830 = 31.4 Ohm

2. car lamp of 12V/21Watts
maximum voltage: 16.1V
current at 16.1V: 1.85A
P = 16.1 x 1.85 = 29.8W
R = 16.1 / 1.85 = 8.7 Ohm

3. the lamp and resistor parallel.
maximum voltage: 12.7V
current at 12.7V: 1.95A
P = 12.7 x 1.95 = 24.8W
R = 12.7 / 1.95 = 6.5 Ohm

Hopefully somebody can answer the question why my maximum autoput voltage goes down.

Here is my latest schematic diagram.

Title: Re: Current limiting stability problems
Post by: David Hess on August 10, 2014, 03:24:31 pm
On the current limiting part I got rid of the pots and replaced it with fixed resistors. Now, 0A gives me about 1.1V output but I discovered that the first amp is not to linear. Hopefully somebody can give me some advise on this. The goal is to get 1V/A as linear as possible from the ACS712. The main problem is to get rid of the 2.5 base voltage at 0A.

Linear output hall effect sensors are not known for their linearity or even accuracy.  When accuracy is required, I have only seen them used in balancing configurations where their gain and linearity are irrelevant and only offset matters.

Maybe I am reading the datasheet wrong but it looks to me like the ACS712 is only good to about 6 bits.

How were you testing the linearity at low output currents?  Won't using the the CA3140 strobe that way cause oscillation?
Title: Re: Current limiting stability problems
Post by: dannyf on August 10, 2014, 04:22:30 pm
I would try to make sure that this thing works in DC; then to make sure that it is AC stable; and go from there.
Title: Re: Current limiting stability problems
Post by: Remondepemon on August 10, 2014, 05:01:23 pm
Quote
Maybe I am reading the datasheet wrong but it looks to me like the ACS712 is only good to about 6 bits.

@David: Can you explain me what you mean by 6 bits? In the ACS712-05 dataset the error is 1.5% over the full range. 1.5% over 5V is 0,075V. with an ADC of 10 bits, 1023 steps, the 0,075V is 16 steps is 4 bits. 

Quote
How were you testing the linearity at low output currents?  Won't using the the CA3140 strobe that way cause oscillation?

@David: I wrote down the voltage output 0-2A in 100 mA steps. From the ACS712-05 sensor it was linear. On the output of the opamp it was not linear below 1A. What can this have been? Do you suspect a measurement error there?

Thanks,
Remon
 
 
Title: Re: Current limiting stability problems
Post by: David Hess on August 10, 2014, 05:27:26 pm
Quote
Maybe I am reading the datasheet wrong but it looks to me like the ACS712 is only good to about 6 bits.

@David: Can you explain me what you mean by 6 bits? In the ACS712-05 dataset the error is 1.5% over the full range. 1.5% over 5V is 0,075V. with an ADC of 10 bits, 1023 steps, the 0,075V is 16 steps is 4 bits.

Exactly.  10 bits - 4 bits = 6 bits.  They way I came up with that number is 1.5% is 1 part in 66 which is close to 1 part in 64 which is 6 bits and that is only the *typical* error listed in the specifications.  It could be larger or smaller.

Quote
Quote
How were you testing the linearity at low output currents?  Won't using the the CA3140 strobe that way cause oscillation?

@David: I wrote down the voltage output 0-2A in 100 mA steps. From the ACS712-05 sensor it was linear. On the output of the opamp it was not linear below 1A. What can this have been? Do you suspect a measurement error there?

I am not sure what would cause that result.  The output of the LM358 should be close to 2.5 volts when the current is zero so it is operating well within its linear range.  Maybe it is oscillating.
Title: Re: Current limiting stability problems
Post by: mij59 on August 10, 2014, 05:45:09 pm

I am not sure what would cause that result.  The output of the LM358 should be close to 2.5 volts when the current is zero so it is operating well within its linear range.  Maybe it is oscillating.

As mentioned, the asc712 is very noisy, with a filter cap of 1nF on pin 6 it outputs an equivalent of about 0.5A of noise.
In the schematic there's no filter cap.
Title: Re: Current limiting stability problems
Post by: Remondepemon on August 10, 2014, 05:59:54 pm
Quote
Exactly.  10 bits - 4 bits = 6 bits. 
:D

Quote
I am not sure what would cause that result.  The output of the LM358 should be close to 2.5 volts when the current is @David: zero so it is operating well within its linear range.
At 0A, the ACS712's output voltage is 2.5V. For every Ampere, the voltage changes 185 mV. This allows you to measure negative and positive current. I just want to get rid of the 2.5V because I don't want to measure negative currents, but amplify my output voltage because of my ADC.

Quote
In the schematic there's no filter cap.
@mij59: You are right, the 1nF cap is there, but I forgot to include it in my schematic.

Leaves my most important question open; why does my output current affect my maximum output voltage?
Can anybody give his opinion about that?

 
Title: Re: Current limiting stability problems
Post by: void_error on August 10, 2014, 07:34:15 pm
You might want to try replacing the ACS712 with a differential amp and a power resistor (0.5 ro 1 ohm) and see if you get the same results. That way you can see if the problem is the ACS or not.
Title: Re: Current limiting stability problems
Post by: Remondepemon on August 10, 2014, 09:19:41 pm
After drinking a beer and relaxing downstairs, I continued my search why my output voltage had a relation with my output current and why my output current was not linear below 1A. Guess what... FIXED!

The voltage problem
My 3055 was pulling 12 mA from my opamp when I experienced a voltage limit. The CA3140 can deliver only 10 mA, so that was the reason.
I have added my TIP 31 again, and all is fine now. (See schematic)

The linearity problem
I did not connect the opamp power supply to the input voltage of 26V, but after my pre-regulator.
So the input voltage of the opamps was also a factor that caused the non-linearity in my current measurement.

New issue
After introducing the TIP31C, my voltage does not go down to 0V.  It doesn't go lower than 0,8V...
 |O
Title: Re: Current limiting stability problems
Post by: dannyf on August 10, 2014, 10:17:48 pm
Quote
why does my output current affect my maximum output voltage?

The output voltage is Vbe lower than the potential at its gate. Vbe goes up as Ic goes up.

Plus, if your current sensor has voltage drop (generally true but don't think it is true here), you lose some voltage there.

Not to mention the output resistance from the power source (transformer, diode's Vfwd, wiring, ...).
Title: Re: Current limiting stability problems
Post by: dannyf on August 10, 2014, 10:20:13 pm
Quote
My 3055 was pulling 12 mA from my opamp

You will need to deliver considerably more current to drive that 3055 at high current levels.

The use of a darlington (discrete or otherwise) will drop more voltage on the regulator -> more heat.

Think about some high current integrated voltage regulators in place of that 3055 - Linear has quite a few. They are much easier to drive.
Title: Re: Current limiting stability problems
Post by: void_error on August 10, 2014, 10:59:22 pm
New issue
After introducing the TIP31C, my voltage does not go down to 0V.  It doesn't go lower than 0,8V...
 |O

Your triple darlington doesn't turn off completely. Check the base-emitter voltages, opamp output voltages, base current (voltage on the 36onm resistor).

You have three options here:

1. Put a load resistor between the emitter of the 2N3055 and ground (220ohm/5W)
2. Put a 100ohm (or thereabouts, can't be bothered to do the math right now) resistor across the BE of the 2N3055
3. Use the TIP31 only, it'll be able to handle the dissipated power with the pre-regulator in place.

If none of the above work use a low voltage (-3V ish) negative rail.
Title: Re: Current limiting stability problems
Post by: Remondepemon on August 13, 2014, 08:20:04 am
@Void: Thanks for all the advise I tried all options, but decided to move to an TIP142 darlington transistor. Might be a bit more expensive, but easy to work with and it saves me a lot of extra components.

For now, I am off to La France for a nice holiday. So in 2 weeks more opdates on the digital part that will be built around an Ardiuno and an external 12 bit DAC. Not sure yet if I want the microprocessor to set and measure or only to measure Voltage and Current.

Also, I have to focus on my 5 volts for the digital part. I don't want an extra transformer or dissipate too much heat from the 26V supply. I was thinking about using a transformer with a center tap, but am sure how to work out the diodes. (see: https://www.eevblog.com/forum/beginners/diode-bridge/ (https://www.eevblog.com/forum/beginners/diode-bridge/))

Regards,
Remon
Title: Re: Current limiting stability problems
Post by: void_error on August 13, 2014, 09:10:53 am
No idea why I assumed the TIP31 was a darlington... my bad.

For the digital supply you could use a LM2594 (or equivalent, 500mA output current should be enough).
Title: Re: Current limiting stability problems
Post by: dannyf on August 13, 2014, 10:22:13 am
Quote
dissipate too much heat from the 26V supply.

In the case of a high current and large voltage range power supply, the same concept (of using a center-tap'd transformer) also applies to minimize power dissipation: you can switch between a full wave and half wave power supply to minimize the voltage drop on the regulator when  a low output voltage is needed.

Relays can switch between the two configurations.
Title: Re: Current limiting stability problems
Post by: Remondepemon on August 14, 2014, 08:57:50 pm
@void: What is your experence using a switched regulator for your DAC/ADC tasks? Will it be clean enough or is it better to set the switcher around 7V and after the switcher an good old 7805?

@dannyf: Yes, I was thinking about this, but do you have any schematics that proves that it will work.

I'm surprised that nobody can tell me how to use a transformer with a center tap to get two separate voltages. If I have 2x 9V, then I'd like to power my power supply output from the two coils (18V) and my digital part from the first coil only. My question is how to work out the diodes to get two voltages from the one transformer.

Regards,
Remon
Title: Re: Current limiting stability problems
Post by: David Hess on August 14, 2014, 09:23:42 pm
@void: What is your experence using a switched regulator for your DAC/ADC tasks? Will it be clean enough or is it better to set the switcher around 7V and after the switcher an good old 7805?

Keep in mind that linear regulators have decreasing rejection at higher frequencies so they are not a panacea for switching regulator noise.  Simple RLC filtering is better for high frequency noise.  Also switching regulators (and sometimes digital logic) may spew noise into other circuits via magnetic and capacitive coupling which no filtering or regulation will solve.  Sampling converters are especially vulnerable to high frequency noise that integrating converters will reject.

I am not sure if you were asking about using a regulator's output as a reference for a converter but that almost always turns out badly except if the converter is ratiometric in which case reference variation is rejected but the noise issue with sampling converters remains.

Quote
I'm surprised that nobody can tell me how to use a transformer with a center tap to get two separate voltages. If I have 2x 9V, then I'd like to power my power supply output from the two coils (18V) and my digital part from the first coil only. My question is how to work out the diodes to get two voltages from the one transformer.

This is trivial.  Normally a center tapped output would be used with 2 diodes to make a full wave output with the center tap grounded.  If 4 diodes are used in a bridge with a center tap grounded, then +/- supplies are available.  Since the transformer winding is floating, ground the - supply and then the + supply becomes +2V and the center tap becomes +V.

High power linear supplies may use the same configuration with SCRs replacing diodes to create a switched 2V and V outputs for different voltage ranges.
Title: Re: Current limiting stability problems
Post by: dannyf on August 14, 2014, 09:46:21 pm
Quote
do you have any schematics that proves that it will work.

No. But I would encourage you to think of a center-tap'd transformer as a transformer with two identical windings in serial. Thus, the output voltage can be either 1V or 2V, depending on if 1 winding is in or two windings are.

You can report back if it works.
Title: Re: Current limiting stability problems
Post by: void_error on August 14, 2014, 11:23:19 pm
@void: What is your experence using a switched regulator for your DAC/ADC tasks? Will it be clean enough or is it better to set the switcher around 7V and after the switcher an good old 7805?

I'm using going to use an external voltage reference for the DAC/ADC. There will be some additional filtering at the DAC output to keep things nice and smooth. For the ADC I'll probably do a rolling average over a few samples.