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

0 Members and 1 Guest are viewing this topic.

Offline markus_b

  • Regular Contributor
  • *
  • Posts: 115
  • Country: ch
Re: General Purpose Power Supply Design
« Reply #25 on: March 21, 2012, 11:03:28 am »
BTW, I'm not sure why everyone thinks my supply is locked into using the "exotic" LT3080. You can substitute for an LM317...
Actually I don't consider the LT3080 as exotic, you can get it at all the big distributors. It may be less common as a LM317, but it contributes greatly to the simple and elegant design. It may be somewhat more expensive that a discrete circuit, but has the great advantage to work reliably, be robust (thermal protection) and to be easy to use.

Markus

A good scientist is a person with original ideas. A good engineer is a person who makes a design that works with as few original ideas as possible.
 

Offline amspireTopic starter

  • Super Contributor
  • ***
  • Posts: 3802
  • Country: au
Re: General Purpose Power Supply Design
« Reply #26 on: March 21, 2012, 11:54:47 am »
I think people may not get how brilliant and revolutionary Dave's concept is. We are totally used to hand held meters, but we are still stuck to the idea that a power supply has to be anchored to a wall socket on the bench, and the idea that you do development on the bench, rather then the place the design is actually going to be used - whether that is on the roof, half way down a canyon, in the car, on a boat or wherever.

If a supply efficiently uses the energy in a lithium battery, the supply can easily last for days powering a typical modern low power circuit. Given that, why would you want a power cord at all?

Just on the battery part.
I started out with the idea for 3 x 18650's because that's what I fitted in the small case, and I wanted maximum capacity.
Then I dropped to 2 x 18650's because it was cheaper/easier on the charging side.
Now I think I'll be dropping it to 1 x 18650 (or optional larger cell) and going with a proper robust charging solution that gets maximum life out of the cell and better handles the ability to charge and power the supply at the same time. It also adds the USB charging feature back.
The idea is that it's a mains supply most of the time, but when you need it portable, just disconnect and it's ready to go for a few hours or days depending upon the load.

Maybe that belonged in the other thread, but oh well...

Dave.

I think one cell is plenty myself. If you think about it, debugging an arduino with some attached accessories is probably going to draw 100mA max at 5V. Even if you were debugging for the whole day, you are not going to flatten the battery.

Even at 20V and 1A, you will probably get over 15 minutes and that is enough for a quick test. If you want longer, you are going to plug in the charger anyway.

To me, power supplies are something you build, and then you keep using it for the next 30 years. It will go through lots of batteries in that time, so replacing one cell is much better then replacing two or three.
 

Offline amspireTopic starter

  • Super Contributor
  • ***
  • Posts: 3802
  • Country: au
Re: General Purpose Power Supply Design
« Reply #27 on: March 21, 2012, 12:03:47 pm »
I am close to a simpler MOSFET design that does scale really well. The problem I have now is picking some MOSFETs to focus on. There once was a time when there were only about 20 common MOSFETs and life was extremely simple. Now the numbers are ridiculous.

Yup.
Is the world better or worse off as a result? Sometimes I'm not sure...

Dave.
I need to look for the low turn-on voltage MOSFETs, but it doesn't seem to be one of the search parameters on Digikey. I might have to plow through millions of data sheets. Some MOSFETs, I can run with a power supply as low as 3.5 volts to get 1A out. Others need a 5V supply just so the MOSFET gets enough gate drive to turn on.

If anyone knows some good low turn-on voltage P channel MOSFETS with a voltage rating of 20V or more, please make some suggestions.

The design I am working on scales, so anything from 2A to 20A or more is great.

Richard.
 

Online ejeffrey

  • Super Contributor
  • ***
  • Posts: 3709
  • Country: us
Re: General Purpose Power Supply Design
« Reply #28 on: March 21, 2012, 12:15:03 pm »

I started out with the idea for 3 x 18650's because that's what I fitted in the small case, and I wanted maximum capacity.
Then I dropped to 2 x 18650's because it was cheaper/easier on the charging side.
Now I think I'll be dropping it to 1 x 18650 (or optional larger cell)

I like single cell a lot.  You can easily parallel 2 or 3 cells to get more capacity if needed without changing the circuit at all, or replace it with a prismatic LiPo.
 

Offline EEVblog

  • Administrator
  • *****
  • Posts: 37716
  • Country: au
    • EEVblog
