ramp up time on a power supply - Page 1
Forum section: electronics / projects

author: tedbar
author_rank: Contributor
timestamp: October 10, 2016, 12:40:43 pm
content: I am learning electronics and decided that the best way to progress was to embark on designing a power supply. After lots of reading and checking what parts I had lying around I have come up with supply laid out in the attached schematic. Obviously some of the ideas have been "borrowed" from my reading - thanks.Generally it works fine but has one issue that I have been unable to resolve. When the supply is put under load and switches into current limit mode the output drops in around 2mS. When the load is removed the output voltage takes around 200mS to recover.The ramp up is smooth with very little ripple and no overshoot but slow.Please provide some guidance. Also any other constructive criticism welcome.

author: David Hess
author_rank: Super Contributor
timestamp: October 10, 2016, 01:37:14 pm
content: Your PDF appears to be corrupted.The problem you describe is caused by windup of the integration term in one of the error amplifiers which is a common obscure problem in constant voltage constant current power supplies. The best way to solve it is to improve the design so less frequency compensation is needed. The second best way is to add an anti-windup circuit which essentially clamps the integration term.

author: tedbar
author_rank: Contributor
timestamp: October 10, 2016, 02:01:38 pm
content: The PDF is indeed corrupted, I had created a postscript. Attached is a PDF.

author: bktemp
author_rank: Super Contributor
timestamp: October 10, 2016, 02:11:27 pm
content: Q4 needs a pulldown, otherwise it may stay on after it is turned on.

author: tedbar
author_rank: Contributor
timestamp: October 10, 2016, 02:44:22 pm
content: The output from the op amp drives the gate negative. As I understand it this means a pull down resistor is not required as it is being "driven" down.Also if I insert a pull down resistor would it be gate to source? If yes that would affect the input to Pin 4 (INV) of the LM723 and thus affect the voltage regulation.Of course it may be that my design needs a more significant overhaul.

author: bktemp
author_rank: Super Contributor
timestamp: October 10, 2016, 02:55:21 pm
content: Instead of adding the pulldown, you could also remove the diode driving the gate. It does not make sense to me.

author: Kleinstein
author_rank: Super Contributor
timestamp: October 10, 2016, 04:31:41 pm
content: The Design has a few weak spots:It's usually not such a good idea to adjust the feedback divider to set the voltage over a larger range, as the changes to loop gain. So the compensation would be a compromise suitable for the worst case (low voltage).In parts it uses the external 4.7 V zener for the negative supply as a reference.Worst case the gat voltage at Q4 could get too high.Current measurement with the differential amplifier at the high side is prone to drift an ripple, as the common mode rejection is not that good. The LM358 is also quite inaccurate and slow (rather low slew rate) - so it takes quite some time for the 2nd half of the LM358 to move up or down from saturation.The way current limiting is combined with voltage regulation is about the most difficult way to chose from. The more usual ways are turning down the voltage at the reference side or with the lm723 to use the internal transistor for current limiting. This also takes care of the windup, as there is only one common capacitor for compensation.

author: tedbar
author_rank: Contributor
timestamp: October 10, 2016, 07:18:50 pm
content: @Kleinstein - thanks for the input.Could you please elaborate a bit more on the loop gain and using the voltage divider.I inserted R10 and R11 as a voltage divider to avoid the gate voltage being exceeded, it reaches a max of 16.8V, so I thought I had dealt with the max VgThe only op amps I have in my bin are the 358's, is it worth changing? Or is the high side sensing the real issue. Would it improve if I moved the sensing resistor to the output? Why is the common mode rejection worse on a high side sense?Reading about the 723 there were a number of comments about how poor it is as a current regulator. This is why, apart from the exercise, I chose to use an op amp for the current regulation. It is not easy for a newbie to separate the noise from the reality@bktemp - if I leave the diode driving the gate out the output is very noisy. Changing the diode though does affect the recovery time significantly. Using a 1N5819 the ramp up time is around 20mS.

