Author Topic: AC to DC SMPS supply: start to finish  (Read 6258 times)

0 Members and 1 Guest are viewing this topic.

Offline DefekCTopic starter

  • Contributor
  • Posts: 19
AC to DC SMPS supply: start to finish
« on: July 01, 2016, 02:11:09 pm »
Hi,

Disclaimer!
I know I am not the first nor last posting s**t like this, but when I will start this one, I will try hard to post my progress as step-by-step success/failure "tutorial" and make this as reference to everything I do... so, please, be patient...

Problem description
Every time I do some electronics projects, I am tied to bench top PSU. But when project is done and has to start the life of its own, I am stuck expensive, big, non-integrated industrial-type PSUs or Wan-Hang-Lo power supplies from China. It was no problemo until now... When things have to start look good, perform good and have to be on single PCB due to size restrictions, both options are useless. Soo... I want to learn to make (design) my own PSUs on-demand such that they do not interfere with local radio stations or accelerate ones cancer growth but at the same time delivers reasonably good quality power without burning 50% energy in heat and screwing with mains power-factor... and, of course, without killing me or someone else!! I might make jokes now, but I am taking this one seriously...

My background
I ain't no blank page here nor specialist by any means. I have worked for 5 years in industrial automation (PLCs, sensors, industrial communication standards, cabinet "building" and setup, and last 2 years frequency drives big time).  Microcontrollers & basic microelectronics - started as hobby 3..4 years ago, but became a job half a year ago. I have integrated system programmers background from university. So... me no dumb!  ;D

What 'da hell I want?
I want to start low and go from there.
As a very first project I want to LEARN TO BUILD AND DESIGN PROPER PSU with following specs:
    Input:
    • 90-260VAC
    • all primary safety included
    • PFC...? Not sure how big of a deal this is going to be...
    Output:
    • Mains insulated!! Safety above everything!!
    • voltage: fixed +5VDC (with fine-tune option +/-0.5V optionally)
    • current: 1A continious, 3A for peak for <100ms, over-current protection (shut-down output, not brown-out)
    • ripple: 100mVp-p
    • efficiency: >70% would make me happy
    • stand-by current: I want to "go green" - the less, the better!
    • form-factor: SMD on double-sided board with hand-solderable components (>0.5mm pin pitch, >0805...), and, yes - as slim (low height, no pun intended) as possible.
    With idea in future:
    • it would be nice for design (not this PSU specifically) to have scalable output from 1.5VDC to ... as much as it can go (50VDC is my "dream" limit for now)!

Where to begin...?
The very main question: where do I even start?
1) I guess it is topology. From what I know, flyback is the easiest by far from most-used ones. Any other suggestions in topology?
2) What components to order to start trial-error process? There are literally hundreds of controllers out there, but I am more interested in choosing the one (or family of controllers) that would give me most out of learning curve, less of headache and long-term re-usability between designs. Any chip You could suggest?

Final thoughts
I don't want ready-to-roll design. What I mainly want from this is to learn how to go through decision-making, searching, trial&error path in making custom-specification PSU. And I am more of those "hands-on" people - I like to build, power-up, probe and measure stuff less than "now lets use LTSpice"! When totally necessary, I do that (actually, I do that a lot), but when it comes to learning stuff I like to see thing grow bit-by-bit if it is what it takes. Gives more feedback and satisfaction of what 'ur doin'!  ;D
 

Offline bktemp

  • Super Contributor
  • ***
  • Posts: 1616
  • Country: de
Re: AC to DC SMPS supply: start to finish
« Reply #1 on: July 01, 2016, 02:36:09 pm »
Almost nobody builds his own power supply for such a common voltage like 5V. You just by off the shelf ones, because building one is much more expensive in small quantities.

I would start using integrated switcher ics like the ones from power integrations:
https://ac-dc.power.com/
They also have some nice design tools for their products.
« Last Edit: July 01, 2016, 03:11:15 pm by bktemp »
 

Offline Philfreeze

  • Regular Contributor
  • *
  • Posts: 123
  • Country: ch
Re: AC to DC SMPS supply: start to finish
« Reply #2 on: July 01, 2016, 02:39:45 pm »
I don't know that much about AC/DC SMPS but I also want to learn a bit more about this topic. This is why I recently searched for some basic stuff and I found this:

topology overviews:
http://www.smps.us/topologies.html
http://www.we-online.com/web/en/passive_components_custom_magnetics/blog_pbcm/blog_detail_electronics_in_action_45887.php
http://www.ti.com/lit/sg/sluw001e/sluw001e.pdf

