74LS-family logic ICs, 555 timers, and microcontroller boards need a 5 V supply, but batteries and adapters are often 9 V or 12 V. The simplest solution is the 7805 three-terminal regulator. It holds the output at a steady 5 V even when the input varies over 7 to 25 V. This article covers the circuit, parts, heat calculation, and how to build a power board on perfboard that makes 5 V from a 9 V battery or adapter.
Features of the 7805
The 7805 is a 3-pin linear regulator in a TO-220 package.
| Item | Value (approx.) |
|---|---|
| Output voltage | 5 V (about ±4% tolerance) |
| Input voltage | 7 V or more (about 2 V above the output) to 25 V recommended, absolute maximum 35 V |
| Output current | Up to 1 A (needs a heat sink) |
| Pins | Pin 1 input (IN), pin 2 ground (GND), pin 3 output (OUT), in order with the lettered face toward you and the leads down |
A linear regulator throws away the difference between input and output voltage as heat. The structure is simple and has little noise, but efficiency is low. With a 9 V input and a 5 V output, efficiency is about 55% (5 ÷ 9).
The circuit
| Part | Value | Role |
|---|---|---|
| D1 | 1N4007 | Protects the circuit even if the battery is connected backwards (about 0.7 V loss) |
| C1 | 0.33 µF (330 nF) | Input stabilization. Close to the regulator |
| C2 | 100 nF | High-frequency stabilization of the output |
| C3 | 100 µF electrolytic | Absorbs momentary fluctuations of the output voltage |
| R + LED | 1 kΩ + LED | Power indicator. Current about (5 − 2) ÷ 1k = 3mA |
About 0.7 V drops across D1, so the regulator input is battery voltage − 0.7 V. When the 9 V battery is used up and falls below 7.7 V, the output cannot hold 5 V.
Heat calculation
The heat the regulator gives off is as follows.
P = (input voltage - output voltage) × output current
| Input | Current | Heat P | Judgment |
|---|---|---|---|
| 9 V (about 8.3 V after D1) | 100 mA | about 0.33 W | Possible without a heat sink |
| 9 V | 300 mA | about 1.0 W | Heat sink recommended |
| 12 V (about 11.3 V after D1) | 100 mA | about 0.63 W | Feels warm to the touch |
| 12 V | 500 mA | about 3.2 W | Heat sink required, low efficiency |
A TO-220 package can dissipate roughly 1 to 1.5 W without a heat sink (at 25°C ambient, with the surface getting very hot). If it is too hot to touch, the heat is near the limit, so attach a heat sink or lower the input voltage.
Battery life
The capacity of a 9 V alkaline battery is usually around 500 mAh. At 100 mA, it will not last even 5 hours. Reduce the current, add a power switch and turn it off when not in use, or consider a 4.5 V or 6 V arrangement with several AA cells. For experiments, an adapter or the USB 5V power board is more convenient.
Perfboard build tips
- Make the power entry at one end of the board. Solder a 2-pin terminal block or a battery clip.
- Solder the 7805 standing up on the board, and if possible fasten a heat sink with a screw first. The metal tab of the 7805 body is connected to GND (pin 2), so keep it from touching nearby wiring.
- Put the input capacitor C1 close to pins 1 and 2 of the 7805, and the output capacitors C2 and C3 close to pins 3 and 2 (Power Rails, Grounding, and Decoupling Capacitor Placement).
- The polarity of the electrolytic capacitor C3 has the + side on the output (5 V).
- Connect the 5 V output to the top rail of the board and GND to the bottom rail.
- Put a 1 kΩ + LED at the end of the output rail to show the power status.
Checking order
Check the power board on its own before plugging ICs into the circuit.
- With a continuity test, confirm that the 5 V output rail and GND are not connected.
- Connect the battery or adapter and measure the output voltage with a multimeter. 4.8 to 5.2 V is normal.
- Also measure the input voltage and confirm that the value after D1 is 7 V or more.
- Check the heat with a brief touch.
- If the output is normal, turn the power off and then connect the load circuit.
| Symptom | Cause |
|---|---|
| Output is 0 V | Battery reversed (D1 blocks it), connection broken |
| Output lower than 5 V (3–4 V) | Not enough input (under 7 V), load too large |
| Very hot | Overcurrent, short, input voltage too high |
| Output wobbles | A missing or bad capacitor, bad contact |
| Higher than 5 V | A regulator other than a 7805, a faulty part |
Summary
The 7805 turns an input of 7 to 25 V into 5 V, but gives off heat of (input − 5 V) × current. Put a protection diode and capacitor on the input and 100 nF and 100 µF on the output, calculate the heat, and decide whether a heat sink is needed. With this 5 V supply you can run TTL circuits such as the 74LS90 + 74LS47 + FND digit counter. For the basics of diodes and capacitors, see How to Use Diodes and Zener Diodes and Capacitor Types and Polarity.