author: Kleinstein
author_rank: Super Contributor
timestamp: October 10, 2016, 08:06:31 pm
content: For stability against oscillation and speed, the loop gain is the important factor. It the gain of the output stage, the divider in feedback and the regulator circuit itself. If like in the shown circuit, the feedback divider is adjusted, this also changes the loop gain and one has to do the adjustment for the worst case (low voltage). With higher voltage setting the loop gain is lower than is could have been and thus the response less fast or accurate.The better way is usually to adjust the voltage send to the other side of the differential amplifier. This also make is easier to let the regulator work all the way down to zero.With the gate voltage limited to only 17 V, the fet would not turn on with output voltages above about 16 V. So the fet might be ok, but current limit would not work. If you want to use the way of turning down the voltage setpoint it is again better on the other side, where the reference is.The LM358 has a limited slew rate of about 0.5 V/µs. It depends on the circuit, if this is a problem. In some circuits this is well good enough, but in others it is not really good. So it really depends on the circuit if this gets a problem. The shown circuit tends to need (though it needs modifications to work at all) a high slew rate - so the LM358 is not that good here, but sill not a 200 ms delay, more like 50 µs. It is not high side sense that causes a speed problem, but the high voltage range the OP has to move.At the high side the maybe 100 mV current signal is superimposed with something like up to 5 V ripple - so a good common mode rejection is needed. The differential amplifier circuit has relatively poor CMRR, limited by the resistor accuracy.Moving the sensing resistor to the output can be good for the regulation, but measurement (e.g. a digital display) can get difficult. But it depends on the way it is used. If used for a similar differential amplifier like shown, the CMRR problem gets even worse. With a floating regulator it can work quite good, but needs a second chip and reference.The simple LM723 current limiting / regulation is very fast, but not accurate and temperature stable. Making it variable often makes stability even worse. But it is possible to improve on it. The easy way is having the shunt on the low side. The only downside with this is, that the supply current for the LM723 will also flow through the shunt, but this is a relatively constant offset. So it is OK for high currents but not hat good for less than 10 mA.The 1N5819 is a schottky diode and might have enough leakage current to drive the gate.I very much agree that it is difficult for a beginner to sort out good from bad circuit plans. For some reason there quite some bad ones for power-supplies around, as the problem at first looks really simple, but there are quite some traps for the young players. Many circuits are also somewhat working.

author: Richard Head
author_rank: Frequent Contributor
timestamp: October 10, 2016, 09:07:10 pm
content: There's another shortcoming with the design that hasn't yet been mentioned.The temperature compensated buried Zener reference in the 723 is being degraded by the -4.7V reference created by a simple Zener diode. The idea of the negative voltage to allow the output voltage to go to 0V is good but a simple 4.7V Zener should be replaced with a 78L05 I reckon.Also, you need a ceramic 10nF or similar cap across the chip reference to eliminate wideband noise.I agree with the previous comment about changing the resistor divide ratio to change Vo. It cause the op-amp transfer function to change. Better to control Vo by varying the reference voltage.This is a great way to learn about power supplies. Keep going.

author: tedbar
author_rank: Contributor
timestamp: October 11, 2016, 10:01:20 am
content: Thanks for the inputs.Looking at the data sheet it all makes a lot more sense and I can see that I have picked up some poor ideas, in fact they are not aligned to the data sheet.More to follow.

author: tedbar
author_rank: Contributor
timestamp: October 18, 2016, 05:35:01 pm
content: OK, something of a re-design. I have a few questions, please bear with me as this is my first design attempt.Attached is the re-design.What I have done essentially is:1) move the V adj to the non inverting input and taken it out of the feedback loop.2) drive the non inverting input low when the max set current is exceeded, this takes control out of the feedback loop.3) added a stable voltage ref for the -5V line4) reduced the 723 to a voltage ref and an op ampIt seems to work pretty well now. I have it prototyped on a breadboard and so accurate measurements are tough.Pending feedback I will make a PCB and then check the performance. At this point though (happy to post captures from my scope) measurements are:1) Ripple, both open and under current limit is <10 mV2) 10V to 5V @ 250mA approx 4mS3) 5V to 10V recovery is approx 3mSNow for the questions1) Suppressing the noise on the output is driven by the capacitors (mostly). The caps C10 and C11 have the greatest effect. How do I calculate the values as opposed to testing empirically?2) Will changing the 723 to a voltage ref (say a lm7808) and an op amp give better results?3) How should I measure ripple? A this point I am using AC coupling on the scope and measuring RMS.