OnSemis reference manual:
http://www.onsemi.com/pub_link/Collateral/SMPSRM-D.PDF

Microchips guide:
http://ww1.microchip.com/downloads/en/DeviceDoc/dsPICSMPS%20AC_DC%20Users%20Guide.pdf

The first website I mentioned (http://www.smps.us/) isn't exactly beautiful and it is kind of hard to find what you are searching for but I personaly think it is one of the best websites about SMPS designs. A good start on the website is here http://www.smps.us/smpsdesign.html. On the bottom you will find a list of even more guides and stuff.
I hope this will help you start your project.

Oh and yes, flyback is probably the easiest but I don't know if it is the most used one.
 
The following users thanked this post: DefekC

Offline peter.mitchell

  • Super Contributor
  • ***
  • Posts: 1567
  • Country: au
Re: AC to DC SMPS supply: start to finish
« Reply #3 on: July 01, 2016, 04:03:42 pm »
if you have a few hours to kill, there is an excellent series of videos by robert bolanos on youtube that goes through designing nad analyzing a flyback converter (which is what you'd use at that power level)  
 
The following users thanked this post: DefekC

Offline DefekCTopic starter

  • Contributor
  • Posts: 19
Re: AC to DC SMPS supply: start to finish
« Reply #4 on: July 06, 2016, 08:40:50 am »
This is sure going to take a while! As expected...
Thanks for first suggestions! Video series looks great!!

As for comment "[..]nobody builds his own power supply for such a common voltage like 5V[..]"... true, true!
But this time main goal here is not to build this specific PSU, but learn, how to build PSUs generally speaking.
By taking generic 5V PSU I have a loooot of examples to compare with. More people might be able to explain stuff I don't know with such and common example. Plus I have few practical applications even for these "training" PSUs, sooo... no waste there!  :)

Final goal here is that I need to be able design PSU with 3 rails:
1) +5VDC/1..2A with low noise
2) +12DC/1..2A, generic
3) +38..+48VDC/4..6A with good transient response.
Currently more precise numbers are under discussion.
This PSU will have to have 3 different specs with small variations in highest voltage rail (max current will vary).
Meant for production, not one-of-a-kind.
 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21658
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: AC to DC SMPS supply: start to finish
« Reply #5 on: July 06, 2016, 09:32:45 am »
FYI:



Still debating whether I should make a kit out of these, or if it's maybe too much bother / liability / dangerous.  (Mains operated kits? Ehh...)

But, just to say, it's been done, and you can have some fun, doing the journey yourself. :)

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 
The following users thanked this post: DefekC

Offline DefekCTopic starter

  • Contributor
  • Posts: 19
Re: AC to DC SMPS supply: start to finish
« Reply #6 on: July 13, 2016, 02:20:29 pm »
Thanks to everyone giving me useful material (holly sh** there's a LOT) and a hope!  ;D

First questions considering safety ('cause screw the SMPS design if that kills me): suppression capacitors.

As per short explanation I found here there are three basic configurations used designs:
1) X config - single capacitor connected live-to-neutral;
2) Y config - two caps line-to-earth & neutral-to-earth;
3) XY config - three caps in combo.

Question comes from the fact that I live in (crazy) country where 99% of electric installations has grounded neutral (in other words, outlets are ground-less, only L and N connected, outlets GND terminal is floating, and N = GND).


As far as my understanding goes, in my case Y and XY configs sounds like a "ticking time bomb", and X config is the only one I can (and should) use in my design. From what I see in designs above (and others outside this forum) usually X config is used anyway.

Is my logic (in my case) okay or I am missing something?
Are there any other quirks I should know of considering my country's consistent failure in making stuff grounded?  ???
 

Offline CJay

  • Super Contributor
  • ***
  • Posts: 4136
  • Country: gb
Re: AC to DC SMPS supply: start to finish
« Reply #7 on: July 13, 2016, 02:51:24 pm »
Well, someone out there knows how to design AC-DC SMPSU, they must or they wouldn't be so easy to buy and that makes it as valid a subject to learn about as any other  ;D ;D

Does AC-DC have to mean mains/line voltage AC?