Re: General Purpose Power Supply Design
« Reply #29 on: March 21, 2012, 12:31:32 pm »
I think one cell is plenty myself. If you think about it, debugging an arduino with some attached accessories is probably going to draw 100mA max at 5V. Even if you were debugging for the whole day, you are not going to flatten the battery.

Even at 20V and 1A, you will probably get over 15 minutes and that is enough for a quick test. If you want longer, you are going to plug in the charger anyway.

That's what I thought. Battery capacity is always going to be a tradeoff regardless of what size.
One cell will provide some decent usable time for most loads, and those who want bigger capacity can hack in a bigger cell without any mods. Not that choices in bigger cells are that great, but they exist.

Dave.
 

Offline amspireTopic starter

  • Super Contributor
  • ***
  • Posts: 3802
  • Country: au
Re: General Purpose Power Supply Design
« Reply #30 on: March 21, 2012, 02:35:21 pm »
Here is where I am up to with a mark II design using a P channel MOSFET.

This is just the regulator minus current limit and voltage booster. It is almost great. It will let you plug in different MOSFETs and different PNP driver transistors without affecting stability.

If you have a MOSFET that can turn on at 2V gate voltage, you can run it with a supply as low as 3V. For 5V and over, the dropout voltage is less then 1 volt.



It is close but not perfect. The combinations of the two RC time constants is somehow allowing a damped resonance around about 200KHz. I haven't started to analyse why yet, but it needs to be eliminated. Otherwise you might attach it to a 200KHz switching regulator load, and the power supply may decide to join in the party with a bit of 200Khz sinewave output.

Otherwise, I couldn't be happier with the loop phase performance. The fact you can easily change the MOSFETs means it is really easy to change this from a 1A supply to a 100mA supply or a  5A supply (or more). With a change to the overvoltage circuit, it could output up to 30V. The only thing you need to change is the current sense resistor. It can be used with PCB mounted FETS and a switching preregulator, or with mosfets on a heatsink as a conventional linear power supply.

Notice I am sticking with the LM324. Basically, it is just a good chip, and I would have to look long and hard to find something that was better in general. It allows the voltage on the inputs to go to +32 volts (even with the supply off), and that allows design choices that many of the new rail-to-rail opamps do not allow. The input can operate at the zero volts supply rail, and with the aid of either a pull up resistor or a pull down resistor, you can get the opamp output to operate to either one of the rails.

Richard.

« Last Edit: March 21, 2012, 02:49:25 pm by amspire »
 

Offline A Hellene

  • Frequent Contributor
  • **
  • Posts: 602
  • Country: gr
Re: General Purpose Power Supply Design
« Reply #31 on: March 21, 2012, 06:17:55 pm »
Kudos, Richard! A linear regulated PSU design, based on plain parts is a brilliant idea!

Thanks to Dave's LT3080 PSU, I begun experimenting to roll out an LT3080 based upgrade for my ancient '723 based PSU, only to find out that almost not one distributor has the LT3080 in TO-220 package available in stock! Which made me once more realise not to rely my designs on so exotic components. I guess that now I have run out of excuses not to be looking into solutions with more conventional parts. But, again, hunting down sub-millivolt/milliamper accuracy forces one to use these less than 1 LSB INL 16-bit digital parts. Oh, well...

On the concept of using MOSFETs at the power stages, I think there is a major drawback: No matter how much I love these parts, the problem lies at the fat gate the beefier parts have, which holds a substantial amount of charge and needs a full blown half bridge driver for the fast charge/discharge of the gate capacitance and to race against the Miller effect --especially when the voltage rises. Using the more flexible N-channel parts makes the design even more complex. Though I've found parts electrically suitable for my needs, the TrenchFets for example, the bad news is that they come in not so heat-sink-friendly packages. Once more, I realise that one can never have it all...


-George
Hi! This is George; and I am three and a half years old!
(This was one of my latest realisations, now in my early fifties!...)
 

Online BravoV

  • Super Contributor
  • ***
  • Posts: 7547
  • Country: 00
  • +++ ATH1
Re: General Purpose Power Supply Design
« Reply #32 on: March 21, 2012, 06:46:53 pm »
Richard, took a liberty to redraw the mosfet version since you didn't provide the .ASC, and I made it more representative to myself, hope you don't mind.  The ltspice circuit zipped file attached below.

I'm using the internal ltspice built-in linear op-amp LT1014 instead of LM324, although I have this model myself, decided to ease other member who doesn't have the LM324 model, and can just load this circuit and run it with the standard untouched LTSpice installation.

Btw, LT1014 is the "cross reference" part of LM324. :D

