Author Topic: General Purpose Power Supply Design  (Read 154648 times)

0 Members and 1 Guest are viewing this topic.

Offline gxti

  • Frequent Contributor
  • **
  • Posts: 507
  • Country: us
Re: General Purpose Power Supply Design
« Reply #300 on: April 04, 2013, 02:06:26 am »
That's very helpful to know. Would constraining the input voltage help at all? I think most people would be satisfied with a fixed 12V input, but I suspect it's the variable output voltage causing problems as well.

And I suppose it would be farcical to have 3 switchers and a linear regulator in one design -- one main, one fixed-voltage isolator, and one buck converter to get the variable output. Much easier to design though, and it could use pre-baked designs without any of the issues with getting variable control through an isolation barrier.
 

Offline amspire

  • Super Contributor
  • ***
  • Posts: 3787
  • Country: au
Re: General Purpose Power Supply Design
« Reply #301 on: April 04, 2013, 03:23:20 am »
That's very helpful to know. Would constraining the input voltage help at all? I think most people would be satisfied with a fixed 12V input, but I suspect it's the variable output voltage causing problems as well.

And I suppose it would be farcical to have 3 switchers and a linear regulator in one design -- one main, one fixed-voltage isolator, and one buck converter to get the variable output. Much easier to design though, and it could use pre-baked designs without any of the issues with getting variable control through an isolation barrier.
The big problem with isolated converters is coming up with a cheap transformer. It was hard to find anything suitable that was also a reasonable price, and the supply of magnetics for a DIY transformer is pretty bad. My tests were with transformer cores wound on readily available and cheap toroid cores, but I found a sizable leakage inductance, particularly if insulation was added primary to secondary. The only way to make an almost decent switching transformer on a small toroidal core with good isolation is probably to use the triple and quadruple enamel and Teflon coated winding wire (1500V+ rating) - which unfortunately is surprisingly expensive.

I wanted something under 13mm thick if possible. There are beautiful low profile ferrite transformer cores from companies like TDK, but they are very hard to get in low quantity and at a reasonable price. I just wish ferrites were as easy to get as semiconductors. I had been attempting to use only extremely common and easy to get parts, and the transformer does not fit at all into this model.

I might revisit this once I have come up with a good package for the regulator, and a controller. It is probably the case that the best way to get a decent transformer is if someone takes the step to get custom transformers made in bulk in China, and then to resell them either separately, or as part of an assembled module.

I will probably do a seperate microcontroller-based controller board, since it is not needed if a simple potentiometer and meter supply is build. It would be nice if a microcontroller-based controller board was opto-isolated (or ethernet transformer isolated) and could control one or multiple regulator boards.

Richard.
« Last Edit: April 04, 2013, 10:38:38 am by amspire »
 

Offline Thor-Arne

  • Supporter
  • ****
  • Posts: 503
  • Country: no
  • tinker - tinker, little noob.....
Re: General Purpose Power Supply Design
« Reply #302 on: April 04, 2013, 10:25:38 am »
I understand that the transformers is among the most expensive parts (they usually are expensive for any application).
But what is the specs for something like this? I don't have any clue about these things.
Don't even know where to start looking for one.  :P

Anyway, a quick search at RS for "flyback transformer" comes up with several to about $10.
Is it these we are looking at?
 

Offline amspire

  • Super Contributor
  • ***
  • Posts: 3787
  • Country: au
Re: General Purpose Power Supply Design
« Reply #303 on: April 04, 2013, 10:43:17 am »
I understand that the transformers is among the most expensive parts (they usually are expensive for any application).
But what is the specs for something like this? I don't have any clue about these things.
Don't even know where to start looking for one.  :P

Anyway, a quick search at RS for "flyback transformer" comes up with several to about $10.
Is it these we are looking at?
It is hard to pinpoint specific specs as there are different frequencies and different inductance that can be made to work. But in general, it is really hard to find a compact transformer that can handle sufficient power, and usually the ratios are just not right. It is pretty common to need a custom transformer.

Last time I looked, I don't think Coilcraft had anything even close.
 

Offline Thor-Arne

  • Supporter
  • ****
  • Posts: 503
  • Country: no
  • tinker - tinker, little noob.....
Re: General Purpose Power Supply Design
« Reply #304 on: April 04, 2013, 11:03:13 am »
That's a real showstopper.

A switching pre-regulator would be most suited considering the design of the regulator and the heat generated by the circuit.
Having one manufactured is a option, but that would probably be to expensive as one needs to order a lot for it to be economical.
Hopefully someone can come up with something that uses off the shelf transformer.

By using a linear pre-regulator one would only move the heat generating circuit to another part of the design?
That doesn't matter much if the benefits of the design (accuracy, stability, etc.) ways up for this.
 

Offline amspire

  • Super Contributor
  • ***
  • Posts: 3787
  • Country: au
Re: General Purpose Power Supply Design
« Reply #305 on: April 04, 2013, 11:21:40 am »
That's a real showstopper.

