optimal voltage regulator design - Page 1
Forum section: electronics / beginners

author: mmFooD
author_rank: Contributor
timestamp: August 05, 2017, 06:45:12 pm
content: Since I had such a good help from another thread on this forum I think I'll try another questionI am designing a step-down voltage regulator from a 12V PLC supply to drive a MCU and a 7-segment LED display with some 74HC595 shift regs and a few more components.In the first prototype I used a single LM7805 linear regulator which of course became very hot since it is a few Watts to dissipate. I then tried a single MC34603 switch mode regulator but it was difficult to get a steady voltage. Now I have theMC34063as a preregulator for the LM7805 which seems to be working better.My question is: is this the proper way of designing a regulator for a case like this. It seems to be a lot of components for a single task. Or should I be able to use just the MC34063 with proper filtering? What is the industry standard?

author: schmitt trigger
author_rank: Super Contributor
timestamp: August 05, 2017, 09:45:09 pm
content: I am assuming that you want to design a regulator and not to purchase a ready-made solution from Ebay.The MC34063 and any switching regulators do provide steady voltages......if they are designed properly. They are more challenging than a linear regulator, but i can be done.The first thing anyone here would ask you is:1- Your actual schematic, with actual component values. Please don't show something from a web page that you later modified.2- Input voltage, output voltage and current. Measured, not estimated.3- A clear photo of your assembly.And to answer your very last question; no, this is not a way to design anything. You need requirements, you need analysis, you need simulations, you need measurements. Repeat until satisfied.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: August 06, 2017, 07:08:01 am
content: 34063, really?...https://imgur.com/gallery/SoYtht4As mentioned, the design might've been off, or it's a property of the device itself (as a hysteretic controller, itcan'tbe better than about 50mV of ripple, or something around there). Plenty of far alternatives to choose from, though!Tim

author: Zero999
author_rank: Super Contributor
timestamp: August 06, 2017, 08:16:51 am
content: Quote from: mmFooD on August 05, 2017, 06:45:12 pmWhat do you mean by that? Was there lots of ripple? Did the voltage change greatly, between on load and off load conditions?QuoteA switched mode + a linear regulator is common for powering, analogue circuitry which is sensitive to ripple but not digital logic. You should be able to run your circuit directly of a switched mode PSU.

author: David Hess
author_rank: Super Contributor
timestamp: August 06, 2017, 04:39:18 pm
content: Quote from: T3sl4co1l on August 06, 2017, 07:08:01 amIt is a constant off-time controller and not hysteritic. In a proper design, ripple is competitive with a PWM design and can easily be in the 20mV range and lower. (1) Of course a proper design for any switching regulator may not be trivial although being a constant off-time controller, some things are simplified like frequency compensation. The 78S40 suffered from being one of the first integrated switching regulators at a time when most designers were unaware of how to achieve good performance.The MC34063 is a simplified version of the old 78S40; it omits the operational amplifier, power diode, and independent reference. All of the old application notes for the 78S40 apply.(1) There *is* a minimum required ripple voltage in a constant off-time controller because the comparator has finite gain but this is not usually a limitation.

author: mmFooD
author_rank: Contributor
timestamp: August 06, 2017, 09:47:27 pm
content: Seems like it was merely an issue with the MCU. I switched back to using the MC34063 on its own and reuploaded the sketch to the MCU (atmega328) and it seems to be working fine again.But the actual load is very small so I thought I'd stress it a bit more and build up Daves dummy load from ep #102. I didn't have a logic level mosfet or a LM324 but I did have an IRF520 and a TLC272 so I thought I'd try and see what happened.The opamp and the pots are powered through the arduino 5V pinout and the MC34063 is powered through the Vin which is powered by a 12V external adapter but then there is a voltage drop in the arduino circuits so the actual value is more like 11.3V. The output voltage of the MC34063 is 5.16V.The dummy load is acting strange though. I've set the pots to about 1V so that is what I should be getting on the 2nd output of the 272, right? Nope, it is a steady zero volts. I have had it working a couple of times today, meaning I could measure som current through the resistor or the correct voltage. But then it just stops working.Here is a pic and the schematic. To get the best ratio of the voltage dividing resistors in the PSU I used multiples of the same value. Disregard the LM7805 in the bottom of the PSU board, it is not connected.