If I had a burning desire to learn about SMPSU design I'd put some thought into working with ~24VAC or maybe even 24VDC input (bridge rectifiers and smoothing caps are a fairly simple addition) to get the basic control techniques down, then perhaps if it still interested me I'd then consider how to turn my experiments into line voltage capable designs.

 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21658
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: AC to DC SMPS supply: start to finish
« Reply #8 on: July 13, 2016, 04:04:42 pm »
If you have a two-wire mains supply, then the equipment should be "double insulated".  The US has standards for this; I would imagine either similar standards exist for your country, or, our standards would meet and exceed whatever is required (or is simply reasonable to do).

The biggest downside to two-wire mains is the difficulty of filtering.  The Y caps are still needed, by the way; they go to the secondary (isolated) side.  The Y1 rating assures safety to anything the end user might touch.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline DefekCTopic starter

  • Contributor
  • Posts: 19
Re: AC to DC SMPS supply: start to finish
« Reply #9 on: July 15, 2016, 08:30:55 am »
Standards... This is where I get confused a lot! I am not even sure what should I look for when it comes to the standards...
From what I have heard EU has higher standards (but not exclusively) than countries across the ocean.

What are the standards I should look up in EU to figure out clearances, creepages, insulation requirements etc?
 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21658
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: AC to DC SMPS supply: start to finish
« Reply #10 on: July 15, 2016, 11:33:53 am »
Hmm, IEC 60065?  60950 for IT stuff. Or I guess they're going to migrate to a combined standard,
http://www.ul.com/global/documents/offerings/industries/hightech/resources/general/hbse_brochure_final.pdf

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 
The following users thanked this post: DefekC

Offline DefekCTopic starter

  • Contributor
  • Posts: 19
Re: AC to DC SMPS supply: start to finish
« Reply #11 on: July 15, 2016, 06:59:22 pm »
Okay, thanks! This cleared out my confusion for sure.
I was kind of looking in right direction but were always in doubt.

Added later

So, I figured what I need as far as standards go: IEC 60950-1 "Information Technology Equipment - Safety"
(or, in my case, local LVD 60950* - that is basically copy/paste from IEC?).

Coming next: "What is that stuck to my shoe? Ough, that is Your opinion!"
This is somewhat weird but I kinda get the point: You have to pay for standards... and price is significant!

Part that I do understand: one makes standard, keeps 'em up-to-date and ensures quality test procedures that makes up good evaluation for any product that falls in given category. Sure, someone has to pay salary to those guys.

Part that I don't understand: if I want to make some device, don't want to sell it but still want to make it so that people around it are safe by applying standards in its design, it is going to cost me a lot!!

So, the question: is there any legal & free-of-charge way to access these standards (at least old-style read-only and write down only what You need access, no direct copying allowed) so that I have some good basic guidelines in my design? Maybe not 100% IEC-compatible, but the fact that my PCB CAD tool allows me to draw 10mil track with 5mil clearance and PCB manufacturer can produce it makes it no safer despite the fact that track current carrying capabilities are there!

____________________
* LVD - low voltage directive
« Last Edit: July 18, 2016, 03:41:46 pm by DefekC »
 

Offline DefekCTopic starter

  • Contributor
  • Posts: 19
Re: AC to DC SMPS supply: start to finish
« Reply #12 on: September 21, 2016, 09:33:42 am »
Long time since last update. And for skeptics  no - I didn't quit. Actually totally opposite...

At work I had (still have) to work on EMC related issues and safety. I was totally bombed by EMC test results and complications that roll with it. Here comes few related questions I would like to have an advice.

1) Surge: how to handle it properly on mains input and logic's side?
I am talking about static discharge (in EMC test that 2kV taser gun). As far as I read, there are several options.
Chokes: helps prevent from spikes coming from grid... but does not help with static discharge somewhere in circuit after it.
MOVs: few time deal with tendency to blow up. Are they worth putting in protection circuits at all if there are other options?
TVS: cheap, reliable... but I haven't seen them being used in power supplies a lot. Am I  missing something here?
PTC: from what I get the only purpose is to limit in-rush current...
...and so on!
My main problem here was that when DUT was undergoing  "taser test", all logic died (well, not permanently, but at the moment of shock), and that is not acceptable. How do You handle situations like these?

2) High frequency emissions - low-pass filters everywhere?
This is something I cannot see with equipment I have (me not so rich to have lab like Dave).  ;D
What is the best way to avoid having high frequency emissions without being able to monitor them at design stage?
Digital signals: low-passes everywhere? Power lines: bulk capacitance? Calculate LCR's basically at every node? What is Your approach to this one?


Reference back to previous comments.
As CJay suggested, I will go with 24VAC --> 5VDC supply first. I guess It is not a smart move to handle mains voltage with so many unknowns...  ::)
 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21658
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: AC to DC SMPS supply: start to finish
« Reply #13 on: September 21, 2016, 10:25:58 am »
1) Surge: how to handle it properly on mains input and logic's side?

Huh, surge should never need to be tested on logic side.

An 8/20us surge of modest amplitude is usually clamped by the input capacitor.  Things may be...interesting, for an active PFC circuit.  (Often, a diode is placed from rectifier output to mains bulk cap, so that startup inrush is handled, and surge is clamped.)

If you have to do higher energy surges (like 10/1000us and with more current), an active PFC circuit would actually help you, as the choke DCR will help isolate the surge from the rest of the circuit.  Use big MOVs on the input to absorb the surge.  Maybe one across the DC link cap too?  Maybe not...

Quote
I am talking about static discharge (in EMC test that 2kV taser gun). As far as I read, there are several options.

Oh, ESD?  2kV, that's it?  Most ICs can handle that, bare!  What are you using that can't?

It's usually 8/15kV (contact/non), or a class A operational requirement, where you need extra parts.

Providing a path to ground, away from ICs, is the important factor.  TVS, clamp diodes (clamps to supply rail, which is bypassed and/or TVS'd to GND) and big capacitors are the usual approach.

Quote
Chokes: helps prevent from spikes coming from grid... but does not help with static discharge somewhere in circuit after it.
MOVs: few time deal with tendency to blow up. Are they worth putting in protection circuits at all if there are other options?

For surge, MOVs are the best.  Nothing else comes close in sheer energy capacity.

Quote
TVS: cheap, reliable... but I haven't seen them being used in power supplies a lot. Am I  missing something here?

Cheap?  Hardly.  Try finding one that can absorb a tenth as much energy as a MOV.  Silicon is expensive in bulk!

Quite reasonable for a few cents per logic pin, though.  ESD is very different from surge.

Quote
PTC: from what I get the only purpose is to limit in-rush current...

NTC*.  PTC is a fuse-like device, but the surge is long over by the time that thing even begins to heat up.  The time constant is about 10,000 times slower than a surge.

A PTC+TVS device would do a good job against very slow surges (supply swell, automotive load dump) though.

Quote
My main problem here was that when DUT was undergoing  "taser test", all logic died (well, not permanently, but at the moment of shock), and that is not acceptable. How do You handle situations like these?

Where was the ESD being applied to?

Class C acceptance is usually sufficient for ESD and surge.  So I take it you need class A?

It all matters about what you need -- what are the specs! ;)

Quote
2) High frequency emissions - low-pass filters everywhere?
This is something I cannot see with equipment I have (me not so rich to have lab like Dave).  ;D
What is the best way to avoid having high frequency emissions without being able to monitor them at design stage?
Digital signals: low-passes everywhere? Power lines: bulk capacitance? Calculate LCR's basically at every node? What is Your approach to this one?

Emissions aren't easy to predict, but you can at least put a few likely options in the layout, and see which ones do the job.

If nothing else, consider the circuit as a three terminal device: AC input, ground, and DC output.  As long as both 'hot' terminals are filtered to ground, you're good.

Of course they aren't single terminals, but pairs of terminals: AC hot/neutral, DC +/-.  But that's okay: the principle remains the same, you just put more windings on the chokes -- use CMCs.  You also can't use very much capacitance (because ground leakage and isolation voltage), but that just means you need even bigger chokes (hence, ~mH's).

What you do, between the CMC(s), depends.  A Y-cap between mains-side DC- and output DC- sometimes helps.  Sometimes not.  Sometimes the cap is better to ground instead.

I built three different voltages of this basic flyback power supply, with three different transformer wind-ups:



As you can see(?), each has a different combination of Y caps (tan colored).  The left one also has an output CMC (red wire and red toroid).

Precompliance emissions testing is easy enough with a LISN.  You can use an oscilloscope to monitor the emissions: you're looking for peak or ringing signals of more than a few mV height.  Likely, an unfiltered SMPS design will have around 1V of noise, which is easily seen.  If you've filtered it well enough that you can't see any noise on an oscilloscope (usually you need 10s of mV to trigger on), you're doing pretty well.  A spectrum analyzer of course gives you a better idea.

The LISN can be built as well: http://seventransistorlabs.com/Images/LISN1.jpg

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 
The following users thanked this post: DefekC


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf