LDO or buck converter? Choosing a voltage regulator (LM7805, AMS1117)
Almost every board needs a fixed voltage, usually 5 V or 3.3 V, from a battery, an adapter or another rail. The two common ways to get it are a linear regulator (LM7805, AMS1117 and other LDOs) and a switching buck converter. Both work. The right one depends on how much voltage you drop and how much current you draw.
You can find LM7805 and AMS1117 in power and regulators. For other regulators, send the part number or your input, output and current through post your requirement.
How a linear regulator works
A linear regulator behaves like a variable resistor that keeps the output steady. The current that flows out also flows in, so the extra voltage turns into heat:
Heat (W) = (input voltage − output voltage) × current
From 12 V to 5 V at 0.5 A, an LM7805 turns 3.5 W into heat. In a TO-220 package without a heat sink that is far too hot. From 5 V to 3.3 V at 0.2 A, an AMS1117 turns only about 0.34 W into heat, which its SOT-223 tab and some copper on the PCB can handle.
Linear regulators are cheap, simple, need only two capacitors, and give a clean output without switching noise. That makes them a good choice for small drops and small currents, for analog circuits, and for sensors.
Dropout voltage
Every linear regulator needs the input to stay a little above the output. This is the dropout voltage. LM7805 needs roughly 2 V, so 7 V in for a steady 5 V out. AMS1117 needs about 1 V or a little more at full current. An "LDO" (low-dropout regulator) needs less, which matters when you run 3.3 V from a single lithium cell that falls towards 3.5 V.
How a buck converter works
A buck converter switches the input on and off quickly and smooths it with an inductor and capacitors. It does not burn the extra voltage as heat, so efficiency is often around 80 to 95 %. From 12 V to 5 V at 2 A, a buck converter stays warm where a linear regulator would need a large heat sink.
The trade-offs are more parts (inductor, diode or second switch, capacitors), switching noise, and layout that matters: keep the input capacitor, switch and inductor loop small. Ready-made buck modules are a good way to start; for production, follow the layout in the converter datasheet.
A quick way to choose
- Small drop (for example 5 V to 3.3 V) and low current: a linear regulator or LDO.
- Large drop or more than a few hundred mA: a buck converter.
- Battery products where every milliamp counts: a buck converter or a low-quiescent-current LDO.
- Noise-sensitive analog: a buck converter followed by an LDO is common.
Always work out the heat with the formula above, and check the package thermal data in the datasheet.
Common questions
Can AMS1117 power an ESP32 board?
It can for light use with good capacitors on input and output, but Wi-Fi transmission draws short current peaks. A regulator with more current headroom, or a buck converter, gives more margin.
Why does my 7805 shut down after a few minutes?
It is probably overheating and its thermal protection switches it off. Reduce the input voltage, add a heat sink, or use a buck converter.
Is a buck converter module safe for a sensor circuit?
Usually yes. If readings become noisy, add filtering or a small LDO after the module.
Do you supply buck converter ICs and modules?
Send the part number, or your input voltage, output voltage and current, and we quote suitable parts in INR with a GST invoice.
More guides
- How to prepare Gerber, BOM and pick-and-place files for PCB assembly in India
- PCB vs PCBA vs SMT stencil: what to order and when
- How to find alternatives for out-of-stock electronic components
- Importing electronic components to India: GST, customs and one invoice
- BOM best practices: MPNs, designators, DNP parts, quantities and attrition
- Choosing PCB specs: layers, thickness, copper, surface finish and solder mask
- SMD resistor and capacitor sizes: 0402, 0603, 0805 and 1206 explained
- ESP32, Arduino, STM32 or 8051: which microcontroller for your project?
- WS2811, WS2812B or SK6812? Choosing addressable (pixel) LEDs