author: Zero999
author_rank: Super Contributor
timestamp: August 06, 2017, 10:14:35 pm
content: You shouldn't be surprised it's acting up. Solderless breadboard is no good for this kind of thing. Ideally you need a proper PCB but you might be able to get away with stripboard if you're careful: make it as small as possible and trim the excess length off the ends of the strips, so you don't have huge aerials everywhere.

author: David Hess
author_rank: Super Contributor
timestamp: August 07, 2017, 04:29:53 am
content: Quote from: Hero999 on August 06, 2017, 10:14:35 pmIn addition to the above and with a note that ground plane construction over a copper clad board works great and even air wiring can work well, I refer you to the sage words of Jim Williams about inductor selection and layout for switching regulators from Linear Technology application note 35:Test 1 consists of weighing the candidate inductor. Acceptable limits range between 0.01 and 0.25 pounds. ...The second test involves measuring the inductors DC resistance. Acceptable limits are usually between 0.01? and 0.25?. ...Layout is vital. Don’t mix signal, frequency compensation, and feedback returns with high current returns. Arrange the grounding scheme for the best compromise between AC and DC performance. In many cases, a ground plane may help. Account for possible effects of stray inductor-generated ?ux on other components and plan layout accordingly.

author: schmitt trigger
author_rank: Super Contributor
timestamp: August 08, 2017, 05:24:58 pm
content: Is that tiny thing your output inductor?? It will be in saturation.Inductorswhich store DC energyare physically large, the inductor itself is usually the largest component in a SMPS.That in addition to building a SMPS on a breadboard.

author: sasa
author_rank: Regular Contributor
timestamp: August 08, 2017, 06:08:12 pm
content: I have just wanted to note about inductor....For step-down 12 to 5V It should have at least 150uH (ripple 10mV, max current output 100mA). I noted on schematic it is 15uH, As well, Co (C2 in your schematic) should be at least 25uF (perhaps can be considered much lager one). And the last, you may consider to add additional 1uH choke and another cap (i have used 470uF) on output rail to additionally stabilize output voltage ripple, as shown in datasheet.There is many onllne calculators where can be calculated minimum values for required parameters.

author: mmFooD
author_rank: Contributor
timestamp: August 08, 2017, 06:12:27 pm
content: I used the calculations in thedatasheet(p11) to get thevalues. But I guess they are minimum values and bigger values makes for a more stable supply. I have ordered some stripboard and bigger radial inductor. We'll se how it goes.

author: mmFooD
author_rank: Contributor
timestamp: August 08, 2017, 09:47:18 pm
content: Quote from: T3sl4co1l on August 06, 2017, 07:08:01 amI've read a bunch of negative complaints on the MC34063 basically saying that it is old and slow but apart from this post no one really mentions any good alternatives. (And can someone please explain the concepts of "internal", "external" and "offline" regarding switch mode regulators?)One of the reasons people seems to dislike the MC34063 is that it uses a lot of external components, and in particular a big inductor due to it's slow frequency. But the ones in T3sl4co1l's post doesn't really have less components the MC34063has 11, TPS54231 has 12, LM2675 has 5, LM5008 has 11. I guess they are smaller though.So what are the more modern approach to switch mode power supplies? What do you use when you need a buck converter?

author: rstofer
author_rank: Super Contributor
timestamp: August 08, 2017, 11:40:16 pm
content: How much current do you need? You don't show the display on your breadboard but assuming the digits are multiplexed, I have a hard time believing a 7805 can't handle it.If your project took 500 mA and the drop is 7 volts, you would only be talking about 3.5 W. That could raise the case temperature by 10.5 deg C. Even a small heatsink should be able to keep up with that.And then there are the LT1083 series regulators that handle 3A, 5A or 7A.http://www.linear.com/product/LT1085-FixedUnless the project is really about building another SMPS. The efficiency will be much higher, of course.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: August 09, 2017, 01:19:46 am
content: Quote from: mmFooD on August 08, 2017, 09:47:18 pmSadly, the average hobbyist completely shuts down from such an onslaught of "paradox of choice"...And, hence you have so many hangers-on to 2N2222, and 2N3055, and MC34063, and...No one really mentions alternatives, becausethey're almost all good, and there arethousandsto choose from. A complete listing is impossible. Go peruse Digikey like the rest of us do!Another good (if all too brief) listing is AoE3, Tables 9.5 and 9.6 (pp. 653-658).As for type: regulators are internal switch: you might need to add a diode, but all the active circuitry is contained within.Controllers are external switch: you must add transistors, and often, shunt resistors, bootstrap power (or external gate drivers, even) or other things.Sometimes, the controller has enough poop to be useful in small applications (MC34063 and TL494 for example, which have uncommitted BJT type outputs in the 1A and 200mA range, respectively). In that case, the distinction is kind of here-or-there, but if it's usually found alone, it's probably more of a regulator (like MC34063), or if it's usually in the middle of a bunch of stuff (like TL494), it's probably more of a controller.Offline types are made for mains operation. TL494 is not offline (it needs an aux supply to start up and run). UC3842 is offline (it has a wide operating voltage range, and internal UVLO circuitry so it can be charged slowly from a large-value resistor, then it kicks on and starts up). TOPSwitch devices are offline (in fact exclusively operating from an internal pass regulator, no aux winding needed).Offline types may be regulator (TOPSwitch, etc.) or controller (UC3842, etc.) types; they are non-exclusive.QuoteSheer parts count misses size: most of those are chip resistors and/or capacitors. The externally compensated chips are more flexible, but if you're truly strapped on space, the internally compensated chips work just fine (but follow the appnote carefully: stray too far from recommended L and C, and the internal compensation will be wrong). They also operate at higher frequency, so the inductors and capacitors are much smaller. (Remember you need output AND input capacitors. Ripple goes both ways!)There are further knock-on savings from reduced overall footprint, reduced power dissipation (higher efficiency), reduced ripple, and a lot of other features that aren't available on the old parts (or not without a lot of fiddling), like supply sequencing.Tim

author: sasa
author_rank: Regular Contributor
timestamp: August 09, 2017, 04:16:04 am
content: mmFooD,Your calculation is not quite correct. The old MC34063 can provide at most 1.5A. And that only can happens in peaks. Required current in calculation of 1.3A is not allowed, as Ipk then exceed 1.5A. Maximum for Iout in this particular requirement is around 750mA, in which case Ipk is under 1.5A limit, however then all results for minimum values are quite a bit different.Furthermore, in your first post you have mentioned minimum input voltage is 12V, while in calculation is 24. That as well have significant impact on whole calculation and stability if circuit is actually powered by 12V. For large range of input voltage, calculation for both extremes is mandatory before choose appropriate minimum values for all required components.All in all, old MC34063 is cheap and reliable for output current up to some 750mA (almost all cheap car chargers are based on this IC), however for providing near maximum current, additional components must be carefully chosen or better to consider another IC (as suggested already).As well, notice that MCUs are quite sensitive to large voltage ripple.

author: David Hess
author_rank: Super Contributor
timestamp: August 09, 2017, 04:55:50 pm
content: Quote from: mmFooD on August 08, 2017, 09:47:18 pmInternal means that the controller includes a power switch. External means that the controller is designed to operate with an external power switch. There is some overlap here since a controller which includes a power switch might be used with an external power switch to further increase its capability and in low power applications, a controller which would normally require an external power switch might be sufficient by itself.Controllers with internal power switches also usually provide protection and anti-saturation for the power switch but usually they are used for simplicity. (1)Offline means that the converter circuit is operating off of the AC power line without isolation. Special precautions need to be exercised.QuoteThe MC34063 does not really require more components and may even require fewer. (2) For instance because it is a constant off time controller, it requires no frequency compensation. The 78S40 it was derived from requires even less since it includes a built in power diode.It does have disadvantages compared to more modern controllers. It's Darlington output stage suffers from high voltage drop and lacks protection and anti-saturation. Constant off time controllers are variable frequency which can be a problem in some applications. It is slow by modern standards.QuoteI do not have any problems applying the 78S40 and the simplified MC34063 however my preference is for controllers which include totem pole or uncommitted single transistor outputs but these are necessarily more complex.(1) The MC34063/78S40 does not provide protection or anti-saturation for its power switch other than peak current detection.(2) Stannis Baratheon and Ser Davos Seaworth would approve.

