Author Topic: General Purpose Power Supply Design  (Read 160125 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 #175 on: April 25, 2012, 11:40:04 am »
Have to admit that right now, I am struggling with something else - the controls. I am not convinced that contact-switch based rotary encoder are reliable. The moment the contacts start bouncing, it is really hard to decode them reliably. I would love to find a cheap optical rotary endcoder.
There rotary encoder code has been discussed on the forum before. There is a simple and reliable code here: Buxtronix: Rotary encoders, done properly. The code is for Arduino, but translates to C easily.
Bounce is not a problem at all with that code, the state machine seems immune to simple bouncing. If implemented with simple polling, the polling speed determines the speed you can read the encoder, though.

On the other hand I've played with encoders with 18 steps/revolution and find that too granular, I suspect that the standard 24 step types are not fine enough yet for my taste. So a optical, high resolution encoder would be welcome.
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 amspire

  • Super Contributor
  • ***
  • Posts: 3782
  • Country: au
Re: General Purpose Power Supply Design
« Reply #176 on: April 25, 2012, 12:51:18 pm »
There rotary encoder code has been discussed on the forum before. There is a simple and reliable code here: Buxtronix: Rotary encoders, done properly. The code is for Arduino, but translates to C easily.
Excellent. I missed that discussion but the code is a big help.

I don't see why optical encoders based on the mouse optical encoders that must cost nothing can't be available in a front panel control mounting. They would almost last forever, rather then 20-30000 rotation cycles. But I will probably have to go with a mechanical one.

Do I go with a $1 Chinese one that lasts "30,000 cycles" ?? or a 200000 cycle Bourns one at $4-$5.  $5 will more then cover the costs of all the parts of the regulator circuit - with lots to spare.

Richard.
 

Offline BravoV

  • Super Contributor
  • ***
  • Posts: 7093
  • Country: 00
  • +++ ATH1
Re: General Purpose Power Supply Design
« Reply #177 on: April 25, 2012, 01:00:44 pm »
I don't see why optical encoders based on the mouse optical encoders that must cost nothing can't be available in a front panel control mounting.

Hey, that is a really cool idea, this will turned into nice thumb wheel with a push button too rather than ordinary knob style.

Time to search those old or broken mouses scattered somewhere in house.  ;D

Offline Leo Bodnar

  • Frequent Contributor
  • **
  • Posts: 771
  • Country: gb
Re: General Purpose Power Supply Design
« Reply #178 on: April 25, 2012, 01:50:11 pm »
Richard, I can't grasp what you are trying to design.

On one hand you are chasing sub-microvolt resolution that only makes sense if other equipment is of the same precision range (which means $$$.)
On the other hand you are dithering about using a $5 encoder.

Leo

Offline amspire

  • Super Contributor
  • ***
  • Posts: 3782
  • Country: au
Re: General Purpose Power Supply Design
« Reply #179 on: April 25, 2012, 02:30:17 pm »
Richard, I can't grasp what you are trying to design.

On one hand you are chasing sub-microvolt resolution that only makes sense if other equipment is of the same precision range (which means $$$.)
On the other hand you are dithering about using a $5 encoder.

Leo
I am going for really really cheap using the most common parts, but I want really really great performance. That is all I ask.

About the resolution, I want something like the old power supplies could do with the course/fine controls - but hopefully a bit better. They could easily be adjusted to better then 1mV, whereas a 25V supply with a 12 bit DAC can only be adjusted in steps of 6mV, or with more convenient scaling 10mV. That is a huge leap backwards. Accuracy doesn't matter since everyone will probably attach a DMM if they want an accurate voltage anyway.

To me, a supply should be adjustable to at least 10uV. That is a starting point. I am not interested in building a supply if it is not as good as the common supplies built 40 years ago.

The reason I am going for cheap is I am trying to build the kind of board that rather then just making one, you could make 5 or 10. I love parts costing less then 10c. Parts costing $1 will be very rare in this design.

I have a way the modules can be used in series in a master slave fashion so with 4, you get a 100V supply, or in parallel in a master slave fashion so with 5 modules, you get a 25V 5A supply. The slave boards do not need micro's. displays, etc, so the whole slave regulator board will be the PCB + under $10 in parts.

Richard.

« Last Edit: April 25, 2012, 02:36:36 pm by amspire »
 

Offline Leo Bodnar

  • Frequent Contributor
  • **
  • Posts: 771
  • Country: gb
Re: General Purpose Power Supply Design
« Reply #180 on: April 25, 2012, 02:56:03 pm »
Accuracy doesn't matter since everyone will probably attach a DMM if they want an accurate voltage anyway.
To me, a supply should be adjustable to at least 10uV. That is a starting point. I am not interested in building a supply if it is not as good as the common supplies built 40 years ago.
Parts costing $1 will be very rare in this design.
Does this mean your PSU will have less then 10uV of output noise and matching load regulation?  I can't see this built with sub-$1 parts.  Well, if it can be, I'd take my hat off. 

Leo

Offline amspire

  • Super Contributor
  • ***
  • Posts: 3782
  • Country: au
Re: General Purpose Power Supply Design
« Reply #181 on: April 25, 2012, 03:18:25 pm »
Accuracy doesn't matter since everyone will probably attach a DMM if they want an accurate voltage anyway.
To me, a supply should be adjustable to at least 10uV. That is a starting point. I am not interested in building a supply if it is not as good as the common supplies built 40 years ago.
Parts costing $1 will be very rare in this design.
Does this mean your PSU will have less then 10uV of output noise and matching load regulation?  I can't see this built with sub-$1 parts.  Well, if it can be, I'd take my hat off. 

Leo
Probably not, particularly with noise from micro's, and sometimes switching pre-regulators around. But as I said recently, you can add a big external cap if you want lower noise. Also many of the applications where you want the high resolution don't care much about noise. Say I want to set it to 10.00000V out using a precision DMM, so I can test other DMM's. The DMMs on the DC ranges can all handle low level noise without a problem.

With a 12 bit DAC based supply, you will end up with a voltage like 10.002625 and you have to mka e do with that.

And with the DAC, the power supply is not the only point. When I started playing with the idea, I though 1% accuracy would be fine and 0.1% would be really good. When I see that the same basic circuit can probably do 0.01% or lower with just a few improvements, that is really interesting, isn't it? Not for the power supply but for other designs. I am fascinated that at almost no cost, you can get into the realm of the really expensive DACs. I like the fact that I can now say "Yes I can use a PWM output from a micro to build a 24 bit Dac with really great linearity, and perhaps great accuracy for next to nothing". A month ago, I would have said "No way can you do it - you will just have to get the checkbook out and pay big money".

Maybe it is just me.

Richard.
 

Online ejeffrey

  • Super Contributor
  • ***
  • Posts: 2230
  • Country: us
Re: General Purpose Power Supply Design
« Reply #182 on: April 25, 2012, 05:35:57 pm »
I am fascinated that at almost no cost, you can get into the realm of the really expensive DACs. I like the fact that I can now say "Yes I can use a PWM output from a micro to build a 24 bit Dac with really great linearity, and perhaps great accuracy for next to nothing". A month ago, I would have said "No way can you do it - you will just have to get the checkbook out and pay big money".

I don't think it is fair to compare your DAC to commercial offerings.  The settling time of your DAC is going to be 10s of seconds, whereas a commercial sigma-delta DAC costing < $5 will have a settling time of 10s of microseconds.   That isn't to say that your DAC is useless, but the brute force solution of using extremely slow filtering is not suitable for many applications.
 

Offline amspire

  • Super Contributor
  • ***
  • Posts: 3782
  • Country: au
Re: General Purpose Power Supply Design
« Reply #183 on: April 25, 2012, 06:41:23 pm »
The settling time of my DAC is something like 0.6 seconds worse case to a millivolt. 10s of seconds would be useless. For small adjustments, it is much faster.

It is a DAC so of course it is fair to compare it to other DACs.

It is slower, but it has great linearity and resolution. I am making a power supply, not a video card or waveform generator.  Commercial sigma-delta DACs could be interesting if there is one spec'd for DC stability.

Richard. 
 

Offline Leo Bodnar

  • Frequent Contributor
  • **
  • Posts: 771
  • Country: gb
Re: General Purpose Power Supply Design
« Reply #184 on: April 25, 2012, 06:54:36 pm »
I can't believe that discussion about a PWM output fed into an RC filter has spread over 13 pages! ;)
Leo

Offline A Hellene

  • Frequent Contributor
  • **
  • Posts: 601
  • Country: gr
Re: General Purpose Power Supply Design
« Reply #185 on: April 25, 2012, 07:41:47 pm »
Why not, Leo?

Is the practical implementation and testing of such a technology being taught in any textbooks? After all, what I can see happening over here is a bunch of (bigger) boys having a good time playing with their beloved toys! At least, this is the way I feel about it!

In my opinion, the journey to Ithaca is more important than the destination itself.



Richard, I was impressed by the results you got from your last experiment! I think, though, that I will settle for components like LTC2641-16 and LT1461A-2.5, which I find to be more suitable for my PSU needs. But I am following your progress!


-George
« Last Edit: April 25, 2012, 07:45:38 pm by A Hellene »
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 ejeffrey

  • Super Contributor
  • ***
  • Posts: 2230
  • Country: us
Re: General Purpose Power Supply Design
« Reply #186 on: April 25, 2012, 07:52:06 pm »
The settling time of my DAC is something like 0.6 seconds worse case to a millivolt. 10s of seconds would be useless. For small adjustments, it is much faster.

My bad, I misread your capacitor as 2.2 uF instead of .22.
 

Offline IanB

  • Super Contributor
  • ***
  • Posts: 9764
  • Country: us
Re: General Purpose Power Supply Design
« Reply #187 on: April 25, 2012, 10:18:04 pm »
Ah, that almost seems too simple. I will have to reflect on that a bit and convince myself that it always has the desired outcome. Thanks.

People understand money really well, so a money analogy might convince you.

Actually I am quite happy with the general principle. But with things like this I tend to ask myself if there are edge cases, or limitations in application that might present unforeseen snags?

For instance your monetary example involves small amounts $1/day averaged over a long period (1 year). But what if the amounts were larger ($100/day) averaged over smaller periods (like 1 month or 1 week)? Or given $1/day, how many days does it take before the error in the $500/year rate is reduced below some tolerance like 0.1%? Where are the limits? What is the noise on the output? Does the noise filter introduce its own errors due to filter lag? All kinds of questions arise...

(...which you have been investigating of course, but still.)
I'm not an EE--what am I doing here?
 

Offline amspire

  • Super Contributor
  • ***
  • Posts: 3782
  • Country: au
Re: General Purpose Power Supply Design
« Reply #188 on: April 25, 2012, 11:55:52 pm »
The worse case error calculation is pretty simple. In the case of the coins, then worse case error is $1 so after $500 has been paid, the worse case error is +/- 0.2%.

In the case of the PWM, just count the resolution of the intended voltage value you are using for your PWM. If it is 24 bits, then you have about an error of about 1/224 (providing everything else in the circuit is perfect and the filter time constant is long enough).
 

Offline fmaimon

  • Supporter
  • ****
  • Posts: 165
  • Country: br
Re: General Purpose Power Supply Design
« Reply #189 on: April 27, 2012, 01:39:36 am »
Richard,

You've mentioned several times that everything is going to cost just a few bucks. Which reference you will be using to achieve that and still have good stability in the 10's of uV, even if it is short term?
 

Offline amspire

  • Super Contributor
  • ***
  • Posts: 3782
  • Country: au
Re: General Purpose Power Supply Design
« Reply #190 on: April 27, 2012, 01:54:06 am »
Still thinking about that. It might even end up being something as basic as a TL431. I only need it to be stable after temperatures have stabilized, even if that takes an hour. Most of the time, no great stability is needed at all. For general use without a warm up, then better then 1% is fine, as far as I am concerned.

The reason why I may go for a TL431 is that this circuit like Dave's runs with any voltage from a battery voltage which might be a lithium battery or 3 or for AA cells up to 27V. So that means 3V to 27V . I need a low dropout reference, and as part of the design exercise I set myself, I am minimizing specialized parts. I have a TL431 + transistor combination in mind to make a wide range low dropout 2.5V reference.

I have a TL431 somewhere, so I think I will have to do a test. A TL431B should give about a 0.2% stability over a wide temperature range. The temp coefficient curve for the TL431 flattens in the middle of the range, but they are a bit vague about the actual temperatures where it does  flatten.

Richard.
« Last Edit: April 27, 2012, 02:01:41 am by amspire »
 

Offline amspire

  • Super Contributor
  • ***
  • Posts: 3782
  • Country: au
Re: General Purpose Power Supply Design
« Reply #191 on: April 27, 2012, 02:25:43 am »
Just checking. Linear Technology have the LT1431 which is a higher spec'ed TL431.

I have got the short term stability I need in the past out of a LD117 LDO regulator, and definitely the LT1431 is more stable. So if I go with the LT431, then if people want better performance, they can use the LT1431.
 

Offline BravoV

  • Super Contributor
  • ***
  • Posts: 7093
  • Country: 00
  • +++ ATH1
Re: General Purpose Power Supply Design
« Reply #192 on: April 27, 2012, 03:13:43 am »
Richard, does the selection of the logic buffer for the pwm signal is critical ? or any jelly bean mos based buffer is good enough ?

Also regarding the precision voltage source, it supplies current only to these buffers right ?

Offline amspire

  • Super Contributor
  • ***
  • Posts: 3782
  • Country: au
Re: General Purpose Power Supply Design
« Reply #193 on: April 27, 2012, 03:30:32 am »
The buffer is a little critical, in that I found that 4000 cmos was too slow and was inaccurate. It has to have cmos output, so you cannot use the buffer chips with cmos input stages and transistor output stages.  Most fast CMOS logic chips should be fine.

It is giving me a few options, as I might be able to pick a chip with a spare gate or two that are useful elsewhere.
 

Offline BravoV

  • Super Contributor
  • ***
  • Posts: 7093
  • Country: 00
  • +++ ATH1
Re: General Purpose Power Supply Design
« Reply #194 on: April 27, 2012, 05:54:19 am »
The buffer is a little critical, in that I found that 4000 cmos was too slow and was inaccurate. It has to have cmos output, so you cannot use the buffer chips with cmos input stages and transistor output stages.  Most fast CMOS logic chips should be fine.

It is giving me a few options, as I might be able to pick a chip with a spare gate or two that are useful elsewhere.

Ok, no 4000 cmos series, but with bipolar input and cmos output, which series is that ?

Offline amspire

  • Super Contributor
  • ***
  • Posts: 3782
  • Country: au
Re: General Purpose Power Supply Design
« Reply #195 on: April 27, 2012, 06:37:18 am »
Just about all the cmos logic chips are fine. Some of the driver chips, particularly cmos input mosfet drivers are often bipolar output. If a mosfet driver had a cmos output, it would probably be excellent.
« Last Edit: April 27, 2012, 06:42:13 am by amspire »
 

Offline BravoV

  • Super Contributor
  • ***
  • Posts: 7093
  • Country: 00
  • +++ ATH1
Re: General Purpose Power Supply Design
« Reply #196 on: April 27, 2012, 08:03:36 am »
Just about all the cmos logic chips are fine. Some of the driver chips, particularly cmos input mosfet drivers are often bipolar output. If a mosfet driver had a cmos output, it would probably be excellent.

Your 1st test that was using CD4069 has cmos output and input, but quite slow with transition time @5Volt is 150 ns.

Here your simplified 4069 schematic from it's datasheet :



I'm not nitpicking, its just I'm curious on how this buffer choice affects the accuracy performance ? Faster transition time is better right ? Really eager to learn here.  ;)
« Last Edit: April 27, 2012, 08:05:08 am by BravoV »
 

