EEVblog #110 – Let’s Design a DC to DC Switchmode ConverterPosted on September 10th, 2010 56 comments
Dave takes you step-by-step through designing a DC-DC converter using the venerable MC34063. And then he build it and checks the performance.
An online calculator is here:
awesome !! this is one of your best ones yet
this is real knowledge you only usually get from experience !
opening cheap products is a great way to learn which ICs have the best cost/value ratio because you know the guys who put out the 5$ gizmo have done their research for the most cost effective design and that’s a great way to get in on that !
going through the formula made all this seem so understandable, especially pointing out what each variable meant even if it was more or less obvious, sure Vf is forward voltage but you explained it and that made it much clearer, I wouldn’t have found out what Rsc (Resistor, sensing current)was without posing the video and looking up the datasheet and losing the thread of the conversation
excellent work !!!
Excellent review. Once you get the data and show it on a graph you can clearly see what is going on.
To make things more complicated you need to use you temperature chamber !
Next step for you is to start reviewing bench multimeters and power supplies, so you can get the instrumentation needed to get these curves automatically, using LAN, GPIB or Serial configuration from your computer to the instruments!
Great job !
I don’t know why I took this on over my morning coffee, but I did.
It might be the caffeine talking but man oh man I came closer to following along with the formulas than ever, which is cool because I LOVE power supplies and have been tinkering with some of those little thrown-away cheapie chargers with similar circuits inside.
I do get the ghist of it though, and holy moly, the wealth of potential in these cast-off cell chargers is really really cool.
-all you have to do is run the numbers for the circuit you want and modify the existing one to suit?
A local electronics company sells MC34063 power supply step-down kits for 3.95 Euro. I usually buy them in bulk. 3.95 Euro gets you all parts, including a PCB, an MC34063, some inductor of dubious quality, caps, diode, resistors, a trim-pot and even some screw terminals.
I just throw all the parts in my part bins. When I need a step down converter I calculate it, take a kit’s PCB and build it with parts having the calculated values.
Compared to modern parts the MC34063 is a bitch, and it takes some work to optimize a MC34063 power supply. But often it is good enough for what I do.
Great tutorial, Dave. Thank you for sharing this info with the internet community.
I think i will follow your tutorial here and make an online calculator for this specific chip. Let’s see what time i have on my hands today
I have done it. This is the link for the online calculator : http://dics.voicecontrol.ro/tutorials/mc34063/
You just add the required parameters into the form and push “Calculate”. It will automatically do the calculations for you and even update the schematic with the new values. I hope you find it useful
Dave, another trick I’m sure you’re aware of but didn’t mention for lowering output voltage ripple is to use the lowest ESR cap you can get away with on the output. As current is switched in and out of the cap the ESR adds an additional voltage ripple = Iripple * ESR. I noticed you used an electrolytic type which tends to have higher ESR. Of course there is a tradeoff and lower ESR caps can introduce stability issues as a high ESR helps damp any LC ringing(which will couple through your feedback network if it occurs). Still, if you can keep the circuit stable with a low ESR cap you should get a cleaner output voltage! Thanks for another great video!
Cheers Dave, that was a corker!
Love it when you do a design walk through.
And…Nice calculator Dics, thanks for sharing
Isn’t there already LTSpice model that will simulate MC34063?
I’ve started playing with simulation recently and I find it very very usefull.
For example I’ve tried to verify circuit which regulates voltage to 1.35V out of 1.55V silver-oxide batery for my very old camera. By using LTSpice I was able to optimize it further…
I’ll have to find out what the real world measurements will be.
I would have to say that I really enjoyed this episode and it is one of your best in a classroom style lecture from start to finish for electronics design. Starting with an idea and finding a part from some electronic parts lying around the house to how to get spec information for the found parts and calculating the numbers using the formulas to getting the calculations on the schematic worksheet diagram and then actually creating, testing and tweaking the project and creating graphs with end results is outstanding. I felt like I was in one of my EET labs with fellow student colleagues going through the project with the professor
Thank you for this great tutorial! I’ve been waiting for this one since your live show.
Is there a simple way to evaluate the transient response of your converter (ie if your load have very fast variations what’s your converter recovery time will be)? It may be important for loads like microprocessors with sleep modes etc.
What is the maximum (reasonable) speed for a DC-DC SMPS if I’m okay with low efficiency? Is it possible to have a 10 MHz clock and a tiny inductor with just a few turns of magnet wire?
> (ie if your load have very fast variations what
DaveCAD thumbs up!
Your best blog to date, and yes I’ve watched them all! I know it was a ton of work, but please make more like this one….please!
You can also build buck-boost converter with MC34063. Check out AN920/D application note from ON Semiconductors. I have not tried this setup, but I consider its use in one of my projects.
Dave (or others),
Is there a similarly generic chip available of 3A output? I’m in need of a 12v->5v@3A and a 12v->3.3v@3A power supply. Like you said, the selection of switching converter chips is dizzying. ON Makes a chip, the NCP3163, which seems to be a spiritual successor to these chips, but I’d still prefer to use a device which has been vetted by time.
Great tutorial Dave! But there is an error in R2 calculation. You have calculate it as
R2 = Vout/1.25-1*R1 and it should be
R2 = (Vout/1.25-1)*R1
Small thing but makes difference
Actually it is calculated as you suggested but Dave did not add parenthesis. Try it yourself, it will result in R2 = 110k in this example.
I don’t think there is a single visitor here who will see the formula and think : “Hey, all i have to do now is calculate 1*R1 and substract it from my previous amount and i am done”.
The LM2576 is a very cheap generic chip that
might be suitable for your applications.
It is available for fixed output voltages (3.3V / 5V / 12v) and costs about 1$.
An adjustable version is also available.
Although originally made by National Semiconductor this device is now made by many others.
Its downside is the low efficiency at low output voltages (ca. 70% @ 3V)
There are improved versions of this chips availabe but I don’t know them.
Dave do more like this step-by-step, with other “chips” and application.
Keep doing great job.
Great Blog Dave!
Perhaps you could lose some words on the types of inductors to use in a SMPS in a follow-up. This would be great.
Keep up the good work!
I suppose I should say that more often, but here it is.
Thank you Dave!
It’s interesting that you didn’t use your uCurrent adapter’s in this blog post, it would have been perfect!
I’m so glad to see you doing the good stuff!
All that drive time, amp hour, live show blah blah junk is just boring.
Your EE “real life” tutorials and product review vbogs are the GREATEST stuff in the electronics blogosphere!!
Please do more of this type of original format and less of the blah blah boring stuff please.
PS: I got the “I only give negative feedback” T. I think your T designs are fun to wear! I get asked about them all the time and it’s fun explaining what’s on the T-shirts.
Good podcast, awesome shirt!
Bravo. That was a very good tutorial. Need more teachers like you in our technical colleges.
thank you for explaining this DC2DC converter-IC!
I prompltly made a PCB (that one from ON Semi’s datasheet). I build a step-up converter, 5V to 30V for supplying an analogue tv-tuner’s varicap circuitry used in my project for a (slow) Spectrum-Analyzer (40MHz..950MHz)
Awesome! what a pornographic IC you have there, tomorrow I’ll get some to test insane ideas (putting a huge transistor to increment the regulated current for step down, for instance) and a not so insane dual 12-0-12 from USB.
Also, there is much change if the source voltage varies upside like 5 to 12 volts? I think not.
I LOVE it! I remember back to episode 1 when I just happened to think “there must be some sort of EE podcast” apparently at the same time that you thought “what gives, there are no EE podcasts!” Even with the cruddy video quality from the webcam, the info was good enough to hook me and boy I’m glad I subscribed! This stuff just keeps getting better and better. I literally hit refresh sometimes hoping for a new episode.
Time to go buy about eight of these little guys!
Thanks for doing this. As one of the people who commented on your original switchmode vs linear regulator post, saying I was lost in component selection, etc., this was really rather helpful!
Having been bitten by newbie mistakes when choosing components, it seems finding out what the jellybean components are is half the trick of beginning electronics. They may not be optimal, but they’ll probably at least work for most apps, and then you can build up some experience before playing with the funkier stuff.
I’ve watched this twice and got a lot out of it each time. While searching the net for more info, I came across the following, which uses the MC34063 in a constant current source configuration, as an LED driver.
See the post at “August 11, 2009 01:34 pm”.
It replaces the R2/R1 voltage divider with a current sense resistor in series with the load, and uses the voltage drop across the sense resistor as the input to the comparator (pin 5). He says the chip “will generate whatever voltage required to produce a 1.25v voltage drop” on the sense resistor.
Could anyone comment on this design? Given that you go thru all these calculations assuming one particular output voltage, is it reasonable to expect the MC43063 to “generate whatever voltage required” to produce the 1.25 voltage drop?
Also, notice a bit further down, he shows a similar circuit with an MCU input to provide LED dimming (current limiting).
I appreciate any comments you learned EE types can provide.
Very handy online calc:
Great Video. Coincidentally (Or more Serendipitously), I found this after countless google searches when I found an old cell phone car charger with a 34063API part number and onsemi Marking (and A third look at the datasheet finally showed me that that’s what the part number is on the chip, while the number on a part search is MC34063A…)
Well, what I have is a full sketch of the board layout turned schematic, and the obvious parts listed. I was wondering if with those numbers, can I reverse engineer the target Iout current, and possibly the inductor and diode voltages (and frequency)?
All part numbers are based on the calc you have linked.
Ct 0.001uf/1nf (Ceramic marked 102)
R2 3.3kOhm (+-5%)
R1 1.0kOhm (+-5%)
Cout 220uf (10v, cheap board ha!)
Vout 5.35v (Untested, but that’s what R2/R1 provide and goes with the cell phone charging application)
L1 Unknown (Ohmmeter shows 0.9ohm if it helps)
D1 Unknown (Looks like it ends in 04, but can’t see the rest)
Frequency Unknown (Don’t Care As long as it works )
VRipple Unknown (Don’t Care As long as it works )
I’ve tried playing with the numbers myself, but just can’t grasp it, so any help would be wonderful. Ideally, I can find out the max Iout current, for that resistor pair, and if I can change them for other ones (4.7k/3.3k for 3.03vout, 5.6k/3.3k for 3.3vout, and 10k/3.3k for 5.03vout).
(also, I’ve looked, but can’t find a straight answer. Will the 34063 provide the same regulated Vout regardless of load? Or will it show a higher voltage with no/minimal load than it does with a decent load?)
Could you do an episode on common protection devices (tvs eg. “transil”,(p)p/ntc,mov with some example. Lets say ~240 -> ~24-0-24 transformer and then some common parts like linear regulator after which come analog/digital ic’s. Maybe there’s also power ic before the regulator. What are the dis/advantages of each protection method, is it ok to use multiple different methods. Objective would be to eg. limit inrush current, filter noise and if there’s a rocker switch, could that also cause some undesirable effects like relays do on sensitive ic’s that need to be accounted?
Also if you wanted prolong the life of the transformer itself, would this be doable by changing the fuse to a ptc?
I just found this video blog, came here from stackexchange, it’s great that you have gone into all the details to help us understand. Thanks so much for you taking the time to help others like myself.
After watching the video and doing some calculations myself, I now have a question on the choice of R1 and R2 that wasn’t addressed. The values of R1=10k, R2=110k chosen for your voltage divider means that the series R1+R2 to ground will draw 125ma away from the output, at “zero” load on the real output. Do you really need this much current through the voltage divider to ground? I’m not an EE, so I don’t know, but would expect the comparator doesn’t need to draw that much current into it’s input either. Probably choosing a voltage divider R1 and R2 that is only a few mA parasitic would be better and might even improve the overall efficiency of the circuit. For example, with R1=100k and R2=1.1Meg then the voltage divider is only requiring 12.5mA and still gives 1.25V into the comparator. The question is: how much current does the inverting input of the comparator sink? I can’t find this on the datasheet, and whatever it needs, the divider needs to be able to supply it. Can you tell me more about the best choice of R1 and R2? Thanks!
Hi. Thanks for your casting. but:
Anyone tried this really?
I tried to make a 3V to 5V converter using the calculator in this site. No matter what I do, this power supply only works when no output current exists!! By only adding a 10mA load, voltage drops. And in the nominal designed load, it’s not working any more! the output is 2.6v as the input is 3v!
Can you please kindly tell me where I’m wrong at?
Thank a lot.
PS. It’s not possible to click a checkbox here to notify me by mail. So please kindly inform me by mail if you answered.
That is hands down one of the best 37 minutes towards my education yet. Some of the formulae on those datasheets scare me to almost death but you have cleared a lot up for me.
Thanks, and keep up the good vids.
First, loved your video and your patience explaining it. Excellent.
Second, I was trying to do the dc-dc but I just only got on the output 100mA, I’d like 400-600mA and according to the datasheet, I could get up to 1.5 Amp. I know the efficience is about 80%, but not matter what I put on the input, 500ma or 1amp, got same result, just 100mA. Any iluminating thought?
Thank you, Dave.
Can you think of a way to measure the RFI from this SMPS without using an expensive frequency response analyzer?
If yes, that might be a good topic for a future video.
Thank you, Dave.
Can you think of a way to measure the RFI from this SMPS without using an expensive frequency response analyzer? Maybe an AM receiver?
If yes, that might be a good topic for a future video.
Well… how about Flyback from 5V to 400V? Any ideas?
Thanks very much for your explanation
You make seemingly complicated ideas extremely simple. What an awesome video.
In the video you said that the higher the frequency the lower the efficiency, is there a chart for efficiency for the mc34063 based on frequency?
In order to increase the output current could i use an external transistor or mosfet? how this component could change the calculations? Which of those components are moree suitable for increasing the output current?
Nice explanatory video.
I intend to use this to regulate the current to a high-power RGB LED. The led operates at 350mA per channel but having a peak current of aprx. 700mA would definitely burn it.
What could I do?
Thank you in advance.
Really nice episode – finally brought myself to start experimenting with step up converters myself – and also buy a good old Tektronix 2225 oscilloscope on ebay (the one you reviewed and calibrated in other episodes) – really nice device!
keep up the good work!
Building a Dc dc converter right now.
Pretty difficult stuff, but should work as looking at tutorials does help.
It’s perfect time to make some plans for the future and it’s time
to be happy. I have read this post and if I could I want to suggest you few interesting things or tips.
Perhaps you could write next articles referring to this article.
I desire to read more things about it!
Leave a reply