Also I did some tinkering on voltage source at 12 volt with 100mv ripple at 200Khz and with a dynamic load with square wave 50Khz at 100mA.

The circuit, pardon for the color scheme, its just I love dark background.  :P




The result on load current, source voltage and the regulated output at the bottom




Zoomed


« Last Edit: March 21, 2012, 06:56:20 pm by BravoV »
 

Offline amspireTopic starter

  • Super Contributor
  • ***
  • Posts: 3802
  • Country: au
Re: General Purpose Power Supply Design
« Reply #33 on: March 21, 2012, 11:37:12 pm »
BravoV, great simulations. Sorry I didn't post the LTSpice files but it was late. Next time I pust a spice file, I better rememebr to add the LM324 files as well, but it looks like the LT1014 does behave pretty similarly.

You got me all excited as it has fabulous offset voltage. Then I saw it doesn't allow the +30 volts on  the inputs, regardless of the opamp supply voltage. The LM324 has these crazy PNP input transistors with a reverse breakdown over 30V. I wish I could buy discrete transistors like that.

The simulation all makes sense. You put in 0.1 ohms for the filter capacitor ESR. If you use low ESR ceramics, you can get down to 0.1 ohms ESr, and the output becomes hugely better. The 200KHz feedthrough and the output transients are much smaller. But there is a cost. If you have 30volts  across 0.01 ohm ESR caps and you short them, you can get a massive discharge current. The only saving you from 3000 amps peak would be various inductance in the circuit, and the lead resistance.

In your simulations, there is a startup issue, so I will have to see what is happening.

All in all though, your results make sense and I think they are reasonable results. I hope to improve the performance at 200KHz, but it does not look too bad. A LC filter between a 200kHz switcher and the supply would wipe out any signifigant 200kHz on the output. The performance is only slightly worse then the LT3080.

Richard.
 

Offline amspireTopic starter

  • Super Contributor
  • ***
  • Posts: 3802
  • Country: au
Re: General Purpose Power Supply Design
« Reply #34 on: March 22, 2012, 12:14:57 am »
On the concept of using MOSFETs at the power stages, I think there is a major drawback: No matter how much I love these parts, the problem lies at the fat gate the beefier parts have, which holds a substantial amount of charge and needs a full blown half bridge driver for the fast charge/discharge of the gate capacitance and to race against the Miller effect --especially when the voltage rises. Using the more flexible N-channel parts makes the design even more complex. Though I've found parts electrically suitable for my needs, the TrenchFets for example, the bad news is that they come in not so heat-sink-friendly packages. Once more, I realise that one can never have it all...

George, I am aware about the Miller effect. In the context of this supply, the only time it causes a big problem is if the supply is on, say, 30V out and you then short the output. The Miller effect would cause the gate voltage to increase by 1 to 2 volts. The results then depend on whether you chose a 200 milliohm mosfet or some 1 milliohms monster. The 200 milliohm mosfet might go from 1A to 8A for a few microseconds. The monster mosfet could go to hundreds of amps. either one though could drag the source supply down, and since this is for a single supply design, it affects all the opamps, micro's, etc. I have some idea that I will investigate when I get onto the current limit for this design.

The simplest solution may be to stick with high resistance-low capacitance MOSFETS, and then adding an extra 1nF capacitor across the gate. If you have a MOSFET with a 10pF reverse capacitance, and you short out the 30V output, the gate voltage would only rise by 0.3 volts for a few microseconds with a 1nF gate capacitor, and the peak current will not be too bad. I can also reduce the 1000 ohm gate resistor to 100 ohms at the expense of an extra 27mA of wasted current, and it would reduce the Miller Effect surges on shorts to a few hundred nanoseconds. Perhaps then a tiny bit of inductance to wipe out the surge, and it is then totally fine.

I will probably try the PNP pass transistor option as well. If you drive the base with a constant current, then a PNP will maintain that constant current when you short the output. There will be some Miller Effect to, but the high gain medium power transistors tend to have the gain plummet by the time you get to 2A, so the Miller effect just will not be a big problem.

I still thing the MOSFET solution is probably the best if I can sort out the rough edges, as the design can be extended in terms of current and power  far more easily then with the transistor options. There are not a huge number of high gain transistors, and they are limited to up to about 2A. Low gain power transistors mean either using a darlington arrangement or a driver transistor that has to be on a heatsink to cope with the power at maximum voltage out. Darlingtons tend to be bad for saturation voltage, base voltage, speed. Not great for low dropout designs where you are running the transistor near saturation.

