Author Topic: EEVBlog #110 DC Converter tutorial  (Read 7587 times)

0 Members and 1 Guest are viewing this topic.

Offline RayJonesTopic starter

  • Frequent Contributor
  • **
  • Posts: 490
    • Personal Website
EEVBlog #110 DC Converter tutorial
« on: September 10, 2010, 10:36:21 pm »
Good stuff Dave.

Even my 10 year old son sat down and watched it, up until the bit when you put the equations up  ;D

One thing that got me intrigued, and I admit I have not yet researched further, was the voltage inversion application.
It looks like the feedback resistors to set the voltage are applied in the same manner, yet surely this always results in a -ve value into the comparator.
I can't see how that could ever possibly work?

Perhaps I'd better get the datasheet / app notes and read closer...
 

Offline mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13736
  • Country: gb
    • Mike's Electric Stuff
Re: EEVBlog #110 DC Converter tutorial
« Reply #1 on: September 10, 2010, 11:54:41 pm »
A few comments - first some minor criticisms/omissions.

The calculated inductor value is a minimum, and so should always be rounded up to the nearest preferred value.
Similarly the max freq of this chip is specced at 100KHz, so the timing cap should be rounded up, not down.

When measuring the output ripple of a DC/DC on a scope, you should NOT use the clip-on ground wires on the scope probes, as the inductance of these is significant enough to make the output look a lot noisier than it really is. Most of the short spikes you saw on the scope were likely due to this. Instead you should use a very short (<1cm) wire from the circuit groundplane to the outer ring on the tip of the probe.

Also it is very important to have good grounding - a groundplane on at least one side of the PCB is highly desirable to get the best performance, increasingly so as frequency increases. It is quite likely that if you just plug it into a breadboard all sorts of odd things will happen. Most DC/DC datasheets have advice on PCB layout.
Breadboards can also have significant contact resistance, which can be a major issue with the peak currents involved in even failry low-end DC/DCs - when prototyping you really need to solder everything, and do not put the chip in a socket.

Input, and especially output capacitors must be low-ESR (effective series resistance) types, whch have the required high-frequency performance. If you're picking parts from your junk box, make sure the ones you use have 105 degree temp ratings printed on them, as these are generally also low-ESR - not always, but much more likely.

Now for some shortcut tips & rules of thumb if you can't be arsed with calculations...

In most good datasheets there are some example circuits with values shown.

Chances are one of these will be reasonably close to what you want - say within 50%, so use this as a starting point, build it and tweak as necessary.
Unless you have to really highly optimise for size or efficiency, leave the frequency as whatever the example shows

Inductor selection - the actual inductance is generally not at all critical. The current rating is usually a more important parameter. There will be a minimum value to avoid saturation, which will be inversely proportional to frequency, however a higher value will always work. Higher values also reduce output ripple in step-down configurations.
However you need to remember that for a given physical size, higher inductance values will have a higher resistance.
In practice 47-100uH will work with pretty much any run-of-the mill converter, and if you're not too bothered about maximum efficiency or minimum size, just use that, a least as a starting point. If necessary reduce the inductance until you see efficiency or dropout current fall significantly, then pick a value at least 25% higher to cover tolerances etc.

Similarly output capacitor values - due to the rather poor tolerance on electrolytics, you want to be generous in rounding up to preferred values - a factor of 2-4x is not unreasonable.

In most case you are interested in efficiency at a particular output current, so you can very quickly experiment with different inductors, diodes, frequency etc. by simply substituting parts  and observing changes the input current - you don;t really need to go through plots at different load currents and input voltages unless you really need to optimise over a wide range. 

Be careful when tweaking output dividers, as a momentary disconnection (e.g. in a resistor box switch) , partcularly in step-up configurations can cause destructive high voltages to be generated. The safest way is to fix the upper resistor (output to feedback pin) and tweak the lower one (feedback pin to ground) - that way any open circuit will make the output fall, not rise. 
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Offline NiHaoMike

  • Super Contributor
  • ***
  • Posts: 9007
  • Country: us
  • "Don't turn it on - Take it apart!"
    • Facebook Page
Re: EEVBlog #110 DC Converter tutorial
« Reply #2 on: September 11, 2010, 01:43:36 am »
The efficiency is pretty poor, but that's the price for using a generic chip. A chip optimized for your application (there will be some out there unless your application is particularly unusual) would probably be a lot more efficient, but you might not be as able to justify keeping a stock of them and they'll almost certainly cost more.

It is also necessary to calculate the needed drive current for that chip. Too much would waste power and too little would cause inefficient switching at high output currents. Or use a chip with a MOSFET switch and not have to worry about that.