A switching pre-regulator would be most suited considering the design of the regulator and the heat generated by the circuit.
Having one manufactured is a option, but that would probably be to expensive as one needs to order a lot for it to be economical.
Hopefully someone can come up with something that uses off the shelf transformer.

By using a linear pre-regulator one would only move the heat generating circuit to another part of the design?
That doesn't matter much if the benefits of the design (accuracy, stability, etc.) ways up for this.
The thing is the pre-regulator can be a simple design that is easy to scale.

Linear power supplies designs do not scale at all. Typically, every time you change current or voltage of the actual regulator circuit, you have to make changes to the control loop and other aspects of the design. The idea was to have a standard module that is cheap, performs well, and can easily be adapted to different voltage ranges and currents.

It may be I can run my supply in a floating mode which means that with an appropriate pre-regulator, you could make a supply that regulates well to 1000V.

Richard.

Think of a cheap board as the equivalent of an easy to use IC that needs some easy to design auxiliary components.
 

Offline Thor-Arne

  • Supporter
  • ****
  • Posts: 503
  • Country: no
  • tinker - tinker, little noob.....
Re: General Purpose Power Supply Design
« Reply #306 on: April 04, 2013, 11:53:12 am »
I see.
I doesn't understand enough about these circuit to see these things without explanation.  :-//

The thing is the pre-regulator can be a simple design that is easy to scale.

Linear power supplies designs do not scale at all. Typically, every time you change current or voltage of the actual regulator circuit, you have to make changes to the control loop and other aspects of the design. The idea was to have a standard module that is cheap, performs well, and can easily be adapted to different voltage ranges and currents.
Hm, I need to study this more I understand.
Not going to bother you with this though.  ;)
It may be I can run my supply in a floating mode which means that with an appropriate pre-regulator, you could make a supply that regulates well to 1000V.

Richard.

Think of a cheap board as the equivalent of an easy to use IC that needs some easy to design auxiliary components.
This part I understand very well. But I'm never going anywhere near 1000V .  ;)
 

Offline TheRevva

  • Regular Contributor
  • *
  • Posts: 87
Re: General Purpose Power Supply Design
« Reply #307 on: April 19, 2013, 02:33:16 pm »
Hi all,
I'm a SOFTWARE guy rather than a HARDWARE guy, so I should probably apologise in advance?

I've just been playing with LTSpice and Richards (amspire) Mk3 circuit and I came across some anomalies so I'm wondering if I've done something wrong?
(I already dropped R9 to 330 and installed the recommended 470 ohm from U2 output to ground in case anyone is wondering).
NB: I used the spice files from Bravo-V so that's the component designators I am using here.

The two issues I'm seeing are:
1: Some ugly instabilities (oscillating at around 440kHz under certain conditions)
2: Inability to set low current limits.

The first one was a comparatively easy 'fix'.  I included 10pF caps in parallel with R16 & R18 (the feedback resistors of the current sense amp) and this seems to help a LOT!  It's my 'suspicion' that my LTSpice model of the LM324 is not the same model others are using?
I don't yet know enough about phase margin etc (but I'm learning quick).  Perhaps these additional caps have destroyed that?

The second issue is a little tougher to deal with and here's my $0.02 worth of thoughts on it:
In my spice runs, I left in the 1 ohm LOAD resistor that Bravo-V inserted.
The supply performs current limiting by effectively 'sinking' away the drive to the NPN transistor (via D2 - 1N4148).
In order to do this, it needs to determine how much current is being drawn through the current sense resistor, R22 (1 ohm) using U3.
From what I can see, U3 has 'issues' with criteria that SHOULD be fine. (Eg: Supply=10V, VRef=5V).
Trying to achieve a 100mA current limit in that condition (Current_Ref=100mV) gives about 271mA output (into LOAD of 1 ohm).
Replacing D2 (1N4148) with any Schottky helps things quite a lot although it's still rather messy.
What REALLY seems to help most is to run the two current control op amps (U2 & U3) from a split supply.

Luckily for me, it's my intention to use a PC power supply to drive it (as a 'pre-regulator'), so I will have a nice 'split supply' available.
I'm going to 'butcher' the PC PSU by disabling the OVP/UVP crap, snip into the voltage feedback, and recap it with higher WV output caps so I can drive it a decent chunk over the +12V standard.
Considering a 300W PC PSU is now about NZ$25, I'd be mad not to use it as a pre-regulator.

Anyway, I'm off to read more about phase margins etc...  Take care all.
 

Offline amspire

  • Super Contributor
  • ***
  • Posts: 3787
  • Country: au
Re: General Purpose Power Supply Design
« Reply #308 on: April 20, 2013, 01:09:44 am »
I am working on an update, and I hope to finally be able to build a prototype this weekend. Currently I have a lot of my parts in storage boxes, so I just have to sort that out first. There are some changes needed, and you are right, at very least you have to change the 1N4148 for a schottky. There is also a change needed to th reference input circuit  - A 1N4148 has to be added to a cap on the voltage reference input to the output to drag the reference down when the output voltage is low.

Several other changes, but I will build up some actual hardware first before putting up new circuits.
 