author: Kleinstein
author_rank: Super Contributor
timestamp: October 18, 2016, 07:36:16 pm
content: The new design looks a little better. But has a few new weak spots.The 33 V zener will not help much, unless a >100 W type which would be rare. It is only the supply to the 723 that might need a limit, and the limit only works with something like a series resistor.With the negative supply the reference is set by the 723 internal reference minus the -5V supply. This is not a good solution. At least a lower negative supply would really help. I would avoid the negative supply for the 723 and instead add a little of the reference voltage to the feedback divider to bring the common mode voltage of the 723 to something like 1.5 to 2 V. A negative supply would than be only for a bias current for the output stage.The capacitor C11 is a poor solution, and 100 nF are really big here - could explain the slow response.It would be better to use the normal compensation capacitor at the 723 compensation input.The IRF530 is a rather big fet to bring down a reference voltage - it might work, but could be on the slow side.The CMRR and speed of the current loop is still way to slow. The FET adds quite some gain. Having the shunt high side is still not a good solution.Usually the response to load changes should be something like 10-100 µs for most of the part and maybe 1-5 ms for a small rest. It can get slower with more capacitive load.Today the usual way to get the right values for the compensation caps would be doing a simulation to get a first idea. Than start with something slightly larger, measure and check if it can be reduced to the calculated value or slightly below. The old way would be to start with a rather large value form a ballpark calculation, than reduce the size until one gets oscillation and than use about 2-3 times the value where osculation starts. Transient tests (e.g. switching from a 1 A load to a 10 mA load) could give more Information and something to tweak. One might have to check with a rather critical loads. Depending on the circuit this is usually either low of high current and a capacitive load with little damping, either small or really large (e.g. 0-1 µF or 10 mF).Using OPs and voltage reference might work similar good or slightly better. The 723 includes a good quality reference and a not that accurate OP (differential amplifier). An 7805 is not a really good reference though.The ripple measurement is about right with the AC coupled scope. However ripple is usually not that interesting early on in the design - usually ripple should be really low by design and thus hard to measure with the scope.Something like load transients are much more interesting.

author: David Hess
author_rank: Super Contributor
timestamp: October 18, 2016, 08:16:13 pm
content: I think Kleinstein covered most of what I would have said about the circuit.Quote from: tedbar on October 18, 2016, 05:35:01 pmRipple is distinct from noise. You may only be measuring noise.To measure ripple, set your DSO to use the line source for triggering and then use averaging. This will remove all of the wideband noise and leave just the ripple. The old school analog only way would be to use line triggering and limit the oscilloscope bandwidth.If you have a lot of ripple compared to noise, then an AC voltmeter can measure ripple.

author: tedbar
author_rank: Contributor
timestamp: October 19, 2016, 01:26:57 pm
content: It is probably just noise that I am measuring.One of the greatest problems I am having with the supply being breadboarded is that there is little certainty, I suspect there is capacitance floating around making consistent results difficult to obtain. I will prototype it soon and then run tests.Moving C11 to the 723 comp pin does not appear to help, however, this may be due to my breadboard challenges. I have, however, reduced it to 100pF and then made the attached scope captures. It is quite clear that the ramp up/decay time is highly dependent on C7. The switching time appears to be in the uS range. These were made switching between 0 and 20V with a 22ohm load so around 0.9A without cc. The cc was set to 5mA. The names of the files indicate the value of C7. Channel 1 (red) is the output voltage, Channel 2 (yellow) is the non inverting input of the 723.The IRF530 is used only because it is what I have in my box - a limited parts selectionThe question of high side low side is something I read up on and chose to use a high side shunt. My reasons being that:1) A low side shunt removes short circuit protection if the load goes to ground2) The ground voltage varies with a low side sensorI get the errors introduced through resistor errors and poor common mode voltage, however, I am driving the op amp to saturation - either on or off - and hence I believed the errors no longer apply. Have I missed something here?