Switching voltage regulators?

This is a stupid question, and I've finally scraped up the courage to ask it. Why must voltage regulators waste power? If I put 12V into a 5V voltage regulator, and pull 100 mA out of the 5V regulator, then I'm also pulling 100 mA out of the 12V source. This wastes 700 mW of power. It has always been that way, and I've just taken it for granted. For most circuits, we have oodles of power and don't worry about wasting any. But a solar-powered circuit doesn't have that luxury.

I've always wondered why we don't have a voltage regulator that acts like a switching power supply. If the output voltage falls below the specified voltage, it switches on a fast transistor that feeds more current into the output. When the output voltage rises to the specified value, it switches off the transistor.

Yes, you'd definitely want a capacitor at the output to smooth out the spikes, but that shouldn't be an obstacle. The only objection I can think of is that the output voltage sensing might be too tricky to guarantee an absolutely stable output voltage.

Anyway, this strikes me as so obvious that I must be missing something really simple. So would somebody please explain to me why I should be slapping my forehead and saying "Doh!"

Switching regulators are actually quite common. They are often called "DC-to-DC converters". Most of them use and inductor to "store" the energy so it's not wasted.

There are capacitive switching DC voltage boosters but they are very inefficient.

And switching regulators that maximise the charge current into a battery from a Solar panel are common too, maximum power point trackers.

Check this company out: Pololu - Step-Down Voltage Regulators

Thanks much, everybody! Once I had the search term "DC-to-DC converter" I was able to find mountains of information on them. The latter term is clearly better than "voltage regulator", but I've been using 7805's since the 1970s, so that term was set in concrete in my mind.

They are also known as "buck" converters.

GeezerFrog:
If the output voltage falls below the specified voltage, it switches on a fast transistor that feeds more current into the output. When the output voltage rises to the specified value, it switches off the transistor.

Yes, you'd definitely want a capacitor at the output to smooth out the spikes, but that shouldn't be an obstacle. The only objection I can think of is that the output voltage sensing might be too tricky to guarantee an absolutely stable output voltage.

And that is indeed how a switching regulator, which is readily and now cheaply available as a ready-built module, works.

The "trick" is that a mere transistor switch would on switching on, instantly pull the output voltage up to the input voltage unless limited by resistance in which case you have the same situation as before, that the difference in voltage is wasted as heat. And if you attempted to slow this process with a capacitor, the instantaneous current draw would be immense.

A series inductor solves both of these problems and that is exactly how a switching ("buck") regulator works, except that you must provide a path for the inductor current to keep flowing when the transistor switches off; so you have a "flyback" diode to do this. And thus the circuit that you will see.

You should keep in mind that all is not Rosy in the land of switching regulators :frowning:

Switching Regulators are typically 80 to 90% efficient "at the rated output". At very low currents you might find the switching regulators do not provide as much of an efficiency increase at one might think.

I mention this because your original question mentioned 100 ma. Doing a quick search of ebay the lowest current switching device I found was 2Amp.

if 90% efficient the losses for a 2A switcher would be approx (1.0-0.9) * 12 * 2 = 2.4 watts (at the rated output of 2A)

If 3/4 of that loss was proportional to current then the remaining 1/4 occurs at any output current. That "idleing loss might be 2.4 / 4 = 0.6 watts.

In your example the loss you would have is (12-5) *0.1 = 0.7 watts. So the switching power supply MIGHT only save you 0.1 watts.

Now there are likely lower current switching regulators that are more efficient at low loads. And my numbers are mostly "off hand" and not based on any specific specifications or measurement. My goal is to warn you to look at the specifications for any devices you might want to use and realize at low power levels a switching regulator might not be the best solution.

Thanks again for the more detailed explanation. I was surprised by Paul’s explanation for why the inductor is needed, as opposed to the capacitor. This is one of those situations where my training as a physicist blinds me – in the physics textbooks, an inductor is just a kind of “backwards capacitor” in an AC circuit. But your explanation makes perfect sense.

And John, thanks for advising me of the low-end efficiency reductions; I’ll have to size my DC-to-DC converters to the load of the system. It’s a fairly simple system with a bunch of LEDs selected by an Arduino semi-randomly. The LEDs want to operate at 2 to 3 volts (depending on the color), pulling 20 mA each. The Arduino wants 8 volts on its power input, and the various demultiplexers want 5V, so I thought that I’d use a 12 volt system (lead-acid batteries) with a fairly standard solar panel recharging them. I want it operating 24/7/365, and in the winter months we can be overcast for as long as a week at a time – and even when we have sun, it’s only for eight hours max.

GeezerFrog:
The Arduino wants 8 volts on its power input,

Absolutely not! :astonished:

You refer to other components requiring a 5 V power supply. So you provide a 5 V regulated power supply, either a linear regulator with a heatsink or if you require more than say, 300 mA at 5 V, then a "buck regulator" from the 12 V, and you feed that to the Arduino via its 5 V input.

The "Vin" or "barrel jack" on the Arduino is for experimentation/ demonstration of the Arduino and a few LEDs or something requiring trivial current. Nothing else.

Paul__B:
The "Vin" or "barrel jack" on the Arduino is for experimentation/ demonstration of the Arduino and a few LEDs or something requiring trivial current. Nothing else.

That regulator has a bit more use than that - it allows me to power my robot from 2xLi-ion batteries, so 7-8V. Semi-permanent project.

Good voltage and sufficient power for the motors; and the built-in regulator gives me the regulated 5V the Arduino (Pro Mini) and sensors need. I did put two diodes in series in the power supply to the servo as it's rated 6V... sigh... all those different voltages!