And the output divider warning is a good point. My ECEN 441 (electric motors) professor told a story of one of his students who had a potentiometer in an active PFC circuit in order to adjust the output voltage. One day, the potentiometer failed open and the entire PFC circuit blew up. Best design advice is to have the potentiometer from the low side fixed resistor to ground, so either an open or short circuit will not cause overvoltage.
Cryptocurrency has taught me to love math and at the same time be baffled by it.

Cryptocurrency lesson 0: Altcoins and Bitcoin are not the same thing.
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 17814
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: EEVBlog #110 DC Converter tutorial
« Reply #3 on: September 11, 2010, 08:28:28 am »
I think on efficiency those BJT on chip are always poor, I got a "nice" chip from LT and that is a measly 80% but has it's own BJT, I got the impression that best efficiency is obtained from a driving chip with external mosfets as switches.

I quite like the video, I'm sure it will get most people interested and to realize that SMPS are not so mysterious.
 

Offline mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13736
  • Country: gb
    • Mike's Electric Stuff
Re: EEVBlog #110 DC Converter tutorial
« Reply #4 on: September 11, 2010, 09:14:17 am »
Quote
And the output divider warning is a good point. My ECEN 441 (electric motors) professor told a story of one of his students who had a potentiometer in an active PFC circuit in order to adjust the output voltage. One day, the potentiometer failed open and the entire PFC circuit blew up. Best design advice is to have the potentiometer from the low side fixed resistor to ground, so either an open or short circuit will not cause overvoltage.

It's worth remembering that a seemngly innocuous step-up converter can easily produce a couple of hundred volts, and as soon as something breaks down, typically the switching transistor, you have a DC path through the inductor to supply enough current to finish off the job.
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Offline mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13736
  • Country: gb
    • Mike's Electric Stuff
Re: EEVBlog #110 DC Converter tutorial
« Reply #5 on: September 11, 2010, 09:21:49 am »
Something else I forgot to mention - it is by no means essential to use a schottky diode, especially at higher output voltages. It does however need to be a fast-switching type.
1N400x types are a no-no, but the very cheap UF400x series are significantly cheaper than schottkys, and only have typically another 150-200mV voltage drop, so for voltages above about 5V the efficiency loss will only be a few %
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Offline RayJonesTopic starter

  • Frequent Contributor
  • **
  • Posts: 490
    • Personal Website
Re: EEVBlog #110 DC Converter tutorial
« Reply #6 on: September 11, 2010, 09:26:07 am »
It is always good design practice to always connect the wiper of a pot to the otherwise unused end of the variable resistor for the problem of the wiper becoming open circuit.

The full resistance of the pot is then presented, not something approaching infinity.

As for my original query on the comparator for voltage inversion operation, the nominal "GND" of the chip becomes connected to the negative output, so the internal comparator input is still 1.25V higher than the negative volts you generate (as it is with the buck or boost topologies).

Certainly a tricky topology.
 

Offline NiHaoMike

  • Super Contributor
  • ***
  • Posts: 9007
  • Country: us
  • "Don't turn it on - Take it apart!"
    • Facebook Page
Re: EEVBlog #110 DC Converter tutorial
« Reply #7 on: September 12, 2010, 12:57:12 am »
It's worth remembering that a seemngly innocuous step-up converter can easily produce a couple of hundred volts, and as soon as something breaks down, typically the switching transistor, you have a DC path through the inductor to supply enough current to finish off the job.
The semiconductors were rated to 1200V while the capacitors were only rated to 450V, so the capacitors were first to fail. Fortunately, the blast shield did its job and nobody was hurt. There have been stories of people getting disfigured or worse by exploding components in power circuits. http://forums.mikeholt.com/showthread.php?t=111917
Cryptocurrency has taught me to love math and at the same time be baffled by it.

Cryptocurrency lesson 0: Altcoins and Bitcoin are not the same thing.
 

Offline jahonen

  • Super Contributor
  • ***
  • Posts: 1054
  • Country: fi