author: schmitt trigger
author_rank: Super Contributor
timestamp: August 09, 2017, 05:03:40 pm
content: I agree with David Hess.The MC34063 is similar to the LM324.Not in functionality, mind you, but because it is an old, proven, cheap, ubiquitous, versatile and simple-to-use device, which you can still perfectly use,as long as you are aware of its several limitations.Of course....... if you require high performance device, neither the LM324 nor the MC34063 are the optimal choice.

author: mmFooD
author_rank: Contributor
timestamp: August 09, 2017, 07:02:05 pm
content: Quote from: rstofer on August 08, 2017, 11:40:16 pmI tested the LM7805 with a nominal current of about 180mA and peak something like 230mA (measured with a cheap multimeter). The chip was over 87C after a while. This was with a heat sink with about 31C/W. That is the reason I started looking into switch mode regulators. But I also want to learn about how they work.The final product should be able to handle a current load of about 500 mA.

author: mmFooD
author_rank: Contributor
timestamp: August 09, 2017, 07:07:05 pm
content: Quote from: sasa onTodayat 06:16:04Thanks, I didn't know that. 750mA should be enough though. I used I A just to over do it a little. And for lazieness. I want to be able to use a similar layout in possible future projects. 1A seems like a good limit to be able to handle.24 V was just a remnant of some calculation tests to see how they affcted the outcome.

author: mmFooD
author_rank: Contributor
timestamp: August 09, 2017, 07:09:15 pm
content: Quote from: David Hess onTodayat 18:55:50Thanks for the info. I can't say that I fully get it but at least I have som idea now.

author: mmFooD
author_rank: Contributor
timestamp: August 09, 2017, 07:21:19 pm
content: Quote from: schmitt trigger onTodayat 19:03:40as long as you are aware of its several limitations.Of course....... if you require high performance device, neither the LM324 nor the MC34063 are the optimal choice.Thank you for this input as well!Thanks all of you for taking the time to share your knowledge on this subject. But I can't help to notice that in line with other threads, the replies is mostly about why MC34063 is or isn't a viable chip, not so much about what to use instead. Is MC34063 still the go to / jellybean switch mode regulator?If your were to design a layout with a 12 - 5V buck regulator with as much general purpose possibilities as possible and that could handle at least 500mA but preferable up to 1A or so. The load consisting of a few IC's such as shift regs, an MCU and a bunch of LED's (all in all it will be about 48 LED's or there abouts). The layout should preferably also consist of parts that wille be easily availible and used pretty widely even in the future. What would you use, and why?

author: schmitt trigger
author_rank: Super Contributor
timestamp: August 09, 2017, 08:42:13 pm
content: well...............One of the major stumbling blocks, at least for the novice designer, is loop compensation.So the MC34063, being an hysteretic regulator, is an excellent choice for that purpose.You are asking for a comparable substitute. I've also used the LM3578, which is a similar and very simple to use device.Won't give you a full amp of output current, though.

author: sasa
author_rank: Regular Contributor
timestamp: August 09, 2017, 08:46:30 pm
content: I have made and use variable range step-down converter based on MC34063, with max current up to 350mA, which is more than enough for most of low powered devices I was made and planning to create. If stability is also needed, the board may be used as first step to lower voltage to 7.5V and then use standard LM7805 or 78L05 depending on total power requirement, in which case dissipation is at minimum...It is hard to suggest what is optimal, without exact project requirements. If you need to control each individual LED in multiple 7-segment displays, that can be achieved differently, with techniques called multiplexing or charlieplexing, using probably less than a 250mA for the whole device...

author: David Hess
author_rank: Super Contributor
timestamp: August 09, 2017, 09:07:11 pm
content: I still have a pile of 78S40s but if I did not use one of them, then maybe TI/National TL2575 or LM2576-5 in a TO-220 package. Linear Technology has the LT1076 but it is more expensive.