AcHmed99, those MOSFETs are exactly the kind you are best staying away from.  Low resistance is just no advantage for a linear supply as you need resistance to regulate, and the low resistance comes with absolutely massive gate and output capacitances. The buffer IC is not much use either. It is not a great buffer for analog anyway, but anything you add between the opamp and the MOSFETs will mess up the compensation.

Richard.
 

Offline amspireTopic starter

  • Super Contributor
  • ***
  • Posts: 3802
  • Country: au
Re: General Purpose Power Supply Design
« Reply #35 on: March 22, 2012, 03:52:26 am »

AcHmed99, those MOSFETs are exactly the kind you are best staying away from.  Low resistance is just no advantage for a linear supply as you need resistance to regulate, and the low resistance comes with absolutely massive gate and output capacitances. The buffer IC is not much use either. It is not a great buffer for analog anyway, but anything you add between the opamp and the MOSFETs will mess up the compensation.

Richard.

I’m afraid I have to disagree with you there Richard. A buffer will add propagation delay hence phase shift but that is why you use compensation to compensate for phase shift through out the loop.

From my experience any extra delay you add double the complexity of stabilizing the loop.  What I am after is a loop that is stable enough that you can swap key transistors. FET's etc without need to re compensate. It works out the less you can have in the loop, the better. I guess it really comes down to putting it in a design  and testing it. Until it is done, it is just opinions.

Quote
Rdson is irrelevant in A FET regulator with the exception it determines drop-out. A fet can sets its rdson via gate voltage to anything virtually. What is desirable in a fet as a pass device is a gradually sloping transcoundactance curve vs a fast steep rise. This means that the fet gate will not be so touchy and less prone to oscillation.

It is not the Rdson that matters - it is the capacitance and the transconductance curves that go with it. My circuit as is can probably handle 1nF gate capacitance but that is probably as high as you want to go. You can get a lot of amps out of a device with a 1nF gate capacitance. Going to a device with 3nf or more gate capacitance is a problem for the circuit, and it doesn't do much for you unless you are trying to build a 50A linear regulator. The other thing, as I said was the added Miller Effect gate voltage when the regulator output is shorted from 30V to 0V instantly. If you are at 1A and you add 2V to the gate of a 0.2 ohms MOSFET, you might go up to 5A. If you add 2V on a 60A MOSFET, you might go very much higher.

It may be that I am thinking of .5A to 5A power supplies, and you are thinking much bigger.

But I do agree with your comments about the transconductance curves. The steep curves are adding gain and nonlinearity where I just do not want it.

One of the biggest problems is to minimize the low voltage dropout of the regulator, I need a low gate voltage MOSFET with guaranteed worse case specs. The manufactures love to be very vague with gate specs. They do tell you usually that you can get full rated current at 10V, but the rest is often typical specs. Ideally, I want a MOSFET where they spec a minimum current at 2V gate voltage and 1V source to drain voltage.

Quote
Mind you I could be wrong it’s been a while since I designed a linear reg from scratch but that’s my recollection from when I did. I will find out in another couple of weeks because I plan on using two of the N-FETS I linked to as pass devices in a 0-30V 220W regulator. I’m soldering together the second revision of the bias supply and PFC right now. Its being fed from a variable output half-bridge. So fifteen amps max current; low drop-out is required to keep the heat sinks reasonable.

I wouldn’t waste too much time simulating a FET regulator most models are switching models and do not model operation in the linear region with reliable accuracy.

Yes. Nothing beats real testing of a design. As I mentioned above, in my first design of this thread, I got a MJE3055 (TO220 2N3055) transistor to oscillate at 108MHz on the bench even though the transistor has a spec'ed FT of 70MHz. Spice was never going to tell me that.

Sounds like an interesting power supply you are building. How big are the input filter caps? If you are going for low dropout voltage, I suspect they are something impressive.

Richard.
« Last Edit: March 22, 2012, 03:57:16 am by amspire »
 

Offline amspireTopic starter

  • Super Contributor
  • ***
  • Posts: 3802
  • Country: au
Re: General Purpose Power Supply Design
« Reply #36 on: March 22, 2012, 04:26:02 am »
Here is a datasheet on an FET controller for LDO's. Some details are in it regarding gate capacitance and output capacitance.

http://www.ti.com/general/docs/lit/getliterature.tsp?genericPartNumber=lp2975&reg=en&fileType=pdf
Just went back and had a look at the link you posted. Very interesting. I will give it a read.

Looking at the waveforms, they don't seem worried by a bit of damped ringing after transients. A pity they didn't take the inverting amplifier out from the IC so you could use your own reference. 24V maximum input - not bad.