Re: EEVBlog #110 DC Converter tutorial
« Reply #8 on: September 12, 2010, 09:34:19 am »
What I hate in MC34063 is that it has no proper error amplifier and PWM modulator, thus the switching waveform is quite erratic (as can be inferred from Dave's scope screen when he measures the ripple). I agree that one should never use the ground clip except for DC measurements, as it can produce misleading results. That leads to larger ripple than would be expected from stable operation. It resembles somewhat a hysteretic controller. MC34063 is probably one of the reasons why people seem to think that SMPS would not be suitable for audio use :) Properly designed stably operating SMPS has a very low output noise.

If maximum efficiency is wanted, then all resistive losses must be minimized. That means you must over-spec your inductor (i.e. physically larger) and other parts. That includes also switch saturation voltage and diode forward drop. Also, switching frequency becomes a factor. Highest possible frequency is usually not the optimum. Here, 50 kHz would probably produced much better results, as switching losses in BJT switching transistors would go down (BJTs are relatively slow when turning off). But that would increase the current ripple in the inductor if its value would not be increased, so that should be checked is that is still acceptable.

Often, the capacitive ripple formula is not useful at all if electrolyte capacitors are used. That means that you must put much more capacitance than would be required in principle to achieve low enough impedance (ESR dominates the impedance of an electrolytic capacitor) on the output capacitor to suppress the ripple. Small electrolytics are relatively poor in that respect. Something like 1000 µF begins to have decent figure. Of course, it might make more sense to use ceramic, oscon or similar capacitor, which has much better impedance behavior. Another factor is that if SMPS is to be used at low temperatures, one should note that ESR grows when temperature drops. Of course, my personal preference is to avoid electrolytics like plague if at all possible.

If I need to do some exotic SMPS, then I usually start with conceptual simulation in LTSpice, where I first don't use real components but behavioral ones (like voltage controlled switch component, really nice one). That enables me to find the required parameters for real circuit, like peak and average currents in the circuit, and see the idealized waveforms, without bothering about non-idealities or quirks of real components. After the boundary conditions are found, only then I usually start finding if there exists something that can satisfy the requirements, and whether the non-idealities/quirks will be acceptable in real world.

Regards,
Janne
 

Offline Varal

  • Contributor
  • Posts: 23
Re: EEVBlog #110 DC Converter tutorial
« Reply #9 on: September 12, 2010, 07:37:01 pm »
I have a question - the first equation(Ton/Toff) contains the figure Vf which is the diode's voltage drop. But then a later equation (the Ipk one) requires the value of the first. This means i sort of have to guess what diode will fit. (Dave chose a 1A diode and made it by 260 mA) What are the odds of making a bad guess and thus redoing all 6 calculations? I suppose (didn't calculate this) that if I wanted 150mA out of the device a 1A diode could have been too little. Is there a way to safely assume a diode of a certain value won't be a bad choice? :)
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 17814
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: EEVBlog #110 DC Converter tutorial
« Reply #10 on: September 12, 2010, 08:40:45 pm »
dave chose a 2A diode but said that 1A would have done the job, Just aim like 10 or more times the output current, i would guess that a large step down ration would mean that the switch is off longer than on so making the diode do more work
 

Offline mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13736
  • Country: gb
    • Mike's Electric Stuff
Re: EEVBlog #110 DC Converter tutorial
« Reply #11 on: September 12, 2010, 09:26:57 pm »
I have a question - the first equation(Ton/Toff) contains the figure Vf which is the diode's voltage drop. But then a later equation (the Ipk one) requires the value of the first. This means i sort of have to guess what diode will fit. (Dave chose a 1A diode and made it by 260 mA) What are the odds of making a bad guess and thus redoing all 6 calculations? I suppose (didn't calculate this) that if I wanted 150mA out of the device a 1A diode could have been too little. Is there a way to safely assume a diode of a certain value won't be a bad choice? :)
Vf on diodes doesn't vary by that much, cetainly not enough to badly affect these calculations - in practice it's always going to be somewhere between 0.25 and 0.75V - if you assume 0.5V, then find that the diode you use is dropping a lot more, you probably need a bigger diode, if only for efficiency.
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Offline Slobodan

  • Regular Contributor
  • *
  • !
  • Posts: 159
  • Country: cs
Re: EEVBlog #110 DC Converter tutorial
« Reply #12 on: October 05, 2012, 05:00:36 pm »
Can someone please post a link for downloading MC34063 spice model (file extension .sub)? I cant find it anywhere. I am using LTSpice IV.
 

Offline kripton2035

  • Super Contributor
  • ***
  • Posts: 2581
  • Country: fr
    • kripton2035 schematics repository
Re: EEVBlog #110 DC Converter tutorial
« Reply #13 on: October 05, 2012, 05:20:15 pm »
Can someone please post a link for downloading MC34063 spice model (file extension .sub)? I cant find it anywhere. I am using LTSpice IV.
here, at the bottom of the page
http://jiggerjuice.info/electronics/projects/power/mc34063.html
 

Offline Slobodan

  • Regular Contributor
  • *
  • !
  • Posts: 159
  • Country: cs
Re: EEVBlog #110 DC Converter tutorial
« Reply #14 on: October 05, 2012, 05:46:15 pm »
I have found that link but I can't seem to find .sub file.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf