MyRoboPath
electronics16 min readUpdated 2026-03-14Beginner

Voltage Regulators for Beginners: Linear 7805 vs Buck & Boost Converters

Power your robotics electronics cleanly: compare linear regulators (LM7805, AMS1117) with high-efficiency switching DC-DC Buck (step-down) and Boost (step-up) converters.

MyRoboPath Engineering Lab
Peer-Reviewed Open-Source Hardware & Firmware Guide

Key Engineering Takeaways

  • Microcontrollers require exact voltages (+5.0V or +3.3V); unregulated battery packs fluctuate continuously as they discharge.
  • Linear Regulators (LM7805) burn off excess voltage directly as wasted heat: P_loss = (V_in - V_out) · I_load.
  • Dropout Voltage is the minimum headroom voltage required above V_out (2.0V for 7805; 1.1V for AMS1117 LDO).
  • Switching Buck Converters use inductors and PWM switching to step down voltage with 90-95% efficiency without heat sinks.
  • Boost Converters step voltage UP (e.g. stepping a 3.7V Li-ion cell up to 5V or 12V).
Prerequisites
  • Ohm's Law, Inductors, and Power (Watts)
Required Hardware / Tools
  • LM7805 5V Linear Regulator (TO-220)
  • LM2596 Buck Converter Module
  • 12V Battery / DC Power Supply
  • Multimeter

Why Voltage Regulation is Critical in Robotics

A fresh 3S LiPo battery pack starts at **12.6V** at full charge and steadily drops down to **9.6V** when empty. If you connect this battery directly to sensitive 5.0V or 3.3V microcontrollers, they will instantly explode from overvoltage. If you connect it to an analog sensor, sensor calibration will drift continuously. A **Voltage Regulator** maintains a rock-solid, stable output voltage regardless of battery drain or fluctuating motor load currents.
Voltage regulation waveform diagram
Figure 4.1: Fluctuating battery input converted into steady, flat regulated 5.00V DC rail.Visual Guide

Linear Regulators (LM7805, LM317 & AMS1117-3.3)

A **Linear Regulator** acts like an automatically adjusting variable resistor. An internal feedback reference dynamically adjusts an internal pass transistor to drop the exact excess voltage needed to keep V_out constant. ### Common Linear Regulators: - **LM7805 (TO-220 Package)**: Outputs fixed +5.0V at up to 1.5A. Standard pinout: **Pin 1 = Input, Pin 2 = Ground, Pin 3 = Output**. - **AMS1117-3.3 (SOT-223 SMD)**: Low Dropout (LDO) regulator delivering +3.3V for modern microcontrollers. - **Input/Output Capacitors**: Always connect a 10µF capacitor to the input and a 100nF + 10µF capacitor to the output right at the pins to prevent internal oscillation!
LM7805 linear regulator pinout schematic
Figure 4.2: LM7805 pinout (Input, GND, Output) and required decoupling filter capacitors.Visual Guide

The Heat Dissipation Formula (Why Linear Regulators Boil)

Because a linear regulator behaves like a series resistor, all excess voltage multiplied by circuit current is converted directly into **pure thermal heat**: **Formula:** P_dissipated = (V_in - V_out) × I_load ### Example: Stepping 12V Battery to 5V for a 1.0A Load: **Formula:** P_heat = (12 V - 5 V) × 1.0 A = 7.0 Watts of HEAT! - Power delivered to load: 5V × 1A = 5.0W. - Efficiency: (5W / 12W) ≈ 41.6% (Over half your battery is wasted boiling air!). - Without a massive aluminum heat sink, the LM7805 will reach 120^circC and trigger thermal shutdown in seconds.
Linear Heat RuleOnly use linear regulators when the voltage drop (Vin - Vout) is small (<2V) or when current draw is very low (<100mA).

Switching Buck Converters: 90%+ Step-Down Efficiency

For high-power robotics, **Switching Buck Converters (Step-Down)** are vastly superior to linear regulators: ### How Buck Converters Work: 1. High-frequency MOSFET switches V_in ON and OFF at 150kHz - 1.5MHz. 2. A power inductor (L) stores magnetic energy during the ON pulse and smooths current during the OFF pulse. 3. A Schottky catch diode and output filter capacitor provide smooth DC voltage. Because the transistor is either fully ON or fully OFF, buck converters achieve **90% - 96% energy efficiency**, delivering 5V / 3A without even getting warm!
LM2596 DC-DC buck converter module
Figure 4.3: LM2596 switching DC-DC buck converter module with inductor and potentiometer tuning dial.Visual Guide

Frequently Asked Questions

What is a Boost Converter?

A Boost Converter (Step-Up) uses an inductor to boost a lower input voltage to a higher output voltage (for example, boosting a single 3.7V Li-ion battery cell up to 12V to run standard DC motors).

Tags:#Voltage Regulators#LM7805#AMS1117#Buck Converter#Boost Converter#Power Electronics