Electrical engineering & Arduino resources for makers

# The Linear Regulator

Linear regulators are very old tech still in widespread usage today. They come from a simple need: getting a stable voltage output from an unregulated, higher input voltage. Typically this kind of unregulated voltages are obtained from a power transformer.

Their invention stems directly from the first bipolar transistors has all linear regulators make intensive usage of both N and P type BJTs as we are going to see below.

## Understanding the linear regulator

The simplest form of linear regulation is a bipolar junction NPN transistor. Let’s take in consideration this very simple circuit:

In the figure above, the voltage at the emitter will be equal to the voltage at the base minus a base-to-emitter drop; typically a diode drop or ~0.6V.

By providing a reference voltage at the base of the transistor, we get a precise voltage at the emitter; thus completing a regulator. The problem now is how to obtain this reference base voltage. You could use a resistor divider such as the schematics below:

Unfortunately this would not hold well. The unregulated power supply will drop voltage under load -that’s why they’re called unregulated in the first place-; and so the simple divider circuit will not keep an accurate reference voltage. In addition, you’d be severely limited by the gain of the transistor and there would be a huge power loss across the resistors if the chosen values are too low.

Instead of a resistor network, this reference voltage can be obtained with a reverse-biased zener diode. A reverse-biased zener diode has the peculiarity to be able to maintain a very stable voltage across its leads. They are therefore widely used as a source of reference voltages or as a way to clamp voltages down. Now let’s change our previous circuit with a zener diode:

This basis of operation is how all linear regulators are built: a precise reference voltage as the base of a bipolar junction transistor. However, this is still far from perfect.

As you can see, the whole premise of this regulator relies on having a precise 5.6V at the zener; and a precise 0.6V voltage base emitter (Vbe) drop. This brings up two majors issues:

• Vbe is a function of the collector current
• Vbe is a function of the collector voltage

This brings us to the last iteration of the design, where the voltage reference at the base of transistor is not provided by a direct zener diode, but by an operational amplifier instead. More precisely, the zener will no longer provide the reference voltage directly at the base of the transistor where it isn’t very stable and load dependent. Instead, this reference voltage will be applied to an operational amplifier acting as a non-inverting amplifier; as seen below:

In this topology the voltage at the output of the operational amplifier is defined by its gain with the following formula:

By choosing Rfb1=Rfb2, we obtain a gain of 2. With 2.5V at the non-inverting input, we get 2.5*2 at the output which is a precise 5V.

Now, the problem with the schematics above is that an operational amplifier can typically barely source about 20mA. The last step is therefore to buffer the op-amp output for higher current. This is done by adding a simple bipolar transistor; completing this design with what is commonly referred by audio enthusiasts as a “Class A Amplifier” –except the the voltage at the amp is a precise reference instead of audio.

This design will always produce a stable output.

### Going further: linear regulators designs

Designing real life linear regulator is out of scope for these pages. As a circuit designer you would just pick a part that suits your need. For reference, here is an actual design with the 78xx series linear regulator:

## Linear regulators in practice

In practice, when designing with a linear regulator; there are two key elements you need to watch out for:

• Drop out voltage
• Power dissipation concerns

### Drop out voltage

In a linear regulator, there is a minimum input voltage required for the the device to works properly. This minimum voltage must respect the following equation:

In practice,Vin is always chosen to be far superior than Vout+Vdropout, by say, 0.5V.  As always, designers tend to avoid operating a device close to its maximum electrical characteristics as it’s the best recipe for disaster.

As an example, a popular linear regulator is the AMS1117 which has a typical voltage dropout of 1.1V. These regulators are widely used to convert a USB voltage input (5V) to 3.3V. In that case we observe:

Vout+Vdropout comes out at 4.4V, leaving about 0.6V of margin. Considering USB voltages can easily drop to ~4.8V with long cables, this is typically a good use case but without much headroom after all things considered.

This dropout voltage depends on the regulator, but also on the load being regulated. As a rule of thumbs, most designers consider the drop out to be constant regardless of load; but it’s good to keep in mind in case you are designing a circuit with very little difference between Vin and Vout.

Linear regulators have drastically improved since the first designs from the 70s. A LM7805 from 1976 for instance had a dropout voltage of 2V. Today we can find sub 500mV dropouts devices. These newer regulators are typically referred to as LDOs for “Low DropOut“. There is no legal definition as to what constitutes a LDO so the meaning might differ from manufacturers to manufacturers. However, LDOs typically have intrinsic differences with their older brothers; with many including modern features such as automatic thermal shutdown or overload protection.

### Power Dissipation concerns

Now let’s address the elephant in the room and the reason why linear regulator are not always a good choice: wasted power.

Let’s start with some very basic equations: Power In (Pin), Power Out (Pout) and Power Dissipated (Pd):

Then, from our design above, we can reorganize the schematics to be easier to read:

With this simplified schematics, and using Kirchoff’s current law we can observe that the input current must be almost equal to the output current (minus the feedback circuitry which should be in the micro-amp range).

Kirchhoff’s current law (KCL): At any node (junction) in an electrical circuit, the sum of currents flowing into that node is equal to the sum of currents flowing out of that node

This allows us to calaculate the dissipated power:

This result is very important; you can clearly see that the dissipated power in a linear regulator is directly proportional to the current it provides. In addition to that, the bigger the dropout voltage, the bigger the power dissipation.

Note: In this equation we are completely ignoring the current used by the regulator itself (to provide the feedback circuitry) which is called the Quiescent Current

Quiescent: For an electronic circuit, a quiet state in which the circuit is driving no load and its inputs are not cycling. Most commonly used for the specification “quiescent current,” the current consumed by a circuit when it in a quiescent state.

#### Power dissipation in practice

Let’s use for an example, the classic Arduino Uno R3 as an example. The circuit is based on a ATMEGA328P micro-controller running at 5V. The board can be powered through a barrel jack with a typical 12V wall wart, and there is a NCP1117 5V low drop out voltage regulator that provides the 5V rail to the rest of the system. From the datasheet, we can find that the chip uses at most 14mA of current at 5V/16Mhz:

So we can plug this into our equations:

We now know the Arduino will lose about 100mW of power in its regulator. We also have to keep in mind that this is just the power dissipated doing absolutely nothing with I/O. Using SPI, I2C, or simply sourcing current for the onboard LED for instance will typically increase the power consumption of the ATMEGA chip. We used 14mA in the calculation above but in fact the chip has an absolute maximum rating of 200mA current.

The last thing we need to know now is how this lost power translates to heat and calculate if there is a risk that the regulator might just burn off (or more likely shut down due to thermal protection).

#### How does dissipated power relates to heat?

Power relates to heat generated according to the following equation:

Where:

• Ta the current room temperature (referred to as “ambient temperature”) in °C
• Tj the junction temperature rating (the highest operating temperature the device will function properly at) in °C
• Rθja the junction-to-ambient thermal resistance (how well heat is dissipated) in °C/W

In a typical application usually all these values are known. The variable is Rθja which highly dependent on the footprint used for the IC, the type of package (bigger through hole packages can typically dissipate heat easier due to their larger surface area). These values will be specified in the datasheet. For instance for the NCP1117 we have:

Using 25°C as ambient temperature, we can plug this into the equation:

The SOT-223 package used in the Arduno Uno will dissipate at most 0.78W of power. At a typical 100mW; the regulator is well within its recommended operating conditions.

Finally, we can rearrange the equation above to calculate Tj which can give you the temperature on the regulator under a given load:

Again, using 100mW of the Arduino Uno we get:

41C (106F) isn’t very high but you can see that linear regulator can rapidly get toasty. At 500mW we would get for instance 105C (221F): more than enough to burn your fingers.

## In conclusion

There is nothing much else to discuss about linear regulators. You should now be familiar with:

• How linear regulators are working.
• The “drop out voltage” and how to operate the regulator within its recommended conditions.
• How to calculate power wasted in the regulator.
• The direct translation between wasted power and heat rise that can measured on the regulator itself.