Parts
LM2596 vs 7805: when a switching regulator beats a linear one, and when it doesn't
By Bulan Sarkar
Both chips give you a steady 5 V from a higher voltage. They do it in opposite ways.
- The 7805 is a linear regulator. It drops the extra voltage across itself and turns it into heat. Input current equals output current, so with 12 V in and 5 V out, about 58 % of the power you pay for warms the tab. It needs two small capacitors, its output is quiet, and it is limited to 1.5 A.
- The LM2596 is a buck (step-down) switching regulator. It chops the input at about 150 kHz and smooths it with an inductor, a Schottky diode and capacitors. TI quotes 80 % typical efficiency for the 5 V version at 12 V in and 3 A out. It takes inputs up to 40 V and loads up to 3 A, but the output carries switching ripple, and you need four extra power parts laid out with care.
Rule of thumb from the numbers below: if (input − 5 V) × load current comes to more than about 1 W, the 7805 needs a heatsink and the LM2596 starts to make sense. Below that, the 7805 is simpler, easier to get right and quieter.
Pinout by package
Printed face toward you, leads down: VIN, output (switch node), ground, feedback, ON/OFF from left to right. The tab is ground.
Source: Texas Instruments LM2596 SIMPLE SWITCHER Power Converter 150-kHz 3-A Step-Down Voltage Regulator, SNVS124G, p. 4 (Figure 6-1 TO-220 top view, tab GND; Table 6-1: 1 VIN, 2 Output (internal switch, swings between about +VIN − VSAT and −0.5 V), 3 Ground, 4 Feedback, 5 ON/OFF)
Printed face toward you, leads down: input, ground, output from left to right. The tab is ground (TI calls it COMMON).
Source: Texas Instruments uA78xx Fixed Positive Voltage Regulators, SLVS056P, p. 3 (TO-220 top view with the tab on COMMON; pin table: INPUT 1, COMMON 2, OUTPUT 3)
Same job, two circuits
Side by side
| Parameter | LM2596T-5.0TO-220-5 | uA7805CTO-220 |
|---|---|---|
| How it works | Buck (step-down) switcher, 150 kHz | Linear: burns (VIN − VOUT) × I as heat |
| Output | 3.3, 5 or 12 V fixed, or adjustable 1.2 to 37 V | 5 V fixed |
| Output current IO | 3 A | 1.5 A |
| Input voltage, 5 V version VI | 7 to 40 V for the specified accuracy; 45 V absolute max | 7 to 25 V recommended; 35 V absolute max |
| Package | 5-pin TO-220 or TO-263 | 3-pin TO-220 (also TO-263) |
| Tab connected to | ground | ground |
| Thermal resistance to air RθJA | 50 °C/W TO-220 on about 1 in² of copper; 50 / 30 / 20 °C/W TO-263 by copper area | 19 °C/W TO-220; 3 °C/W junction to tab |
| Junction temperature, operating TJ | −40 to 125 °C | 0 to 125 °C |
| Parameter | LM2596T-5.0TO-220-5 | uA7805CTO-220 |
|---|---|---|
| Output accuracy25 °C | 4.8 / 5 / 5.2 V | 4.8 / 5 / 5.2 V |
| Efficiency | 80 % typ at 12 V in, 3 A (5 V part) | at most VOUT ÷ VIN: 41.7 % from 12 V |
| Current drawn by the chiptyp / max | 5 / 10 mA running; 80 / 200 µA switched off | 4.2 / 8 mA bias |
| Output noise or ripple | about 0.5 % to 3 % of the output (25 to 150 mV at 5 V) | 40 µV, 10 Hz to 100 kHz |
| Switching frequency25 °C | 127 / 150 / 173 kHz | none |
| Switch saturation voltage3 A, 25 °C | 1.16 V typ, 1.4 V max | dropout 2 V typ at 1 A |
| Current limit25 °C | 3.6 / 4.5 / 6.9 A peak | 750 mA short-circuit, 2.2 A peak |
| Parts around it | input capacitor, inductor (22 to 47 µH for 5 V at 3 A), Schottky diode, output capacitor | 0.33 µF in, 0.1 µF out |
| On/off control | pin 5: above about 1.3 V switches it off | none |
The efficiency row decides most cases. A linear regulator can never beat VOUT ÷ VIN, because the input current equals the output current plus the bias current. From 12 V to 5 V that ceiling is 41.7 %. From 24 V it is 20.8 %, and that is before you check whether the heat is even survivable.
The pin that catches people: LM2596 pin 2 is not your 5 V
The 7805 has the pins you expect: input, ground, output. The LM2596 has five, and pin 2 is labelled Output, but it is the internal switch. TI's pin table says it swings between about (VIN − VSAT) and about −0.5 V at 150 kHz. Your regulated 5 V appears only after the inductor and output capacitor. The feedback pin (4) must connect there, at the far end of the inductor. The pinout drawings at the top of this page show both parts.
- Wire a load straight to LM2596 pin 2 and it gets a 150 kHz square wave with a peak near the input voltage, not 5 V.
- TI asks you to keep the copper on pin 2 as small as possible. That node switches the full input voltage 150,000 times a second, and a big copper pour on it acts as an antenna.
Both tabs are ground, so either chip can bolt to a grounded heatsink or chassis without an insulating pad. The LM317 and AMS1117 tabs carry the output, so they can't (see 7805 vs LM317 vs AMS1117).
Worked examples
1. 12 V to 5 V at 1 A from a 12 V adapter
7805
- Heat in the regulator: (12 − 5) V × 1 A = 7 W, plus the bias current 12 V × 4.2 mA = 0.05 W. Call it 7.05 W.
- Efficiency: 5 W out ÷ (12 V × 1.0042 A) = 41.5 %.
- Without a heatsink, using TI's own 19 °C/W junction-to-air figure for the TO-220: 7.05 × 19 = 134 °C above ambient. At 25 °C in the room that puts the junction near 159 °C, past the 150 °C absolute limit. TI's figure comes from a standard test setup, so a TO-220 standing in a closed box does no better.
- What the heatsink must do: keep the junction at or below the recommended 125 °C. At 40 °C ambient that leaves 85 °C of rise, so the whole path from junction to air must be under 85 ÷ 7.05 = 12.1 °C/W. TI gives 3 °C/W from the junction to the tab, so the heatsink plus the thermal pad must come in under about 9 °C/W. You need a finned aluminum heatsink with a datasheet rating at or below that.
LM2596-5.0
- TI does not print an efficiency for 1 A, only for 3 A (80 %). The curve in TI's Figure 7-3 is the place to read it for your load; don't assume 80 % at every current.
- What we can bound from the table: the switch drops at most 1.4 V at 3 A (VSAT), and it conducts for about 5/12 of each cycle. At 1 A that is at most 1.4 V × 1 A × 0.42 = 0.58 W of conduction loss in the chip, plus 12 V × 10 mA = 0.12 W for the chip's own supply at most. Switching loss and the diode's loss come on top, and they depend on your diode and layout.
- So the LM2596 itself runs on the order of 1 W or less, against 7 W in the 7805. The TO-220 LM2596 is rated 50 °C/W with its leads soldered to about 1 square inch of copper and no heatsink.
Verdict: at 1 A from 12 V the 7805 works only with a real heatsink, and it will warm the box. The LM2596 is the better fit.
2. 12 V to 5 V at 100 mA (a sensor board)
7805
- Heat: (12 − 5) × 0.1 = 0.70 W, plus 0.05 W bias = 0.75 W.
- Rise with TI's 19 °C/W: 0.75 × 19 = 14 °C. No heatsink needed.
- Efficiency: 0.5 W ÷ (12 V × 0.1042 A) = 40 %. You lose 0.75 W, which is fine for a mains adapter and wasteful on a battery.
LM2596-5.0
- At 100 mA the LM2596 is well inside the low-current zone where TI says the inductor current runs discontinuous (TI's section 8.4.1 covers loads of 1 A and below). That is normal operation, but the waveforms ring and the ripple looks different on a scope.
- The chip's own supply current is 5 mA typical, about the same as the 7805's 4.2 mA. A buck does not automatically save power at very light loads.
Verdict: use the 7805. It needs three parts instead of five and no layout care, its output noise is 40 µV, and 0.75 W is easy to shed.
3. 12 V to 5 V at 3 A (an LED strip controller, a few servos)
7805: out. It is rated for 1.5 A. Even at 1.5 A it would burn (12 − 5) × 1.5 = 10.5 W.
LM2596-5.0: this is the exact condition TI uses for the 80 % efficiency figure.
- Input power: 15 W ÷ 0.8 = 18.75 W, so the input current is 18.75 ÷ 12 = 1.56 A. A 12 V, 2 A adapter covers it.
- Total loss: 18.75 − 15 = 3.75 W, shared between the chip, the diode and the inductor.
- A linear regulator at 3 A would draw 3 A from the adapter and turn 21 W into heat. The buck draws about half the current and wastes less than a fifth of the power.
- Parts from TI's quick-design table (Table 9-3) for 5 V at 3 A: 22 µH at 8 to 10 V in, 33 µH at 15 V in, 47 µH at 40 V in. The inductor must be rated for the load current without saturating.
- Catch diode: TI asks for a current rating of at least 1.3 × 3 A = 3.9 A, so a 5 A Schottky such as the 1N5823 or 1N5825 from TI's diode table. Reverse voltage at least 1.25 × the maximum input: 15 V for a 12 V input, so a 20 V part is the floor and a 40 V 1N5825 leaves room for adapter spikes.
- Input capacitor: an RMS ripple-current rating of at least half the load current, 1.5 A here, and a voltage rating about 1.5 × the input (18 V), so a 25 V part for a 12 V supply.
4. 24 V to 12 V at 3 A (a 24 V system feeding 12 V gear)
78xx linear: a 7812 has the same 1.5 A limit. At 1.5 A it would burn (24 − 12) × 1.5 = 18 W. Not practical.
LM2596-12: TI quotes 90 % typical at 25 V in and 3 A out. At 24 V the arithmetic is close to that: 36 W out ÷ 0.9 = 40 W in, 1.67 A from the 24 V side, 4 W of loss. The higher the ratio between input and output, the more a buck wins.
Worked example in numbers
- 7805, 12 V to 5 V at 1 A
- 7.05 W of heat
- Linear ceiling from 12 V
- 41.7 %
- LM2596-5.0, 12 V at 3 A
- 80 % typ
- LM2596 ripple at 5 V
- 25 to 150 mV
Which one fits your job
- Choose the 7805 when the load is small (up to a few hundred mA), the input is within a few volts of 7 V, and you want a quiet output for audio, analog sensors or an ADC reference. It is also the safer pick when you can't spend time on layout: TI asks for short leads on the LM2596's diode and input capacitor, and the 7805 has no such demand.
- Choose the LM2596 when (VIN − 5) × I goes past about 1 W, when the input is 24 V or higher, when the load needs more than 1.5 A, or when the supply is a battery and every wasted watt shortens its life.
- Use both when you need high efficiency and a clean rail: buck down to a few volts above the target with the LM2596, then finish with a linear regulator. TI suggests a post ripple filter when you need less than 20 mV of ripple.
- Neither one works with very little headroom. Both 5 V parts are specified from 7 V in. For 5 V to 3.3 V, look at a low-dropout part (see 7805 vs LM317 vs AMS1117).
Swapping one for another
| Part | Pins | Verdict |
|---|---|---|
| LM2596-5.0 for a 7805 | 5 pins vs IN-GND-OUT | Not pin for pin: it needs an inductor, a Schottky diode and larger capacitors, so a new layout or a ready-made module wired to the 7805 pads.Texas Instruments LM2596 SIMPLE SWITCHER Power Converter 150-kHz 3-A Step-Down Voltage Regulator, SNVS124G, p. 4; Texas Instruments uA78xx Fixed Positive Voltage Regulators, SLVS056P, p. 3 |
| 7805 for an LM2596-5.0 | IN-GND-OUT | Only for loads up to 1.5 A and inputs up to 25 V, and only where (VIN − 5) × I stays small enough to cool: from 12 V at 1 A that is 7 W.Texas Instruments uA78xx Fixed Positive Voltage Regulators, SLVS056P, p. 4 |
| LM2596-ADJ for the fixed 5 V part | same 5 pins | Same footprint; add two feedback resistors to set 5 V. The LM2596 page works the formula.Texas Instruments LM2596 SIMPLE SWITCHER Power Converter 150-kHz 3-A Step-Down Voltage Regulator, SNVS124G, p. 1 |
Tips and checks
- Never use a general-purpose rectifier as the LM2596's catch diode. TI names the 1N5400 series as too slow and says they "must not be used". The 1N4007 is the same kind of slow rectifier; the 1N4007 vs 1N4148 vs 1N5819 page shows why.
- Put the LM2596 input capacitor right at pins 1 and 3 with short leads. TI requires it to absorb the switching current pulses.
- Rate the LM2596 output capacitor for at least 1.5 times the output voltage. TI notes that a 16 V or 25 V part cuts ripple roughly in half compared with a 10 V one, because higher-voltage electrolytics have lower ESR.
- If the output must survive a short circuit, size the diode for the LM2596's current limit (up to 6.9 A peak at 25 °C), not for the load current.
- On a 7805, keep the 0.33 µF and 0.1 µF capacitors. TI measures every figure in its table with them in place.
- Work out (VIN − VOUT) × I for the 7805 before you pick parts. It takes ten seconds and tells you whether you will need a heatsink.
What we'd do
Under about 1 W of drop (a sensor board drawing up to 143 mA from 12 V, or 250 mA from 9 V), we'd use a 7805 and keep its two capacitors. From 12 V at 1 A or more, or from 24 V at any real load, we'd use an LM2596 with a Schottky catch diode and the inductor from TI's table. If the 5 V feeds audio or an ADC and the drop is large, we'd buck down to about 8 V with the LM2596 and finish with a 7805.
Questions people ask
Can I replace a 7805 with an LM2596 on the same board?
Not pin for pin. The 7805 has 3 pins and the LM2596 has 5, and the LM2596 needs an inductor, a Schottky diode and larger capacitors around it. You need a new layout or a ready-made module wired to the 7805's input, ground and output pads.
Why does my LM2596 get hot?
Check the diode and the inductor first. A slow rectifier used as the catch diode, or an inductor that saturates at your load current, both raise losses sharply. Check those against TI's tables (diodes Table 9-4, inductors Table 9-1) before blaming the chip.
Is the LM2596 output clean enough for audio or an ADC?
TI puts typical ripple at 0.5 % to 3 % of the output, 25 to 150 mV at 5 V, at the switching frequency. For audio or precision analog, follow it with a post filter or a linear regulator. The 7805's noise figure is 40 µV, far below that.
What is the maximum input voltage for each?
The 7805 is recommended up to 25 V, with 35 V absolute maximum. The LM2596 runs up to 40 V, with 45 V absolute maximum. At 25 V in and 1 A, a 7805 would have to shed 20 W.
Does the LM2596 need a heatsink at 3 A?
It depends on the input and the copper. At 12 V in, 5 V out, 3 A, TI's typical efficiency leaves 3.75 W of loss in the whole circuit, of which only part is in the chip. TI's through-hole layout example fits a heatsink. The TO-263 version can shed heat into board copper: TI gives 20 °C/W with 3 square inches of copper on top and about 16 on the bottom.
Where to go next
The switching regulator lesson explains how a buck converter works, and the linear regulators lesson covers the 7805 family. Each part has its own page with the full ratings: LM2596 (with the feedback formula and the inductor and diode tables) and 7805 (with a heatsink worked example). For battery runtime, where buck efficiency pays off most, try the battery backup calculator. Other pages that compare parts the same way: 7805 vs LM317 vs AMS1117 and 1N4007 vs 1N4148 vs 1N5819.
One email a month from the bench
New circuits, lessons, part guides and calculators, on the first Sunday of each month.
Used in these lessons
Lessons that go deeper
Datasheets this page was checked against
- Texas Instruments, LM2596 SIMPLE SWITCHER Power Converter 150-kHz 3-A Step-Down Voltage Regulator, SNVS124G (SNVS124G, November 1999, revised March 2023)
- Texas Instruments, uA78xx Fixed Positive Voltage Regulators, SLVS056P (SLVS056P, May 1976, revised January 2015)
Makers revise datasheets. If the copy you download has a newer revision and a number here disagrees with it, the datasheet wins, and we would like to hear about it.