9 ms·
The magic of DC-DC voltage conversion
- amelius 4y agoHow much energy would we save if we replaced all linear regulators by switched configurations?
- johnea 4y agoThe "magic" of course, is AC...
- labster 4y agoNice try, Nikola, but AC is too dangerous.
- magicalhippo 4y agoNot really. AC literally stands for alternating current, meaning the current flows the other direction in the conductors as well. That's not what happens in most DC-DC converters. Instead the current is switched on or off (or this way and that way if you prefer). As a visualization, the hydraulic ram pump[1] is the water equivalent of a DC boost converter[2]. At no point in the cycle does the water flow in reverse. Same with the DC boost converter. [1]: https://en.wikipedia.org/wiki/Hydraulic_ram https://en.wikipedia.org/wiki/Hydraulic_ram [2]: https://en.wikipedia.org/wiki/Boost_converter https://en.wikipedia.org/wiki/Boost_converter
- ejiblabahaba 4y agoTechnically all DC-DC converters at a minimum have an AC current in their input and output capacitances. Since we see a small ripple voltage across the capacitors, it must be true that the direction of the current flowing in the capacitors is alternating. It is true that in most cases the inductor current isn't changing direction though.
- magicalhippo 4y agoMy point was the core of a DC-DC converter like the simple boost converter I mention does not rely on AC to work. It relies on building up a magnetic field in the inductor and then redirecting that stored energy somewhere. Any AC inside the circuit is due to imperfections, like the reverse recovery time of the diodes or similar.
- ejiblabahaba 4y agoSure, direction of current in the magnetics does capture the intended distinction better. Ripple currents are usually non-ideal behavior, and cases where it isn't (discontinuous conduction mode in the boost converter) are probably arguably but needlessly pedantic.
- crote 4y ago> Between the resulting thermal management issues and reduced battery life, linear regulation is seldom worth the pain. Rather the opposite, actually! Most simple electronics or DIY stuff has rather trivial needs, like USB-sourced 5V->3.3V conversion at a few dozen mA. A simple LDO will cost you about $0.01 in bulk, so your total BOM is $0.03 once you include capacitors. The linked CUI VXO7803-500 module is closer to $2.00. An LTC3240 IC will cost you $1.00, and an AP63203 IC is at least $0.50 too. Unless your application requires high efficiency, has significant voltage differences, or is handling large currents, there is no reason not to just throw in a dirt-cheap LDO.
- jjoonathan 4y agoAgreed. Low-N solutions should optimize for simplicity rather than cost, but simplicity tends to favor LDOs too. PSA: Watch out for residual flux residue on your voltage dividers! I've seen parallel resistance as low as 50k. If your rails come up at the wrong voltage they can fry your expensive chips! Consider investing in packaged LDOs at the exact voltage you require.
- CamperBob2 4y agoHigh divider resistances are asking for trouble, but very popular in datasheets because they make the efficiency specs look a little better. Residual flux in combination with high resistances is especially scary because the regulator will appear to work "just fine" until some moisture is encountered. Such as when you're spraying R134a around looking for a problem elsewhere on the PCB. Water condenses on the flux near the divider resistors, and now you have (at least) two problems. Another trap for young and old alike is putting your finger on the regulator IC to see how hot it's getting. Touch the 1M resistor next to it by accident, and now your 3.3V bus is more like six or eight volts...
- the__alchemist 4y agoCurrent handling in space-constrained situations is what drives me from LDOs. Ie, if space-limited, linear regs top out at 500mA for sot23-5. So, then you need to go switching, along with the slew of accompanying passives.
- osigurdson 4y agoI always liked the switched capacitor concept.
- jacquesm 4y agoIndeed. The first time I ran into the MAX233 I really did a double take. How on earth does it do away with all of the supply voltages?
- ilyt 4y agoIt has its uses. For example, powering 5v LCD off your 3.3V power supply and micro with very few parts (just some extra caps/diodes hooked to microcontroller): https://www.youtube.com/watch?v=I4ED_8cuVTU https://www.youtube.com/watch?v=I4ED_8cuVTU
- osigurdson 4y agoWow! Great video. That is a really practical approach with a micro-controller.
- azubinski 4y ago[flagged]
- algo_trader 4y agoAre DC-DC convertors applicable for high-power industrial applications? Can a mega pack battery output be converted 10kVDC without an AC step ?
- tonmoy 4y agoAs far as I have heard modern power electronics is sophisticated enough to do that
- cellularmitosis 4y agoYes, though at that voltage range you’ll need to stray into somewhat esoteric parts, like silicon carbide mosfets / igbt’s https://www.power-mag.com/pdf/feature_pdf/1461163294_Woifspeed_Feature.pdf https://www.power-mag.com/pdf/feature_pdf/1461163294_Woifspe...
- nunuvit 4y agoHaha SiC and IGBTs are hardly esoteric. If anything, GaN is esoteric. You just wouldn't know it because industrial doesn't get the same press as computer power supplies.
- cellularmitosis 4y agoThanks! Just a hobbyist, glad to hear industry perspective on this!
- nunuvit 4y agoCool. Be safe, don't play with SiC or IGBTs, the high voltage will kill you. GaN will be more mainstream in a few years, Infineon just bought GaN Systems.
- algo_trader 4y agox10 for this link!
- jacquesm 4y ago
- jacquesm 4y agoI'd be really interested in a teardown of what goes into a modern tri-phase solar inverter.
- ejiblabahaba 4y agoThere's not much to it. There's usually some stage-1 converters at a subnetwork of panels that step the panel voltage up to a common DC bus voltage with all the MPPT and relevant OTP/OVP/UVP/OCP/etc. Then the big DC bus gets combined across all panels and fed into a three phase inverter with IGBTs or sometimes SiC FETs (getting more common), which just looks like a hex bridge across a three phase transformer. There's gate drivers (maybe isolated), amps for current and voltage sensing (maybe isolated), some protection circuits, and a half-assed flyback to run the fans and the control DSP. Some models might host an MCU for data logging and comms out to a control plane. There's a handful of projects where the size of the solar field is large enough to make it economic to step up from 400V or 800V bus. I've seen many 1000V buses, a few 1200V and 1500V buses. Honestly it's exactly the same circuits, just with higher voltage ratings; all your switching elements are still giant hockey pucks, you're still doing a three phase hex bridge, etc. The half-assed flyback is sometimes replaced with something a little less braindead.
- jacquesm 4y agoWhen I was 17 or so I built a simple inverter out of a big 12V transformer and some 3055's (RCA's, not Motorola) which was enough to run most of my gear when it was 'lights out' (or not...). So I understand the basics. But those transformerless sine wave inverters are interesting, they seem to get away with squeezing a 20 KW inverter into a relatively modest package at a ridiculously high efficiency. On top of that they have to comply with a whole host of safety regulations, so even if the theoretical block diagram is as simple as you've outlined it the actual implementation is likely going to be a lot more complex and interesting. Any pointers to where I can dig around without opening one up myself would be greatly appreciated, most of the youtube stuff is for very cheap or small gear.
- ejiblabahaba 4y ago
- VLM 4y agoThe proper way to select linear vs switched is really a flow chart of some applications require super low analog noise or low quiescent current and cannot tolerate a switcher solution. The next step is a complete system analysis including power/battery budget AND thermal for both solutions then pick the overall system level winner. No point in spending dollars of switcher components to save fractions of a penny of battery energy. Another interesting point is its "generally" easier to buy/build constant current linear sources than constant current switching sources. Plenty of sensor applications where you want to mostly just limit to 4-20 mA or similar. Final point to make is "generally" with massive hand waving and isolated exceptions, linear sources are harder to destroy via inductive loads and oscillating loads and ESD / EMI impacts.
- hgomersall 4y agoAs someone that works with low noise systems but on the firmware/software side, is it possible to design a low noise power supply with a switcher, without some kind of linear stage (like a final LDO regulator)? The hardware engineers are good, but I'd like to understand this a bit myself.
- ejiblabahaba 4y agoIn principle yes, in practice it's rarely worth the cost and complexity. If you're careful about the converter design (keep the high-current loops extremely short, use counter-rotating loops to tightly confine magnetic field within those short loops, use a soft-switching topology to reduce EMI and sharp edges at the switch node, switch quickly or use multiple parallel converters at different phase offsets to reduce magnitude of current ripple), you can get decently low noise. There's a good Jim Williams app note about this.[0] But it's almost never worth it to do this, since there's LDOs with two or three orders of magnitude better noise voltage. There's a time and a place for a really low noise converter; usually EMI constrained galvanically isolated converters like medical supplies or scientific instruments need them and aren't too sensitive to the cost or development effort. But even then, you'll often find LDOs cascaded on the outputs just afterward, since a good LDO can add another two orders of magnitude of ripple rejection in the switching frequency band. [0] https://www.analog.com/media/en/technical-documentation/application-notes/an70.pdf https://www.analog.com/media/en/technical-documentation/appl...
- mastax 4y agoFor a good practical guide on switching regulator component selection and layout check out Phil's Lab on YouTube: https://www.youtube.com/watch?v=FqT_Ofd54fo https://www.youtube.com/watch?v=FqT_Ofd54fo https://www.youtube.com/watch?v=AmfLhT5SntE https://www.youtube.com/watch?v=AmfLhT5SntE He also has good guides on digital audio processing and sensor fusion.
- krmblg 4y agoHis videos definitely helped demystify my prior assumptions about how to incorporate ESP32s or STM32 in my own custom PCB designs (and not deal with external programmers, castellated edge ICs etc or resort to devkits adding quite some vertical space requirements and coming with issues of their own). Highly recommended channel.
- mastax 4y agoI spent a long time afraid of making switching regulators because I heard so much about how complicated they are, failure modes, EMI problems, etc. But when I got over that I never had any problems just reading and following the datasheet recommendations. The layout rules aren't even particularly complex and the datasheets will always give you an example layout to copy anyway. Of course once I figured that out I found self-contained switching regulator modules like the RECOM R78-K and RPM series which are foolproof and cheap. Well the RPM modules were cheap at the time, but apparently they've doubled in price. Maybe that was an introductory thing or the supply chain got to them.
- ejiblabahaba 4y agoDuring a college internship, I actually debugged an EEPROM corruption issue on a PLC card all the way back to the power supply the original designer had copy-pasted out of the datasheet. The compensation network they had used was definitely not stable, even though it was exactly the same input and output voltages and circuit elements in their diagram and our application. I've written my fair share of datasheets now, and while most of us are trying to do a good job and be clear and helpful, sometimes the stuff below the spec tables in the datasheet is, uh... less good than we'd like, for any number of reasons (inexperience, no time, someone left halfway through writing the datasheet, someone forgot to clean up copy-paste from the other datasheet with the slightly different thing, etc). I guess my point is: trust, but verify.
- taneq 4y agoThere are lies, damn lies, and data sheets.
- phkahler 4y agoIf you replace the diode in a boost or buck converter with a second switch that is turned on and off complementary to the other one, they are the same circuit run in opposite directions. Just an observation.
- ejiblabahaba 4y agoYou can use this observation to build a "buck-boost" topology that can make the output voltage larger or smaller than the input voltage. This is common for 1sNp Li-ion batteries that need a high-current 3.3V rail - buck from 4.2V to 3.3V at full charge, boost from 3V to 3.3V at low charge. There's actually a bunch of ways to make buck-boost style converters that can do both functions, like the cuk and sepic topologies. There's also bidirectional bridge converters that can change input and output direction - you see this a lot on hybrid vehicles (12V to 48V or vice versa) and electric vehicles (48V to 400V and vice versa).
- stametseater 4y agoI'm not sure if it's a good analogy, but I think of boost converters like hydraulic ram pumps, which convert high flow low pressure water into low flow, high pressure.
- duskwuff 4y agoThat's a great analogy, actually! The components of a hydraulic ram line up perfectly with a boost converter -- there's an inductor (the inertia of moving water), a switch (the waste valve), a diode (the check valve), and a capacitor (the pressure vessel).
- bilsbie 4y agoWhat’s the best way to boost a dc voltage really high like into the mega volts?
- hasmanean 4y agoFor megavolts just rub some cats fur over an ebony rod. Megavolts. Aka static electricity.
- mangamadaiyan 4y agoThat would be an _ebonite_ rod, not ebony: https://en.m.wikipedia.org/wiki/Ebonite https://en.m.wikipedia.org/wiki/Ebonite Fun fact: ebonite is used to make fountain pens.
- bilsbie 4y agoHow does the boost converter mentioned here work? I’m not understanding the explanation.
- mordae 4y agoYou really need to design it yourself to grok it. It's weird. Try using Falstad's online simulator.
- ejiblabahaba 4y agoStep 1: You briefly short the inductor. Inductors cannot instantaneously change current, so they will linearly ramp up the current over time. This builds up a magnetic field in the inductor. Step 2: Stop shorting the inductor. Inductors cannot instantaneously change current, so the now-built-up magnetic field continues pushing current into the switching node. The magnetic field and the inductor current linearly ramp down over time. The forced current will push charge onto the parasitic capacitance of the switch (from switch to ground), the inductor itself (from inductor output to inductor input), and the reverse diode capacitance (anode to cathode). Since capacitor voltage is charge over capacitance, once enough charge is forced onto the capacitance at the switch node, eventually the voltage from the switch node to the output capacitance is high enough to turn the diode on in forward conduction. The rest of the inductor current is forced into the output capacitance until the remaining magnetic field in the inductor is depleted. Step 3) Repeat very fast to reduce inductor size and ripple current required (100s of kHz or MHz speed). Vary the duration for which the inductor is shorted in step 1 according to how much charge you need to put on the output capacitor. You could figure this out open-loop by noting that output current at the high voltage side is in charge per second, output voltage is equal to charge over output capacitance, calculating the time taken for the ramp to grow and decay, etc. Or you could design a closed loop control scheme that looks at the output voltage and converts it to shorted duration for you (this is what most integrated circuit boost converters do). In summary, you dump current into a inductor to build up a magnetic field, then you use the inductor's magnetic field to yeet current up over a large voltage difference.
- SigmundA 4y agoI know how boost converters work but reading your great explanation made me realize how similar they are to an impact wrench. Ever wonder how an impact wrench creates such massive torque? Spin up a fly wheel then let it hit the dogs greatly amplifying the torque through stored kinetic energy similar to an inductor being dumped. https://www.youtube.com/watch?v=xQzqNnWG21s https://www.youtube.com/watch?v=xQzqNnWG21s I always like how electricity can be compared to mechanical and hydraulic systems, it's not always perfect but there is obviously a lot of overlap between voltage, current, pressure, flow, torque and rpm. Power is the common thread.
- Animats 4y agoI designed a DC-DC converter once.[1] This is an exotic application - providing 60mA Teletype signals at up to 120VDC, with power from a 5V USB port. There are two main trouble spots in DC-DC converter design - protection and noise. A switching power supply is a dead short across its input once the inductor has saturated. The switch, usually a power MOSFET, needs to turn off on every cycle before that happens. Otherwise, something will fail and probably burn out. Also, the failure mode of power MOSFETS is usually "on". So protection circuitry is needed. Fuses, current limiters, etc. This is why UL approval for switchers connected to the power line is important. Switchers work by generating big inductive spikes. Those spikes are supposed to be directed into capacitors and smoothed out into DC. Without suitable filtering, spikes will be pushed into the power source, the load, and the RF spectrum. A few ferrite beads, Zener diodes, and small capacitors in the right spots will fix this. LTSpice simulation is useful in picking the component values. You're not done until both the current and voltage curves are flat. [1] https://github.com/John-Nagle/ttyloopdriver https://github.com/John-Nagle/ttyloopdriver
- twawaaay 4y agoI am using "Switching Power Supply Design" from Pressman, Billings and Morey and "Switmode Power Supply Handbook" from Billings and Morey. Both are excellent resources and look at design from a bit different point of view. I think the biggest problems with swithing designs are not what you have listed, although both noise and failure modes are a huge problem and main cause of concern (and cost) when certifying your designs. The biggest problem is that they are just so damn complex and they have so damn complex characteristics over time and operating parameters. You might think you understand how a switching PSU works but that's just an illusion. There are people who spent their entire life specialising in switching PSU design and are still learning. At best we can understand how they behave within certain parameters and then try to make sure to shut it down safely when we leave those parameters.
- nunuvit 4y agoThose books have good advice if you already know the basics of how to analyze a converter.
- mordae 4y ago> The deal with linear regulators is that despite what some internet sources might recommend, you probably shouldn’t be using them in your designs. Yeah, no. 1. Linear regulators do not introduce voltage ripple and by the nature of being variable resistors, they form a nice low-pass filter with the capacitors around it. For some sensitive designs, you use a switching converter to step down voltage to e.g. 5V, filter it and then use LDO to get it down to 3.3V with even more filtering. 2. Linear regulators are dirt cheap. And for e.g. USB devices drawing less than couple hundred mA @ 5V using a regulator to step it down to 3.3V would be an overkill. Granted, recent Raspberry Pi Pico (for example) does use a switching regulator (unlike other boards in that form factor), but it also has led to complications with power supply ripple showing in ADC readings. But sure, if you application needs higher efficiency, steps down by more than ~2V or pushes around a lot of current, switching regulator is a better choice.
- bsder 4y agoAnd if your device spends a lot of time asleep, linear regulators may beat switching regulators by a LOT. Leakage current can dominate your design, and switching regulators often have lousy leakage current specs (to be fair, so do a lot of old school linear regulators). Furthermore, switching regulators often have to "spin up" while a linear regulator is just sitting there ready to go as soon as your MCU switches on. In addition, switching regulators tend to be designed for higher currents and tend to have terrible efficiency at small currents (< 1mA). If your circuit uses a very small amount of current even when active, a linear regulator may be superior even for constant-on systems.
- ejiblabahaba 4y agoNowadays you can pretty easily find switchers with sub-100nA quiescent current + leakage, e.g. TPS62840 (of course, that's assuming you're at room temperature... FETs at high temperature are all crap for leakage). I note you get 80% efficiency at 1uA out on this device with a 3.6V to 1.8V stepdown config; beats the LDO by a lot, particularly if you spend a lot of your time at uA load currents. But spin-up time... Yeah that still sucks :)
- perlgeek 4y agoJust the other day I idly wondered how LED "light bulbs" regulate down their 230V (here in central Europe, at least) to the ~2V needed per LED. Although it's from a different starting point (AC, not DC), after reading the article it seems they could use an AC->DC converter and then a charge pump. Is that what they actually use? Or is there something easier/cleverer when starting from AC?
- wrenzh 4y agoFor household LED bulbs almost always Flyback.
- toast0 4y agoThey probably have a switching power supply, but if you want really simple and low parts count, you'd do a transfomer down to something nicer, have a full bridge rectifier, a capacitor, a current limiting resistor, and then put all the leds in the bulb in series; that way you don't need a big ratio for the transfomer... although maybe that's not a big deal, and you may prefer to not need a higher voltage capacitor, or a more failure tolerant parallel wired LEDs. You could have a linear regulator in there too, but careful component choices may allow that to be omitted. But switch mode power supplies are probably more efficient and highly miniturized, better adapted to different line voltages, etc. All around a better choice. Some sort of smarts are needed to work well with dimmers as well.
- NotYourLawyer 4y agoTransformer is probably a lot more expensive than what they use.
- NikkiA 4y agoLED bulbs usually use the most basic of power supplies, the capacitive dropper[0], the downside is that they tend to die easily. Also, the LED diodes themselves will often be multiple in series (a string), or series-parallel (several strings in parallel) depending on the bulb, that end up needing more than just 2V, anywhere from 12V to 60V or so per string of diodes. Sometimes the high power diodes being used are themselves a series chain of diodes on a singular piece of silicon encased in a blob of phosphor, so that the diode package ends up needing 12V or so. These are often referred to as 'COB' diodes. (apologies for the RAS syndrome, but saying 'LE diodes' or just 'LED' to refer to the individual light elements when talking about 'LED bulbs' is too confusing otherwise) [0] https://en.wikipedia.org/wiki/Capacitive_power_supply https://en.wikipedia.org/wiki/Capacitive_power_supply
- terom 4y agoNothing wrong with linear regulators in the appropriate applications. In fact, the switching converter/controller IC will generally include a small LDO to generate an internal Vcc supply for the control logic. Just don't make the basic mistake of reading the 25V maximum input voltage/ 1.5A maximum load current specs for an L7805 and thinking you can pull 1.5A at 5V from a 24V supply - it will quickly go up in smoke. You must understand the operating principals and what "thermally constrained" means.
- mschuster91 4y agoThere is one case that's missing: variable input, say a USB-C PD powered device that can use anything from 5-20V despite operating internally at 12V (which, iirc, most laptops do), or automotive devices that can run at anything from 6V (motorbike) to 24V (truck, bus) while being tolerant of >100V spikes during load changes. How do these work?
- ejiblabahaba 4y agoFor output voltages that must be higher or lower than the input, there are other topologies like buck-boost, Ćuk, or SEPIC. In general, DC-DC converters can change their pulse duty cycle to modify the amount of energy transferred per switching cycle, and use a closed-loop control architecture to handle changes in input or output conditions. The control loop has a very fast bandwidth (usually hundreds of kHz) and can quickly respond to input voltage spikes or load transients.
- mikewarot 4y agoI was helping a friend repair some old (WW2 vintage) transmitting gear. The voltage dividers used to bias the tubes used almost 100 watts by themselves! Quite the contrast to modern electronics.
- ip26 4y agoI believe the reason being, accurate high resistance components were difficult to make for decades, so you’d be working with 10 ohm resistors for your dividers to have sufficient control of the reference voltage. Although suddenly I wonder why you wouldn’t just use four of them for 40 ohms, or eight for 80 ohms…
- jjeaff 4y agoI have recently found that converting higher DC voltage (48v or higher) down to 5v is rather difficult. Or at least there are not many isolated options on the market. I have a diy home battery system that runs on 48v and it has been very difficult to get anything to work and not fail within a week or two. I started with various sizes of buck converters, but it seems that they are too noisy and get blown out by voltage spikes or dips when the inverter kicks in or cuts off. I finally found some isolated converters that convert dc-ac-dc through induction. But the largest I could find can do 5v at 1amp. So I had to get two of them just to handle a raspberry pi zero and an esp8266.
- ilyt 4y agoI'd honestly just get 48V to 5V non-isolated then 5V to 5V isolated if it osn't anything high current
- jjeaff 4y agoInteresting. Although it's the non-isolated converters that keep getting blown out from spikes. Luckily, they seem to die without blowing up my MCUs.
- ejiblabahaba 4y agoAs you get close to 5% duty cycle you start having tough problems keeping the control loop stable. You might have better luck stepping down 48V to 12V and 12V to 5V cascaded. Less efficient, but cheaper than blowing up your supplies regularly. And now you get 12V for other stuff.
- nine_k 4y agoDid you consider adding a voltage-protection circuit, e.g. based on zener diode? If not for being mechanical, I could imagine using a 48V motor and a 5V generator; both can be 95%-98% efficient.
- KMag 4y agoOn at least one of my cousin's farm fields, there's a single phase induction motor connected to a 3-phase alternator out on the power line pole across the dirt road from the field, to provide 3-phase power where there's only single-phase service. It's not crazy. (I think perhaps his irrigation pivot needs 3-phase power. I'm pretty sure all of his well pumps are run by de-tuned automotive engines converted to run on natural gas.)
- 1letterunixname 4y agoLinear regulators are craptastic, inefficient, and ancient like 7805 circuits. Sure you can throw them together with a few parts, but why? Apart from extreme PSUs used only briefly, they will rapidly eat more electricity than the added cost of switching components. Switching DC/DC is generally what you want. Buck -> V down, boost -> V up, buck-boost -> V up or down (sometimes 2 PSUs or 1 with shared components). I have a 90VDC to 12VDC 10A buck converter to power a train air horn on my electric scooter. It's in a solid-state, ruggedized, industrial form-factor that's potted into a heatsink.
- ChancyChance 4y agoI really enjoy articles like this. My job responsibilities require a knowledge split about 67% software and 33% hardware. While I've been building circuits since the early 1980's, I never got the hang of analog in college (yes, I know, "everything is really analog"). I know enough to follow examples and spot issues or contentions or oversights but I don't know enough to do __efficient__ ground-up design, just naive circuits that burn a lot of power or are noisy at higher frequencies (I'm pretty sure I'll never get RF). Articles like this that start from highschool circuits and move to professional discussion are super useful to refresh my memory neurons. DigiKey has a huge number of articles like this, which walk you from the naive circuit and then point out errors (e.g.: https://www.digikey.com/en/articles/how-to-power-and-control-brushless-dc-motors https://www.digikey.com/en/articles/how-to-power-and-control...) More please!