Richard.
« Last Edit: March 22, 2012, 05:09:57 am by amspire »
 

Offline amspireTopic starter

  • Super Contributor
  • ***
  • Posts: 3802
  • Country: au
Re: General Purpose Power Supply Design
« Reply #37 on: March 23, 2012, 12:06:02 am »
AcHmed99, we are probably at cross purposes here.

I am looking at a general purpose power supply, so I have to assume that the supply has to manage its current limiting without dragging down the source, even if it is only for a few microseconds. If I am designing a short circuit protected supply, I am designing for the case where someone puts a dead short across the power terminals. There may be There may be other stuff running of the regulator source, so I do not want a big glitch on the source - again, that is my design choice.

I just do not want a supply that cannot control the current through the MOSFET properly, so i will look for a solution.

I just did a spice simulation of the Miller Effect current spike. My source impedance was 0.1 ohms which is realistic for a capacitor across the source. Load was .01 ohma and I included a .1 ohms current sense resistor.

I picked a Fairchild FDS6675 mosfet 30V,  20 milliohms resistance.

With a 30V supply and 29V out at 1A, a short results in a peak current through the mosfet of 80 Amps for about 100nS. If you reduce the gate drive to .01 ohm, the peak current is 15 A. If I replace the mosfet with a 200 milliohm one, I get 55A peak with a 100 ohm gate source but with a 1 ohm gate source or less, it reduces to about 8 A peak. A bit better.

If I use a an old 2N2955 PNP power transistor fed by a high impedance constant current base drive, I get a 3.4A peak current on a short. That is more like the number I want to see in a general purpose design.

These numbers sound about right to me.

As far as the buffer is concerned, I just have to be convinced that a buffer with lousy crossover is good for analog. It still looks like a switching buffer to me. I have been experimenting with a Mark III design based around PNP transistors with a constant current base drive, and it might be the way to go. The only trouble is that compensation seems to be more transistor dependant then the MOSFET design.

Richard.
 

Offline amspireTopic starter

  • Super Contributor
  • ***
  • Posts: 3802
  • Country: au
Re: General Purpose Power Supply Design
« Reply #38 on: March 24, 2012, 01:20:47 pm »
How to turn four Arduino 8 bit PWM outputs into four independent D/A DC outputs with over 24 bits of monotonic resolution.

I am very close to a low cost power supply design I am really happy with. Different from the previous two, but I think the one I have now is the design I have been aiming at. Better then the Mark I and Mark II designs in many ways.

I have to thank AcHmed99. The discussions with him actually resolved some issue for me.

Anyway, I took a break from that to try out another idea. Going for the low cost solution, I wanted to drive the design from a PWM on something like an Arduino. Pwm is great in that it is totally monotonic which is something I really want in my design, but the resolution is lousy.  There is one 16 bit PWM, but that is still something like 0.5mV increments, if you are really careful about the scaling of the PWM output. The scaling will probably mean that full voltage out from the supply is only about 50% of full scale for the PWM.  I want software calibration, and I want to be able to finely adjust the output voltage so that I can get a 6 1/6 digit meter to show 10.00000 volts. That needs 20 bits of resolution or more.
 
I used the 8 bit PWM's in FAST mode, and correct for accumulated error every PWM cycle. I ran the Arduino's PWM at maximum speed of 32KHz. The filter was a 3 stage 10k/0.1uf RC chain. Two stages are not enough to clean out the sub mV ripple.  I am pretty happy with the results.

It means with some better coding, I should be able to get 4 independent PWM outputs with sub microvolt resolution.

Here is the code I used to test it, if anyone is interested.  Pretty rough - I only wanted to get it to work, and I would probably go to assembler in the interrupt routine to implement it properly.

Code: [Select]

unsigned long value ;
unsigned long pwm_accum ;

volatile int Sec2 = 0;

// Interrupt every PWM cycle - this is where all the magic happens

ISR(TIMER2_COMPA_vect) {
  digitalWrite(13, HIGH);   // set the LED on - just toggling this so I can see when the interrupt routine is running
  OCR2B = (byte) (pwm_accum >> 24) ;   // Send the top byte of the PWM error accumulator to the PWM for the next cycle.
  pwm_accum = pwm_accum - (((unsigned long) OCR2B) << 24 ) ;  // Subtract the byte sent to the PWM from the top byte of the PWM error accumulator.
  pwm_accum = pwm_accum + value;   //Add the intended value for the output to the error from the last cycle
  digitalWrite(13, LOW);    // set the LED off
}

void setup() {

  pinMode(3, OUTPUT);  //  PWM OCR2B
  pinMode(11, OUTPUT); // PWM OCR2A
  pinMode(13,OUTPUT) ;
  TCCR2A = _BV(COM2A1) | _BV(COM2B1) | _BV(WGM21) | _BV(WGM20);
//  TCCR2B = _BV(CS22);
  TCCR2B = 0x01;  //Full 16MHz click for the PWM
//  OCR2A = 180;
//  OCR2B = 255;
  value = 0L ;
  pwm_accum = value ;
  TIMSK2 = (1 << OCIE2A);   // Enable interrupt when Timer reaches OCRA
  sei();
}

void loop() {
 
  value = 0x08980000L; // Equals 0.1678466 volts )
}

The PWM is run in FAST mode at a 16MHz clock rate. There are some things I will need to discover like what can go wrong with a current PWM cycle when you change the PWM register. Even if every PWM cycle is not perfect, if I get a monotonic control output with no evident digitizing steps, no evident voltage fluctuations and as much resolution as the power supply regulator allows, I will be extremely happy.

It is much slower of course then a DAC. Small changes settle quickly, but a large change like from 0V to maximum would take about 1 second to settle properly.

To implement it properly, you cannot use the PWM straight out of the Atmel.  I would probably use a 74HC family non inverting buffer powered from a voltage reference to generate an accurate PWM output.

It may be that running the PWM at full speed adds to many errors due to hardware delay variations, and in that case, I will just slow the PWM down by a factor of 8. A better idea would be to use a high speed 74HC family synchronous flip-flop to reconstitute an accurately times PWM.

Back to the voltage regulator design. I will post it soon.

Richard.
« Last Edit: March 24, 2012, 01:32:17 pm by amspire »
 
The following users thanked this post: cellularmitosis

Offline Bored@Work

  • Super Contributor
  • ***
  • Posts: 3932
  • Country: 00
Re: General Purpose Power Supply Design
« Reply #39 on: March 24, 2012, 03:27:23 pm »
How to turn four Arduino 8 bit PWM outputs into four independent D/A DC outputs with over 24 bits of monotonic resolution.

Do you have a clock reference that good? A voltage reference that good? All other parts low drift, low tempco, etc.? Otherwise the LSBs will stagger around like a drunken sailor after a weekend of shore leave.

A 24 bit DAC with a 5V reference means you deal with approx. a 300 nV LSB, with a 3.3V reference the LSB is 200 nV. Is your opamp at the end of the RC filter that good?
I delete PMs unread. If you have something to say, say it in public.
For all else: Profile->[Modify Profile]Buddies/Ignore List->Edit Ignore List
 

Offline markus_b

  • Regular Contributor
  • *
  • Posts: 115
  • Country: ch
Re: General Purpose Power Supply Design
« Reply #40 on: March 24, 2012, 05:42:49 pm »
I find a 12 bit resolution plenty. Allows for 0-40V in 10mV steps. This is in the same league as the 0.1% resistors specified by Dave. 24bit is equivalent to 0.1 ppm, way out of my league certainly not in a low cost design.
Markus

A good scientist is a person with original ideas. A good engineer is a person who makes a design that works with as few original ideas as possible.
 

Offline amspireTopic starter

  • Super Contributor
  • ***
  • Posts: 3802
  • Country: au
Re: General Purpose Power Supply Design
« Reply #41 on: March 24, 2012, 06:59:58 pm »
Don't confuse resolution with accuracy. I want the D/A resolution better the the supply noise, so there is no noticeable digitizing steps at all. I like using my supplies for lots a of things, including some precision work. So if a calibration instruction says "attach 18.0000 volts to the input, I like being able to fine tune the output so a precision voltmeter says "18.0000".

Why would I want to spend extra money for a DAC that could only adjust to 17.99863V, and was not monotonic, so for fine adjustment, it could drop a few mVs as you carefully wind up the voltage?

Richard.
 

Online IanB

  • Super Contributor
  • ***
  • Posts: 11849
  • Country: us
Re: General Purpose Power Supply Design
« Reply #42 on: March 24, 2012, 07:24:27 pm »
I used the 8 bit PWM's in FAST mode, and correct for accumulated error every PWM cycle. I ran the Arduino's PWM at maximum speed of 32KHz.