Offline amspire

  • Super Contributor
  • ***
  • Posts: 3782
  • Country: au
Re: General Purpose Power Supply Design
« Reply #197 on: April 27, 2012, 08:22:56 am »
it is all about transition speed. Imagine a minimum width PWM pulse of 62.5ns trying to get through a gate with 150nS delay. Basically the cmos buffer characteristics dominate the shape of the waveform, not the reference voltage. You end up with a triangular looking pulse that never reaches maximum.

If you choose a cmos IC with 10-20nS delay time, you get a good looking squarewave out and the top and bottom do reach the reference and zero voltage levels.

If you look at the PWM cycle, with a 10nS rise/fall time gate, 20nS out of 62.5mS are spent in the transitions. That is 0.033 percent of the time. Now if you assume that the rise and fall shapes will stay within about 10% of a normal shape, then you get down to 0.0033% linearity.

A cmos gate with very similar rise and fall time shapes would be ideal. A really fast gate such as 5nS or less could improve this more, but the faster the gate, the more chance transients may affect the levels. Really good decoupling is needed. I will probably use something like a 0.1u capacitor and a 1nF capacitor, and also the first filter capacitor will be very closely coupled to the gate.

Richard.
 

Offline fmaimon

  • Supporter
  • ****
  • Posts: 165
  • Country: br
Re: General Purpose Power Supply Design
« Reply #198 on: May 10, 2012, 12:36:45 am »
Any news on the supply? I'm curious about the Rev. 3 :)
 

Offline amspire

  • Super Contributor
  • ***
  • Posts: 3782
  • Country: au
Re: General Purpose Power Supply Design
« Reply #199 on: May 10, 2012, 01:11:50 am »
Apologies - I will post some news soon. I had started drawing the circuit, and then had an idea about an improvement that would need a slight redesign to the board.

The design is based around a PCB module that does all the regulation, and a pre-regulator - either linear or switching.

What I realized is that rather then limiting the maximum voltage to 25V, if the regulator board is powered by a floating supply that is isolated from the main supply to the pre-regulator, I was no longer limited to 25V maximum. The maximum voltage is only limited by the voltage rating of the pre-regulator so you could easily use the board to make a 50V, 100V or 500V supply - whatever you choose to make. As the regulation is still done on the board, the different voltages do not need any redesign of the compensation network.

However the moment I do allow the module to run in a floating mode, I have to look very carefully at making sure that the supply is still fully protected under fault and overload conditions. I also have to look into what sorts of pre-regulators will work reliably with the floating regulator module.

The pre-regulator can be as simple as a NPN darlington transistor used as an emitter follower. Use of MOSFETs is a bit more of a problem with the big variations in the gate turn on voltages. I would probably have to lower the maximum current a bit if a MOSFET was used so I can cover the gate voltage variations.

The module will still run in non-floating mode, and if you only need a 250mA supply, it can be used without any pre-regulator. The pre-regulator is only needed if the total power dissipation exceeds about 5W.

Richard.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf