Voltage Regulator Tutorial and Basics

Voltage Regulator Tutorial

Regulator Types

Fundamentally there are two types of voltage regulators:  linear and switching.  The names come from how they operate and how they achieve voltage regulation.  Linear regulators tend to be a little cheaper to implement, but they aren’t as efficient as their more complex switching variants.

There are also some “cheap and dirty” methods that some designs use.  Below is a brief description and example of each.

Linear

A simple way to think of a linear regulator is to think of it as an active series resistor.  It will vary its effective resistance so that the output voltage remains the same.  The upside to such a design is that it is cheap, simple to implement, and provides a relatively clean output.  The downside is that the regulator dissipates a relatively large amount of power.

If you consider a linear regulator as a series resistor, you can understand how it dissipates power.  The voltage drop of the regulator is like that of a resistor:  the difference between the input side and output side.  So if a nominal 9V goes in and a nominal 5V comes out, there is a nominal 4V drop.  Using the equation Power = Current * Voltage you can see that even 100mA of current causes 400mW of heat dissipation.  That is 400mW of power just lost!

Typical Linear Circuit

Most linear regulator chips work with just themselves, an input capacitor and an output capacitor.  While you should follow the recommendations in the datasheet, the value you pick for these caps usually isn’t all that critical.  The most common linear regulator is the LM7805.  This design has been around for many years and is typically found in a TO-220 package.

Choosing Capacitors

Page 22 of the Fairchild LM78xx datasheet shows that the input capacitor needs to be at least 0.33µF while the output capacitor 0.1µF.  Many people opt to use much larger values. However, it is rarely necessary.  So get a couple of ceramic capacitors and you are set!

Watch the input voltage

Keep in mind that Linear Regulators like the LM78xx series (where XX is the output voltage) require about 2V more on Vin than the expected Vout to function.  For example, on an Arduino board, putting 5 volts in on Vin will result in only about 3.5 volts on the 5V node. So to use an LM7805 to get 5V, you would need a source that is at least 7V.  Unless you use a Low Drop Out regulator.

Low Drop Out regulator (LDO)

There is one variant of the linear regulator called the Low Drop Out regulator or more commonly LDO.  These regulators are designed to operate with an input voltage much closer to the output voltage compared to traditional linear regulators.

The LP2985 LDO [datasheet] from Texas Instruments (National) is a popular LDO.  This LDO is only good for low current applications since it is limited to about 150mA.  However, if using a 5V version of the chip the input voltage can be about 4.7V and still stay in regulator which is great for battery-powered applications!

When using an LDO it is important to select the correct cap values as they are much more sensitive to output changes, compared to their “bigger” traditional linear counterparts.  For example, the datasheet for the LP2985 says:

Like any low-dropout regulator, the LP2985 requires external capacitors for regulator stability. These capacitors must be correctly selected for good performance.

Then almost an entire page is dedicated to discussing what capacitors to choose.

LDOs offer an advantage over traditional linear regulators but are a little more complex.  Fundamentally they still operate the same way and can burn quite a bit of power.  To save power, there is an entirely differently type of regulator circuit.

Switching Regulators

Example Switching Circuit

The key to understanding how a switching power supply works is based on two principles:  how transistors work and how to store energy in inductors and capacitors.

Transistors

In theory, when a transistor is functioning as a switch it drops no voltage while when it is on and blocks all current when it is off.  If there is no voltage drop or there is not current flow, then no power is wasted as heat.  Unfortunately, that only occurs in theory.  In practice, there is also a small voltage drop or current flow resulting in some power being wasted.

Inductors and Capacitors

Inductors (coils) store energy in a magnetic field when current is allowed to flow into them.  Capacitors work really as voltage filters.  Looking at the schematic below notice how the IC has an inductor in addition to the output capacitor.

Inductors don’t like it when their current changes, so they try to keep current the same.  While Capacitors don’t like it when voltage changes, so they use their energy to keep voltage constant.

Switching

When the transistor turns on, it charges up the coil.  When the coil has enough charge the transistor turns off.   Then the coil dumps its energy, in the form of current, into the load.  The output capacitor works with the inductor to keep the voltage constant.  The transistor inside of the switching regulator IC will modify the rate it switches (or the duty cycle) to help manage the output voltage as well.