Offline ivan747

  • Super Contributor
  • ***
  • Posts: 2020
  • Country: us
Re: General Purpose Power Supply Design
« Reply #309 on: April 21, 2013, 05:28:05 pm »
I will be following closely -I finally got a proper 2ch. oscilloscope, the DS1102E

I have about 500g worth of generic NPN transistors in a TO-92 package, will these work? I don't have a big variety of transistors or semiconductors in the lab.

And I also have a relatively high resolution multimeter, 5 1/2 digit, to test your PWM DAC concept.
 

Offline TheRevva

  • Regular Contributor
  • *
  • Posts: 87
Re: General Purpose Power Supply Design
« Reply #310 on: April 22, 2013, 11:22:17 am »
OK, I have somewhere over 40 years of hands-on commercial experience...
Unfortunately, it's not with electronics as that's only been a 'hobby'...  :-DD

Nevertheless, here's a few more 'open comments' (please don't take them the wrong way?):
1:
I ADORE LTSpice!!!
As a program, it truly ROCKS!
(Although it's managed to crash VirtualBox under Slackware a few times now... LOL)
2:
I'm treating this whole project primarily as a 'learning exercise', and I'll no doubt make a MILLION mistakes along the way.
(In fact I actually WANT to make those mistakes so that I can learn from them!)
3:
I'm actually intending building my own 'lab power supply', but I'm betting it will be somewhat different as I have different 'criteria'.
I want more current and more voltage than this puppy is currently designed for.
It's my 'intention' to butcher a PC SMPS into becoming a microcontroller adjusted pre-regulator.
(I will probably build two 'identical' systems so that I can have a 'dual tracking' system - PC SPMS are dirt cheap anyway).
I know it's easy enough to get almost 30V from a PC SMPS after replacing all the output caps - I'm hoping to end up with about 25VDC at a reasonable current at the output of the linear reg.
4:
The current limiter in the design seems rather s-l-o-w to operate.
It's quite easy for me to simulate 10% or more 'current overshoots' during power up.
As far as I can tell, this is because the op amp in question is allowed to be driven to the rail (saturated to clipping) and it takes a finite time to 'recover'.
I'm still thinking how to address that aspect...
5:
As mentioned previously, I have already placed some small caps across the current sense amplifier feedback resistors.
Initially 10pF, I've since changed these for 100pF.
I also changed the 1N4148 diode for a Shottky (it was WELL worth the effort... LOL)
6:
Since I am aiming at extra amps, I've elected to drop the current sense resistor from 1 ohm to 0.1 ohm.
In order to keep the current reference input at 1V = 1A, I dropped the series 100k resistors feeding the current sense amp to 10k giving it a gain of 10 (thereby producing the same 1V per Amp output on this op-amp).
I am guessing the down side to this is that it also amplifies any input offset of the sense amp.
I can 'calibrate out' any such discrepancies in the microcontroller (and at present, it's a fairly linear 21.772mV of 'offset' across the full current range)
7:
Upon power up, the voltage manages to 'overshoot' by quite a decent margin (which I'm led to understand is common on LDO regulators)
I'll be able to address that by simply 'ramping up' the voltage reference from the microcontroller.
(More than likely, I'll be using a poor-mans DAC (PWM-DAC) for this anyway which will implicitly create the ramp up - I may not NEED to slow it down.
8:
Now that I am _beginning_ to understand the concepts of phase margin, I have a LOT more 'tuning' to do.

Summary:
I don't know if I should be THANKING Amspire, Dave et al for getting me started on this, or perhaps CURSING you all...
Only time will tell...  |O
 

Offline c4757p

  • Super Contributor
  • ***
  • Posts: 7805
  • Country: us
  • adieu
Re: General Purpose Power Supply Design
« Reply #311 on: April 22, 2013, 11:32:02 am »
I ADORE LTSpice!!!
As a program, it truly ROCKS!
(Although it's managed to crash VirtualBox under Slackware a few times now... LOL)

It runs admirably under WINE.
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline Thor-Arne

  • Supporter
  • ****
  • Posts: 503
  • Country: no
  • tinker - tinker, little noob.....
Re: General Purpose Power Supply Design
« Reply #312 on: May 06, 2013, 09:45:13 pm »
Good to see that there's still things going on in this thread.  ;)

I finally had some time to play with LTspice again.

Replacing the 1N4148 (D5) with a Shottky diode removed the oscillation when the current setting was set to the same as the load.

I still need to figure out why it won't current limit at low current settings.

The circuit is also built on a pref-board, so I'll change a few parts and experiment a bit after I get it functional in LTspice.

Ivan747: I use MJE2955 and BC337-16 transistors in this as I have a few, try what you have in LTspice. ;)

I realize that using other transistors than Amspire designed in can introduce a few issues, but it's worth a try if the parts is already "in-house".
 

Offline TheRevva

  • Regular Contributor
  • *
  • Posts: 87
Re: General Purpose Power Supply Design
« Reply #313 on: May 08, 2013, 10:51:35 am »
Replacing the 1N4148 (D5) with a Shottky diode removed the oscillation when the current setting was set to the same as the load.
I still need to figure out why it won't current limit at low current settings.
Yep, making that diode into a Schottky cures that aspect!!!
As for your reported problem of current limiting to low values, I'd suggest that you MIGHT find that the current limit op amp is getting too close to it's negative rail voltage.
That's why I'm supplying a genuine negative supply to the op amps which is around 5V more negative than the negative output pin.
Many of the schematics I've seen of 'decent' commercial lab supplies seem to use a isolated, split positive and negative supply on their op amps with the 'common' of the om-amp supply being connected to the main positive output rail.

Since my design is using a (heavily modified) SMPS PC PSU as a microcontrolled pre-regulator, adding an isolated op-amp supply wasn't so easy.  Therefore, I simply added diode, capacitor and 7905L linear regulator to the 5volt standby circuit to provide a fairly 'clean' -5V.  (I didn't want to derive the op-amp negative supply from the normal -12V output because it's no longer a constant voltage.  I'm going to be removing all the SMPS output components from the +3v3, +5v, -12v rails and also replacing all the caps on the +12v rail with 50V rated parts.  The SMPS will end up delivering -5v, ground and a final microcontoller adjusted preregulator output of +5 to +25v at several amps!  (While the SMPS _can_ deliver more volts, it would exceed the max supply rails of my LM324 in the linear regulator section)
 

Offline Thor-Arne

  • Supporter
  • ****
  • Posts: 503
  • Country: no
  • tinker - tinker, little noob.....
Re: General Purpose Power Supply Design
« Reply #314 on: May 08, 2013, 01:32:29 pm »
I've tried to supply the OpAmp with -5V and +20V in LTspice, I still have some issues.
It might be that I don't know enough about LTspice, so I'm going to play with it for a while.
 

Offline TheRevva

  • Regular Contributor
  • *
  • Posts: 87
Re: General Purpose Power Supply Design
« Reply #315 on: May 09, 2013, 03:00:59 am »
Without knowing exactly what mods YOU made to the fine design from Amspire, it's hard to guess exactly why you're having issues limiting low currents.

Here's how I 'interpret' the schematic (which is WAY back on page 15 of this thread).
Primary regulation of output voltage comes by way of U3B.  If the output voltage fed back into the inverting input falls below the variable 'reference' voltage on the non-inverting input, it causes the 2N2222A to be switched on harder thereby supplying more base 'drive' to the array of series pass regulator transistors.  Pretty straightforward really.
The current control aspect senses the voltage drop across the current sense resistor (R23) using U3C and then 'compares' this to an incoming 'current reference' voltage using U3A.  If the current being consumed exceeds the 'limit' set by the input, then U3A will begin to 'sink' the base drive power from the 2N2222A (via the Schottky we've installed) thereby lowering the 'drive' available to to the series pass transistors and this will restrict output current.

Soooo... What can go wrong?
1: The current sense amplifier (U3C) is working with both it's inputs fairly close to the positive supply rail of the op-amp.  Specifically, the Vce(saturated) of the series pass array along with the corresponding 0.2ohm emitter load sharing resistors create the only voltage 'drop'.  Therefore, at low current outputs, the two U3C inputs can get rather close to the op-amp rail voltages.
2: Also at low currents, the actual voltage drop across the current sense resistor becomes rather small. - eg: 1mA through 0.1ohm will only cause a 100uV drop over the sense resistor.  I doubt this is causing you any issues though.
3: When the current reference amplifier (U3A) is instructed to limit the current to very small levels (eg: 1mA), the two op-amp inputs will be VERY close to the op-amp negative supply rail (aka ground) and this can become troublesome.  (This is why I've elected to supply the op-amp with a true negative rail that is more negative than the output ground).
4: Finally we have the input offset voltage and current of the op-amps to contend with.  The input offset current is less worrisome than the input offset voltage (comparing nano-amps with millivolts is the clue).  In my case, the inputs to the linear regulator are 'driven' by microcontroller based DAC outputs, and therefore, I can 'calibrate' these to compensate for these offsets.  Eg: To set a current limit of 1mA (which you would _expect_ to require a 1mV input to U3A) will probably end up requiring closer to 3mV due to input offset voltage of U3A.  My LTSpice simulations seem to show this 'offset' is quite consistent across the whole range, so calibrating it accurately at a 1mA limit will be 'close-enough' across the whole range.

In my case, I'm not concerned in the slightest about the drop-out voltage across the linear regulator, so it's more likely I'll be using NPN series pass rather than PNP.  (Do a google search on LDO, quasi LDO and Standard linear regulators to compare the differences).
Also, I'm after quite a lot more current than this design can produce with 8*2N2907 series pass transistors.  At the moment, I'm playing toying with using a darlington NPN such as MJ11032 or some TIP142s.  (With suitable heatsinking, I _might_ get by with a single MJ11032 as these are rated to 300W!!!)
Since the overall dissipation in the series pass transistors is proportional to (Vin-Vout)*Current, I intend using the microcontroller to adjust the pre-regulator supply voltage to keep this to a minimum.  (And that explains the extensive mods to the SMPS PC PSU!).  Something 'm uncertain of at the moment is how much of the 40kHz switching noise from the SMPS is going to permeate through the linear section.  Obviously, I'll be decoupling the pre-regulator output with all manner of filtering to keep it to a minimum, but it's inevitable that SOME will still get through!  Only time will tell.

It's going to be quite a while before I put most of this into practice.  I've decided to pursue a 'higher priority' project first...  A 3D printer (RepRap).  Should be LOTS of fun!
 

Offline Thor-Arne

  • Supporter
  • ****
  • Posts: 503
  • Country: no
  • tinker - tinker, little noob.....
Re: General Purpose Power Supply Design
« Reply #316 on: May 09, 2013, 08:57:28 am »
I've only changed a few things on Amspires Mk.3 design, most importantly the transistors as mentioned here.

After that post there was a few modifications to the design posted here, which I have updated my circuit with.

Otherwise, the diodes I use is 1N5819 and 1N5822 as I have these laying around.

See the attatched spice file, there's comments on the devices I've changed.
 

Offline TheRevva

  • Regular Contributor
  • *
  • Posts: 87
Re: General Purpose Power Supply Design
« Reply #317 on: May 12, 2013, 03:41:40 am »
NB: During typing all this I inadvertently POSTED the darned thing before I was done.  I hope the 'remove' button works correctly, as I'm doing it all again.

Hi Thor-Arne,
Firstly, it's important to inform you that almost ANYONE in this forum has a lot more knowledge / skill / experience than ME, so I suggest you verify EVERYTHING that I type for yourself.  (OK, that's my 'legal disclaimer' out of the way... LOL)
I just loaded up your LTSpice.  I quickly noticed how you've added an RC network and discharge to the voltage ref input with R23, C5 and D6.
(Intriguingly, I've done something pretty similar albeit perhaps for other reasons than you?.  I might cover that in some other post).
In your case, the chosen RC time constant is a lot larger than what I'd played with, but that's not hugely significant.

You've mentioned you're experiencing 'issues' with current limiting if you attempt to set a fairly low current limit.  I came to the same conclusion and that's why I started 'playing' with LTSpice in the first place...  Let's use your LTSpice '.asy' as our reference circuit.
In the circuit, you're feeding in 15mV as your Current_Ref (and thus you're 'expecting' current to be limited to 15mA).  Your Voltage_Ref input is 10V so you've set the desired CV output to 10V.  You've placed a 1ma load (I1) on the output, and, as it is, the circuit happily tries to push 10v @ 1ma through your output load. However.... There's still some 'gotchas' in there.  And here's my 'findings' in no specific order.
1: With your simulation set to run for 100mS (.tran 100ms startup), the voltage reference input to U1 is not quite 10V yet.  (C5 is still charging up a tiny last bit).  Instead of the expected 10V reference, you've effectively got a 9.9981157V reference after 100mS).  I'm first to admit this is 'bugger all', but I still thought I should mention it.  After initially adding a similar RC circuit on my version, I ripped it out again on future simulation runs to avoid adding in 'creeping errors'.  (It's quite probable that the RC circuit WILL be in my final design as a 'poor mans DAC', but I wanted to eliminate it in the design stage so I can aim for accuracy in the rest of the circuit).
2: Take a look at R24 (1k).  This resistor places a permanent 'load' on the output.  The current flowing through this 'load' is directly proportional to the output voltage.  (Basic Ohms law).  Since you're simulation is aiming at a 10V  output, this 1k load is effectively drawing 10mA from the supply.  That's not a huge problem other than one small detail.  This 10mA load is ALSO flowing through the 'current sense' resistor (R22).  You have also added the fixed 1mA load on the output (I1).  Therefore, between R24 and I1 we're drawing 11mA through our 'load sense' resistor.  That's gonna hurt accuracy in a HUGE way at low currents!  Luckily, there's quite a simple 'cure'.  Simply place the load sense resistor (R22) AFTER R24 in the circuit.
EDIT:  I just looked closer and noticed that the original preload resistor is still present at the right place - R21!  Why is R24 there at all in your circuit?
Also, it's important to realise that your R23 will inevitably form 1 leg of a resistive voltage divider with any other 'load'.  In your case, this would be through D6 and the output load (R24 + I1).  In order to minimise these errors, I'd use a MUCH smaller value for R23!  I'm guessing that your reason for including D6 is to speed up the discharge of C5 when you decrease the 'set' voltage.  Without D6 in circuit, C5 can only 'discharge' through the near infinite input impedance of U1 (truly negligible), or through R23.  I'd seriously consider dropping D6 altogether and lowering both R23 and C5.
For the rest of this post, I'm going to remove R23, C5 and D6 entirely and feed the voltage reference directly into U1 non inverting input. (Just trust me on this one for now).
3: Several posts back, I mentioned the need to replace a 1N4148 diode with a Schottky.  In your simulation, D2 is still the original 1N4148!  This REALLY needs to be swapped to a Schottky!  Change it to something like a BAT54 in LTSpice.  You'll be amazed!  (I think I ended up throwing in a 1N5819).
PLEASE make this change too as I'm using this 'mod' as an assumption in the rest of this post.
4: In my case, I wanted to drag out more AMPS than the original design intended.  However, the higher the output current, the higher the effective voltage drop across the 1 ohm current sense resistor (R22) and this equates to more 'losses' within the regulator.  Therefore, I dropped R22 from 1 ohm to 0.1 ohm but in doing this, I had effectively decreased my current set resolution.  Previously, using Current_Ref=1V would set a 1A current limit, but lowering R22 to 0.1 ohm meant that a 1V input would now set a 10A current limit.  That would have made things rather 'difficult' if I ever wanted to attempt setting current limit to mere mA!  But wait...  We already have U3 in there as a current sense anplifier set to unity gain in the circuit. By simply replacing R17 and R19 with 10k resistors, we can bump up the gain from 1 to 10 thereby restoring our 1V = 1A reference.  (After a LOT of simulation runs, I came to the conclusion that 10005 ohm is the 'ideal' value for these two resistors.  This is within 0.05% of 10k, so I'm not going to be TOO anal about it.  I think the additional 5 ohms would simply help to overcome the input offset voltage of U3).
5: I see in your simulation, you've set the current reference to 15mV (and therefore, an intended current limit of 15mA).  If you look at the current going through the sense resistor (R22), you'll see that it's below this threshold, and therefore, the regulator is in 'constant voltage mode'.  However, if I change the Current_Ref input down to 5mv (i.e. 5mA current limit), things become a little messy.  The voltage across the 1 ohm sense resistor (R22) only reaches 1.5863mV instead of our expected 5mV!  Weird huh?  However, the OUTPUT of the U3 current sense amplifier manages to reach 6.2709mv!!!  "Houston, we have a problem!".  If we feed X volts into a 'unity gain' amplifier, we _EXPECT_ to get X volts out of it right?  Well, kinda...  U3 is NOT 'ideal'.  It's got an input impedance, an output impedance, an input offset voltage and an input offset current.  All such things conspire against us, and they really become 'visible' once we start reaching the limits of our chosen devices.  Soooo... What can we do about this 'issue'?  In this case, neither the input / output impedance of the op-amp nor the input offset current (which is a few nano amps) define the limit we've hit.  It's almost exclusively the input offset voltage causing us grief!.  Since it's always been my intention to 'program' my supply with a microcontroller as opposed to simple pots, it's not difficult to 'calibrate out' such discrepancies.  As far as I know, the input offset voltage of an op amp is fairly consistent across the entire input range (perhaps not so much when it's close to either output rail though... LOL).  In your circuit, 1.58632mA through the current sense resistor is creating a U3 output of 6.27168mV when we EXPECTED it to produce 1.58632mV!  If we simply feed in those few extra mV into the current reference amplifier (U2), we can 'null out' the discrepancy.  If we then take a look at the opposite end of the scale (i.e. at the higher output current limits), we find that a similar absolute 'offset' in our Current_Ref input brings improved accuracy.  In my design, I've increased the gain of the current sense amplifier from 1 to 10 (along with making the current sense resistor 1/10 the value) and I think this causes a corresponding gain of the input offset voltage.error on the U3 output.  The corresponding microcontroller 'calibration' of the Current_Ref input dramatically improves the accuracy at low current limits.  IIRC, I needed somewhere around 19mV of Current_Ref 'bias' to be added by the microcontroller).
6: There's a few components in the original design that have me mildly perplexed.
6a: D1 is an LED and as far as I know, an LED needs a few volts before it begins to emit (circa 2.1V for a normal red LED).  Given the load of base-emitter junction of Q9 in conjunction with 68 ohm R10, I cannot see how this would EVER illuminate.  Why bother having it there at all?
6b: I'm sure there's a reason for R30 (470ohm) and R11 (4k7), but I cannot determine it.  I don't have them on my design and it seems to be reasonable in LTSpice.
6c: I note that you're using a 1N5822 for D3.  I moved this diode to the OTHER side of the current sense resistor, and used a MBR20100CT instead.  (The 'other' diode in the pack serves to 'protect' the supply from a 'car-battery-in-reverse' connected to the output.  The voltage sense pickup is, of course, placed AFTER the diode to keep it accurate.  (I really should throw an output fuse in there too... LOL)
6d: Perhaps the most significant change I made was to move away from an LDO regulator design to a STANDARD regulator (NPN as the series pass transistor - a darlington pair to be accurate).  Something like a TIP142 or MJ11032 (I think that's the correct parts?) were installed instead of R9, R10, Q9 and Q8).  The MJ11032 in a TO3 is 'rated' for 300W Pd (which is WAY more than I'd ever need).  The downside of a standard regulator is an increased 'dropout' voltage.  Instead of Vce(sat) of the PNP series pass transistor in the LDO design, it increases be 2 * Vbe volt drops to become 2*Vbe+Vce(sat).  This is NOT a concern for me as I'm not running it from batteries!
6e: The next issue faced on ANY linear supply is that the series pass transistor must 'dissipate' quite a lot of power.  With an input voltage of V(in), an output voltage of V(out) at a current of I(out), our series pass transistor is forced to dissipate (V(in)-V(out))*I(out) as heat.  It's quite common on lab supplies to use several transformer output taps to keep this heat dissipation within the SOA of the transistor.  In my design, the source voltage comes from a modified SMPS PC PSU and the microcontroller can instruct the PSU to supply a nominated voltage as input.  Therefore, this will keep the dissipation to a minimum and thus my heatsinking requirements.

I cannot think of much more at the moment.  When I get back to working on my version, I'll post up the specifics here.  (I have a different 'project' that has 'jumped the project queue'.  I want to go and melt some plastic! (i.e. A 3d printer).
 

Offline Thor-Arne

  • Supporter
  • ****
  • Posts: 503
  • Country: no
  • tinker - tinker, little noob.....
Re: General Purpose Power Supply Design
« Reply #318 on: May 12, 2013, 10:00:02 am »
First, my motivation for modifying the original design to use a single transistor was that I had all these parts available, and I could get away without the balancing resistors (R1 to R8). I then could build the circuit on a pref board to verify my findings in LTspice (I started using LTspice with this design).
Also, since the design is based on being hooked up to a tracking pre-regulator, the drop in the transistor will be only 2-3 volts and the dissipated heat is no problem.

Second, my knowledge of these designs is more or less none existent. But I've learned a lot during this so far, and I probably learn a lot more before this is finished.  :P

I find this design very interesting since is supposed to be very low cost and expandable by adding more boards if one needs more current, also the use of PNP transistors is interesting. I think this is the first design I've seen with PNP pass transistors.

The RC network (R23, C5 & D6) was added by Amspire to compensate for a overshoot in the first Mark-III design, I based my variant on that one. For some reason I can't find that post anymore, have we lost some post in this thread perhaps?

I have been tweaking the values a bit from the original design since I use other parts.
Amspire commented that much of my oscillating problems comes from using slower transistors, if I can get it stable I can live with slower responses.

R24 is entirely my fault, it is in the original Mk3 design and I forgot to remove it when I put in the load.  :-[

Removing R24 and changing D2 to a 2N5819 did some wonders with the simulation, the "error" is now 5 mV which can easily be calibrated away in the mcu. Thanks for pointing those out.  :)

The LED is confusing me to.....  :-//

I think I need to play around a bit more with this in LTspice, if I discover some other issues I'll post it.  ;D
 

Offline vieirae

  • Newbie
  • Posts: 3
Re: General Purpose Power Supply Design
« Reply #319 on: May 12, 2013, 05:17:12 pm »
Dear fellow bloggers
I've looked at Dave's RevC as well as the whole design development and find the idea of a battery powered voltage source with current regulation fantastic. I'm a newbie in electronics but would have one question/idea: would it be possible to implement the additional functionality of a simple function generator (square, sine, and triangle wave) with adjustable frequency (0.1 to ??KHz) with voltage and current control?
It seems there would be some room for a smaller board above the mainboard next to the two batteries in the box. Dave was also talking about going to surface mounting which could then maybe even spare some room for this on the mainboard. This would be the ideal tool/project for a beginner and the additional circuitry doesn't seem to be too expensive (http://www.loetstelle.net/projekte/xr2206neu/xr2206neu.php (sine) or http://electronicsclub.info/555timer.htm (square)).
 

Offline Thor-Arne

  • Supporter
  • ****
  • Posts: 503
  • Country: no
  • tinker - tinker, little noob.....
Re: General Purpose Power Supply Design
« Reply #320 on: May 12, 2013, 05:31:52 pm »
It's is possible to modulate the output by modulating the Voltage_Ref input, how clean output this would produce is a different matter. As far as I can see in the circuit it is intended to produce a as stable as possible output, and modulating can introduce some side effects.

I suggest you try in LTspice and see how clean output you can get, and what frequencies it can handle.
 

Offline TheRevva

  • Regular Contributor
  • *
  • Posts: 87
Re: General Purpose Power Supply Design
« Reply #321 on: May 13, 2013, 12:00:33 am »
Incorporating a completely INDEPENDENT function generator within the same physical box _IS_ possible.
Whether it SHOULD be included in the same box is another question entirely (and it perhaps best left up to the individual).

However...
Trying to COMBINE the two devices as mentioned by Thor-Arne would be rather a BAD idea IMNSHO.
The design of the linear regulator intentionally includes some 'f'iltering' (and this circuitry helps to transition the whole design to the desired 'unconditional stability').
The RC networks surrounding the current reference op-amp (U2) and voltage reference op-amp (U1) form one aspect of this filtering.
The 10uF capacitors on the output also act to filter out almost any form of oscillation.

Unless you're wanting a function generator that's limited to maximum frequencies of perhaps a couple of Hz, I would suggest it's NOT a great idea to 'modulate' the VRef input.

Footnote:
I _have_ seen power supply designs that look remarkably similar to the design of a traditional Class-A amplifier (and have an effective 'bandwidth' that could be suitable for a low-frequency function generator).
In THIS (fringe?) case, it might be more 'practical' to consider modulation of the VRef input in order to create a genuine 'dual-use' device.
The (Amspire based) devices described in this thread are quite some distance away from a traditional Class-A amplifier and therefore, I'd recommend against 'morphing' it into a function generator.
 

Offline TheRevva

  • Regular Contributor
  • *
  • Posts: 87
Re: General Purpose Power Supply Design
« Reply #322 on: May 13, 2013, 01:21:16 am »
Grrrr, the forum just glitched on me and in the process I 'lost' the response I'd typed... <Hehe>

Hi (again) Thor-Arne,
First off, I should point out that I am FAR from being an EE (let alone a competent one...).  I'm merely a senile 'hobbyist' so we're both playing in the same 'paddling pool'..
This design was also my own 'baptism by fire' with LTSpice (and I do like what I've seen of it thus far!)
It appears that we're both using this design as a basis to 'self-learn'.

When Amspire started making comments about 'phase margin' in an earlier post, my eyes almost glazed over, but I'm s-l-o-w-l-y getting there.  (I _did_ mention the senility didn't I? <Grins>)
You've correctly pointed out that this design was 'intended' to be used with a tracking pre-regulator, so yes, the drop across this regulator _should_ be handled 'externally' to this circuit (and thus a lot of the power dissipation issues in the series pass transistor that entails).
I never saw the post from Amspire talking about overshoot (although I definitely experienced the same 'issue' within LTSpice and came to a similar conclusion).  Basically, the voltage reference amplifier (aka error amplifier) is somewhat s-l-o-w to respond (limited bandwidth), and therefore it commands the regulator to be a little 'overactive' at switch on.  By allowing the voltage reference input to effectively 'ramp up' through a simple RC filter, it overcomes the problem, but in doing so, it makes the regulator fairly s-l-o-w to reach the set voltage.  In your LTSpice example, it's taking several tens of milliseconds to ramp up.  My preference is to increase the effective open-loop bandwidth  of the regulator allowing any such ramp-up period to be much shorter.  The additional diode in your circuit is there to assist with discharging that capacitor when the voltage reference input is dropped, but I'm not sure I approve of discharging it directly into the output load bypassing any current regulation.
I can understand Amspires comment about your use of s-l-o-w-e-r transistors, and to be honest, I'm fairly sure my darlington NPN version is probably even slower!  Something I am seriously looking into is a concept I've 'borrowed / stolen' from a different design - http://gerrysweeney.com/fully-programmable-modular-bench-power-supply/.  Gerry elected to include a limited amount of 'local feedback' around the series pass regulation and this looks promising to me.  (I also like some of the other concepts of Gerry's design too.  For example, he has included basically a 'Kelvin type output which helps to eliminate any cable resistance between the supply and whatever it's powering.  i.e. There's an additional pair of 'sense' leads at the output than can optionally be used).
Anyway, have fun and learn heaps (I know I'm sure doing both!)
 

Offline Thor-Arne

  • Supporter
  • ****
  • Posts: 503
  • Country: no
  • tinker - tinker, little noob.....
Re: General Purpose Power Supply Design
« Reply #323 on: May 13, 2013, 08:28:53 am »

I _have_ seen power supply designs that look remarkably similar to the design of a traditional Class-A amplifier (and have an effective 'bandwidth' that could be suitable for a low-frequency function generator).
In THIS (fringe?) case, it might be more 'practical' to consider modulation of the VRef input in order to create a genuine 'dual-use' device.
The (Amspire based) devices described in this thread are quite some distance away from a traditional Class-A amplifier and therefore, I'd recommend against 'morphing' it into a function generator.

I have seen simple function generators using the LM386 audio amplifier chip as output stage, that's a better way to approach a function generator with a little higher output power than trying to modulate a psu. However, that belongs in another thread.
 

Offline Thor-Arne

  • Supporter
  • ****
  • Posts: 503
  • Country: no
  • tinker - tinker, little noob.....
Re: General Purpose Power Supply Design
« Reply #324 on: May 13, 2013, 08:58:20 am »
I think I mentioned in an earlier post that I'm doing this psu to learn, and I have quite a long way to go.  :P
Doesn't hurt to have more psu's either. In fact I have another psu project I'm working on to, but that's a bit stalled since I'm trying to figure out all the modifications done to that circuit.  |O

I still haven't grasped the phase margin, but I'm slowly getting there.
The basic operation of this design is quite easy to follow, the parts used is a completely different matter. I suppose the need for "fast" transistors comes from the use of PNP pass-transistor, the reason why I shouldn't use something slow as a MJE2955 is a bit unclear at this point. To my (lacking) knowledge a slower transistor should be usable if the other parts is changed accordingly, which is another reason for putting together a version with other parts.
I might try some small signal transistors in a other version, but  I really wanted to get away from the 0.2 ohm balancing resistors. We'll see when I get some time to play with that.

I think some posts is missing, I'll attach LTspice files for the two versions of the Mark-3 design so you can see the differences.

I'll  take a close look at the design you linked, perhaps I'll make that one to.  ;D
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf