A linear regulator is a component that maintains a stable output voltage by dissipating excess energy as heat. They are the simplest way to obtain clean power, although that simplicity comes at a cost.
In the previous step, we managed to convert alternating current into raw direct current. We had, for example, about 16 V with a slight “wobble” (ripple).
But if your board needs 5.00 V, you cannot feed it 16 V because it will fry. Nor is it advisable to give it a voltage that fluctuates. You need precision and stability.
To achieve that stability, we use linear regulators. They are simple components that maintain the output within their specifications as long as the input, load, and temperature remain within the allowed range.
Their prime examples are the 78XX series and the versatile LM317.
What is a linear regulator?
Imagine a linear regulator as a smart variable resistor that adjusts at the speed of light.
The regulator is placed between the input (unstable) and the output.
- If the input voltage rises, the regulator increases its internal resistance to “brake” the excess.
- If the load demands more current and the voltage tries to drop, the regulator lowers its resistance to let more energy through.
The goal is to keep the output locked onto a target value.
The 78XX Series (the classics)
If you open any old electronic device or a basic electronics kit, you will find a three-legged component called a 7805, 7812, etc.
The name tells us everything:
- 78: indicates it is a positive voltage regulator.
- XX: indicates the output voltage.
- 7805: 5 V output (the king of digital electronics).
- 7809: 9 V output.
- 7812: 12 V output.
Basic Connection
It is ridiculously easy to use.
- Pin 1 (Input): unregulated voltage (e.g., 9 V to 24 V).
- Pin 2 (Ground): common ground.
- Pin 3 (Output): fixed regulated voltage (e.g., 5 V).
To prevent the regulator from oscillating (going crazy), it is essential to place two small ceramic capacitors (typically 100 nF and 330 nF) very close to its pins, one on the input and one on the output.
The Important Detail: The Minimum Margin
A linear regulator cannot perform miracles. To regulate correctly, it needs the input voltage to be slightly higher than the output voltage. This margin is often called dropout.
For example, a 7805 will not give you a stable 5 V if you power it with 5.2 V. It needs a much larger margin, typically 7 V or more to work comfortably.
The LM317 (the adjustable one)
What if I need 3.3 V? Or 7.2 V? Or do I want to make a variable laboratory power supply? For this we have the LM317.
Unlike the 7805, the LM317 does not have a fixed internal voltage reference connected to ground. Instead, it has a pin called ADJ (adjust).
The LM317 always tries to maintain 1.25V between the Output pin and the Adjust pin. Using two resistors (R₁ and R₂), we can “trick” it into raising the output voltage to whatever we want.
By replacing
The Big Advantage: Low Noise
Why do we still use these chips designed in the 1970s? First, for nostalgia. And to a lesser extent, because they are quiet.
By having no internal switching (nothing turning on and off at high frequency), the output is an extremely clean continuous line.
- They are ideal for audio (amplifiers, guitar pedals).
- They are ideal for precision analog sensors and ADC converters.
- They are very cheap and require few external components.
The Big Disadvantage: Inefficiency
Here comes the pain. Remember we said it works like a “variable resistor”. What does a resistor do with the excess energy? It converts it into heat.
The linear regulator lowers the voltage by burning off the difference.