This relation is a very complex operation, but it comes with a huge benefit.  Even though real-world parts cause some energy to be lost, a switching power supply is very efficient.  The trade-offs are:  1) the components used are a little bigger, especially the coil.  2)  The layout of the components is critical to minimize electrical noise.  3) Proper component selection is also essential   If a design requires a certain amount of capacitance or coil size, those values must be selected carefully.

Buck and Boost

There are a couple of different types of switching supplies.  The two most important to know are a “buck” supply and  “boost” supply.  A “buck” supply will take a larger voltage and “buck it down” to a lower output voltage.  For example, it can take a 7V supply and create a 5V output.  While a “boost” supply works in the opposite direction.  For example, a 1.5V AA battery cell can be “boosted” to 5V.

Lastly, these can be combined into a “Boost-Buck” supply which does both.  Take an example where you need 5 volts out while running off of a 6V battery (4 AAs in series).  The buck portion will work until the batteries run down to about 5V and then the boost portion will run until the batteries are completely exhausted.

Alternative “Regulators”

When considering alternatives to voltage regulators three common methods come up:  1) A Voltage Divider, 2) Zener Diode, and 3) Using no regulator. Let’s look at how each of these work.

Voltage Divider

Beginners in electronics will often ask if they can use a Voltage Divider to function as a regulator.  The approach seems simple at first, calculate a resistor that provides the necessary Vout.

Voltage Divider

The worst way to do voltage regulation!

There are two problems with this overly simple understanding.  First, it doesn’t take into account Vin changing.  As Vin changes, so will Vout.  More importantly, it makes the bad assumption that the load (or device connected to Vout) has a constant AND very low current draw.  The load is in parallel with Z2, meaning, it is part of the overall divider.

It is nearly impossible to calculate a divider for an IC like a microprocessor because it is continuously changing its current usage which would continuously change Vout.  So no regulation is happening.

There are never any situations where a voltage divider should be used in place of a regulator.

Check out this AddOhms Video Tutorial on Voltage Dividers for some additional information on how they work.

Zener Diode

Zener diodes are unique diodes because they conduct current in both a forward and reverse direction.  They conduct in reverse at a specific voltage.

If the source goes above the Zener’s reverse breakdown voltage, it conducts current keeping the voltage seen by the load “in regulation.”   For this to work, a series resistor, shown as R1, is necessary.  It keeps the Zener from burning itself up when it starts to conduct current.  This also means R1 is burning power regardless if the Zener is conducting or not.

Zeners as regulators work okay when you have a very low power circuit powered by a battery.  However, if you need more than a few 10s of mA of current, they probably aren’t a reasonable solution.  Sometimes people will use these with sensors to protect against voltage spikes from damaging the sensor.

No Regulator

Sometimes the idea of using no regulator at all is discussed.  Or only a capacitor is used to smooth out some noisy supply.  One could argue that if the voltage stays above a chip’s minimum and below the max input, then it would not need to be regulated.  In many cases, this might be true.  However, if the chip has any analog functions, such as an analog to digital converter, then this method becomes very problematic.

A common example is Arduino projects powered by 4 AA rechargeable batteries.  These cells have a nominal voltage of 1.2V, so 4 in series provides 4.8V.  Since they cannot go above this value, it may not be necessary to use a regulator at all.  However, if a boost supply was used, it may be possible to get more life out of those cells.

Conclusion

Voltage regulators keep the voltage at a stable level so that circuits can operate in a predictable manner.  Choosing the type of regulator will come down to how the circuit is being used.  For most hobby projects, I would recommend using a, relatively, simple linear regulator and only consider LDOs if necessary   Options like a Zener diode as a regulator may only be good for the most minimal of designs, especially with how cheap the LM78xx series parts run.  A voltage divider should never be used as a power source.

Questions on how the regulators differ or what you should choose for your application?  Leave comments below.

Long comments, URLs, and code tend to get flagged for spam moderation. No need to resubmit.

Leave a comment

3 thoughts on “Voltage Regulator Tutorial and Basics