wvmarle:
Good voltage and sufficient power for the motors; and the built-in regulator gives me the regulated 5V the Arduino (Pro Mini) and sensors need.

Well, saying that is just a trifle confusing. The Arduino on-board regulator is completely irrelevant to the motors because you are powering them separately.

Yes, at 8 V, it can provide power to the Arduino itself, and some sensors which require as I said, trivial power - a few milliamps. If that is the case and you have no other device requiring 5 V, and have a fairly well-behaved 8 V supply, by all means use the on-board regulator. :grinning:

I mean, the batteries that power the motors can this way also directly power the Arduino. Voltage may go down to 7V or so, still good enough. At the extreme it's getting close to 6.5V I think, I don't know exactly what level the batteries cut out (built-in protection circuits).
The only other devices that need the 5V are two encoders, an ultrasound, the built-in LED... of course can't power peripherals with it, just sensors. But that's in many cases all you need the 5V for!

GeezerFrog:
This is one of those situations where my training as a physicist blinds me -- in the physics textbooks, an inductor is just a kind of "backwards capacitor" in an AC circuit.

Not impressed by your physics textbooks - don't they derive the formula for energy stored in an inductor
as a function of current? An inductor stores energy in a magnetic field as opposed to a capacitor storing
energy in an electric field, and this is all normally covered before covering any sort of periodic AC waveform
and AC circuits.

Paul__B:
Absolutely not! :astonished:

You refer to other components requiring a 5 V power supply. So you provide a 5 V regulated power supply, either a linear regulator with a heatsink or if you require more than say, 300 mA at 5 V, then a "buck regulator" from the 12 V, and you feed that to the Arduino via its 5 V input.

The "Vin" or "barrel jack" on the Arduino is for experimentation/ demonstration of the Arduino and a few LEDs or something requiring trivial current. Nothing else.

Wow! Now I'm really confused. My approach has always been to power the Arduino itself with 8 - 12 volts from the barrel input, and to power all external components (except, as you say, trivial little stuff) with an external voltage regulator. In other words, don't try to draw any current from the Arduino on-board voltage regulator. Is there an input pin for regulated 5V input power that I have never noticed? I know about the 5V output pin, but is this pin somehow bidirectional?

That's simply the power pin indeed. The 5V aka Vcc pin can be used to power the Arduino just fine. I wouldn't call it bidirectional really as that's a term that's normally used for signals - it's simply the power bus. Power can reach it from sources like an external 5V source, or from the built-in regulator, or from the USB's 5V line. Doesn't really matter how, doesn't really matter where exactly it's connected - as long as it's all connected.

As I described above you can also do it the other way around, and use it to power some sensors (yes, you have to limit that or you overheat the regulator). That's a common method as well.

Furthermore, if you have a set of 3 AA batteries, that's 4.5V. You can power your Arduino through the Vcc pin at 4.5V just fine, but be aware that at 16 MHz (the normal clock speed of an Uno) the processor requires at least 4V so when your batteries start to run low it's game over. If you clock down to 8 MHz you can even use two AA batteries (minimum voltage 2.7V). See datasheet p.468.

MarkT:
Not impressed by your physics textbooks - don't they derive the formula for energy stored in an inductor
as a function of current? An inductor stores energy in a magnetic field as opposed to a capacitor storing
energy in an electric field, and this is all normally covered before covering any sort of periodic AC waveform
and AC circuits.

Capacitors do in the time domain what inductors do in the frequency domain. Does that make more sense?

GeezerFrog:
Wow! Now I'm really confused. My approach has always been to power the Arduino itself with 8 - 12 volts from the barrel input, and to power all external components (except, as you say, trivial little stuff) with an external voltage regulator.

Yes, that is mostly adequate but if "all external components" or in fact any of them require a regulated 5 V (and note I did say regulated), then it makes far more sense to have a decent 5 V regulated supply and use that to power the Arduino also. This avoids any concern not only about whether you have sufficient current available, but also the possibility on start-up or otherwise, that some sections of the project may be powered when others are not and the consequences of "phantom powering".

GeezerFrog:
In other words, don't try to draw any current from the Arduino on-board voltage regulator. Is there an input pin for regulated 5V input power that I have never noticed? I know about the 5V output pin, but is this pin somehow bidirectional?

So calling it a "5V output pin" becomes a misnomer. Perhaps more accurately, a 5 V reference pin, but it is nothing more or less than the main power line of the Arduino itself. That power line happens to be fed from the internal regulator, or from the USB port if (either of) those are the available source, but if you have a better source, then you connect it directly to the 5 V pin.

GeezerFrog:
Capacitors do in the time domain what inductors do in the frequency domain. Does that make more sense?

No. Not at all.

Capacitors do in the current domain what inductors do in the voltage domain, and vice versa.

Capacitors do in the current domain what inductors do in the voltage domain, and vice versa.

Yes, I'm struggling here. What I recall is a theorem about Fourier transforms, something about capacitors and inductors on opposite sides of a Fourier transform, perhaps that they are symmetric with respect to a Fourier transform. Can you refresh my memory?

GeezerFrog:
Capacitors do in the time domain what inductors do in the frequency domain. Does that make more sense?

No

These differential equations are a good starting point, the symmetry between L and C is
clear and to do with electric v. magnetic fields, not time v. freq.

L dI = V dt ( or dI/dt = V/L )
C dV = I dt ( or dV/dt = I/C )