Can you give the high level summary of how you get 24 bit resolution from an 8 bit source? I'm not immediately grokking it. Does "correcting for accumulated error" imply some kind of measurement feedback on the output or is it purely a predictive algorithm? As I write this, I am wondering if you are dithering the output so that a combination of different 8 bit words averages out to 24 bit resolution?
 

Online BravoV

  • Super Contributor
  • ***
  • Posts: 7547
  • Country: 00
  • +++ ATH1
Re: General Purpose Power Supply Design
« Reply #43 on: March 24, 2012, 08:13:04 pm »
I want software calibration, and I want to be able to finely adjust the output voltage so that I can get a 6 1/6 digit meter to show 10.00000 volts. That needs 20 bits of resolution or more.

Don't confuse resolution with accuracy. I want the D/A resolution better the the supply noise, so there is no noticeable digitizing steps at all. I like using my supplies for lots a of things, including some precision work. So if a calibration instruction says "attach 18.0000 volts to the input, I like being able to fine tune the output so a precision voltmeter says "18.0000".

With the current discussion on the PWM -> VRef circuit, although I don't know crap about this, Richard, should your design needs quite an intensive adjustments & tunings to reach certain accuracies, just want to say I'm your backer here. Also since this project is aimed for one off DIY project or limited build anyway, even they're time consuming and possibly quite a hassle, they should not be a deal breaker for diy community.

Unlike Dave's design, of course its different story since it will be made into mass produced product, tuning & adjusting manually could be a headache for him.

Eagerly to see the upcoming stages of your design.

Offline amspireTopic starter

  • Super Contributor
  • ***
  • Posts: 3802
  • Country: au
Re: General Purpose Power Supply Design
« Reply #44 on: March 24, 2012, 08:40:32 pm »
The output of the 8 bit PWM corresponds to about 100mV steps on the output.

Let's say I want 1.05 V out. I get this by outputting a 1v pulse, then a 1.1v pulse and repeating this. Average the result and you get 1.05 V. So I am actually adding a software controlled PWM to the output of the hardware PWM. The value I want is stored in a 32 bit register, and the software will correctly modulate the hardware PWM to get an average pulse width value that exactly mathematically equals that 32 bit number - as long as you average over about 10 minutes.

The algorithm is very simple. First PWM output, it takes the 1.05 V and rounds it down to the nearest 100 mV step - or 1 V. It then adds the .05 V error to 1.05 to give 1.1 and repeats the algorithm. This time it outputs a 1.1 V pulse.

The end result is you can have as much resolution a you want, as long as the filter averages over enough PWM pulses. You just pick a good compromise between speed and resolution, and you can always add a electrolytic cap on the power supply output if you needed more resolution.

I will probably pick a filter that will result in about a 22 bit resolution, and will settle reasonably quickly.

Richard. 
« Last Edit: March 24, 2012, 09:43:45 pm by amspire »
 

Offline amspireTopic starter

  • Super Contributor
  • ***
  • Posts: 3802
  • Country: au
Re: General Purpose Power Supply Design
« Reply #45 on: March 24, 2012, 08:58:43 pm »
BravoB, thanks for the encouragement. I am trying to make something ready cheap that had decent performance.

If it is cheap enough, you can afford to build several, and then use them in parallel for more current, or series for more voltage. If I can work out a master-slave system, then you could build $20 slave supplies that just follow the master.  Slaves would not need a control panel.

The actual regulator board would be well under $5 for parts excluding the PCB, and could be used as a general purpose module in other projects.

Richard.
 

Online ejeffrey

  • Super Contributor
  • ***
  • Posts: 3709
  • Country: us
Re: General Purpose Power Supply Design
« Reply #46 on: March 24, 2012, 09:11:45 pm »
I used the 8 bit PWM's in FAST mode, and correct for accumulated error every PWM cycle. I ran the Arduino's PWM at maximum speed of 32KHz.

Can you give the high level summary of how you get 24 bit resolution from an 8 bit source? I'm not immediately grokking it. Does "correcting for accumulated error" imply some kind of measurement feedback on the output or is it purely a predictive algorithm?

It is a first order sigma-delta loop implemented in software.  You accumulate the error due to the finite resolution of your DAC and add that back into the output.  What this means is that if your ideal final value is halfway between two possible output values the DAC will alternate between those values.  This pushes noise to high frequency, but if you don't need the bandwidth you just put a bit of extra filtering and win.  This works with any DAC, but better with intrinsically linear devices like PWM.
 

Online IanB

  • Super Contributor
  • ***
  • Posts: 11849
  • Country: us
Re: General Purpose Power Supply Design
« Reply #47 on: March 24, 2012, 09:55:22 pm »
The output of the 8 bit PWM corresponds to about 100mV steps on the output.

Let's say I want 1.05 V out. I get this by outputting a 1v pulse, then a 1.1v pulse and repeating this. Average the result and you get 1.05 B.C. So I am actually adding a software controlled PWM to the output of the hardware PWM. The value I want is stored in a 32 bit register, and the software will correctly modulate the hardware PWM to get an average pulse width value that exactly mathematically equals that 32 bit number - as long as you average over about 10 minutes.

The algorithm is very simple. First PWM output, it takes the 1.05 V and rounds it down to the nearest 100 mV step - or 1 V. It then adds the .05 V error to 1.05 to give 1.1 and repeats the algorithm. This time it outputs a 1.1 V pulse.

The end result is you can have as much resolution a you want, as long as the filter averages over enough PWM pulses. You just pick a good compromise between speed and resolution, and you can always add a electrolytic cap on the power supply output if you needed more resolution.

I will probably pick a filter that will result in about a 22 bit resolution, and will settle reasonably quickly.

Interesting. I note the sigma-delta algorithm that ejeffrey mentioned, but I think this can also be looked at mathematically.

Suppose I have a 24 bit value that I want to output over an 8 bit analog channel. I can break the 24 bit word into three 8 bit bytes, the most significant (MSB), intermediate (ISB), and lowest (LSB). To get the required interpolated result I have to output the MSB 65536 times per cycle (giving it a "weight" 2^16 times greater than the LSB), the ISB 256 times per cycle, and the LSB once per cycle. The total cycle length at 32 kHz is then about 2 seconds, meaning I need a low pass filter that rolls off everything above 0.5 Hz in order to recover the average steady value.
 

Offline amspireTopic starter

  • Super Contributor
  • ***
  • Posts: 3802
  • Country: au
Re: General Purpose Power Supply Design
« Reply #48 on: March 24, 2012, 10:08:04 pm »
It is a first order sigma-delta loop implemented in software.

Wow! I have a fancy name for what I am doing now. Thanks for the explanation.

Just so you know why I want the resolution. I have a Fluke 540A AC transfer calibration unit. You can use this to measure AC RMS values to 0.01%. It does this by thermally comparing the heat generated by the AC with the heat generated by an equivalent DC voltage. One of the things you need is a DC supply that can output over 10mA and can be adjusted to within 5uV for the lowest range of the 540A. A bit of ripple or noise down at 5uV does not matter and I can let the supply stabilize for an hour to reduce the opamp drift.

I currently do not have a supply that can do the job, so I hope this design will be good enough.

Old linear supplies with the potentiometers just cannot be adjusted with enough accuracy. The pots get noisy with age as well. With many digital supplies, you are lucky to be able to adjust to better then 1mV.

I could go all out and use auto-zero opamps, expensive references and thick film divider networks to make a variable voltage source that is inherently stable, but I would end up with something expensive and not generally useful. I actually like the LM324 with its weird 30V base breakdown voltage input transistors

Richard.
 

Offline Bored@Work

  • Super Contributor
  • ***
  • Posts: 3932
  • Country: 00
Re: General Purpose Power Supply Design
« Reply #49 on: March 24, 2012, 10:17:38 pm »
just want to say I'm your backer here.

You can back him as much as you like. Even with only 20 bits he is playing in 1ppm territory. A 1ppm/°C voltage reference is affordable these days. But with a 1ppm/1°C reference a 1°C temperature change in the case already ruins his LSB. Better, and you start to pay $50 or $100 just for the reference.

And then there is the long-term drift of the reference. Maybe 10ppm/1000h for an affordable reference. Here goes another digit.

Oh, and don't forget the load regulation of the reference. He needs to power the whole micro with that reference, and the micro's current consumption varies. But well, the reference might anyhow not be capable of supplying the micro. So it needs to be used as part of a voltage regulator. The whole voltage regulator needs to be ultra stable. Good luck building that.

The micro itself might also have a few nasty surprises up it's sleeve. E.g. there is no guarantee that the high and low output levels don't vary a little bit, depending on other active pins, active periphery, temperature and whatnot.

And until now we have just looked at the voltage reference and the micro. We haven't looked at the RC filter, the following buffer OpAmp, the power stage and whatever else is there. There is still a long way to got until to get that 1ppm voltage to the load.

In short, don't hold your breath.
I delete PMs unread. If you have something to say, say it in public.
For all else: Profile->[Modify Profile]Buddies/Ignore List->Edit Ignore List
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf