Power & RegulationIntermediate12 min read · November 2026

Linear Power Supply Design Tutorial: Rectifier, Filter & 5V Regulation

Turning noisy AC wall mains or unregulated DC battery packs into rock-solid, ripple-free 5.00 V logic rails requires chaining four distinct electrical blocks cleanly in sequence: voltage scaling, rectification, capacitive energy storage, and closed-loop linear voltage regulation. While switching buck converters dominate high-current battery tasks, classic LM7805 / AMS1117 linear regulators remain unbeatable for ultra-low-noise analog audio preamps, sensor references, and RF synthesis thanks to high PSRR and microvolt noise floors. In this guide you will size transformer secondary margins against capacitor ripple troughs, calculate pass-transistor thermal wattage, and simulate a regulated 5 V power rail inside NodeSim.

Launch This Pre-Wired Circuit in NodeSim
Opens directly inside the ngspice WebAssembly workbench with sources and probes attached — zero signup required.
Simulate Live Circuit →
Switching / Rectifying Power Stage & Output WaveformVinSW/Q1L / FilterDiodeCPWM Switch Node + Filtered Output
Unregulated input supply filtered into a linear voltage regulator delivering flat noise-free 5 V DC output.

1. The Four Stages of a Classic Linear AC-to-DC Supply

Each stage in a regulated linear supply fixes a specific limitation left behind by the previous block. First, a laminated iron-core step-down transformer isolates dangerous mains voltage and drops 120/230 V AC RMS safely to a low secondary winding such as 9 V_RMS (yielding peak AC crests at 9 × √2 ≈ 12.7 V). Second, a full-wave 4-diode bridge steers both AC polarities into unidirectional pulsating arches (~11.3 V_peak after subtracting two 0.7 V silicon diode drops).

Third, an electrolytic reservoir capacitor smooths those 100/120 Hz zero-crossing troughs into a rippling sawtooth DC bus hovering between roughly 9.5 V and 11.3 V under full load. Finally, a three-terminal linear voltage regulator (like the classic 7805) acts as an automatically adjusting series pass resistor—shedding excess voltage gracefully as heat so the downstream load sees an unshakeable +5.00 V DC regardless of load spikes or mains brownouts.

Secondary Peak:      V_sec_pk = V_RMS × √2  (9 V_RMS → 12.73 V_pk)
Post-Bridge Crest:   V_dc_pk  = V_sec_pk − (2 × 0.7 V) ≈ 11.33 V
Reservoir Minimum:   V_min    = V_dc_pk − ΔV_pp  (ΔV_pp ≈ I_load / (2·f_mains·C))
Dropout Requirement: V_min >= V_out + V_dropout  (LM7805 needs V_min ≥ 7.0 V!)

Always verify V_min at worst-case −10% AC mains brownout AND maximum full load current simultaneously!

2. Dropout Headroom & Ripple Rejection (PSRR)

Why can't a 7805 turn a 5.5 V DC supply into 5.00 V? Inside an LM7805 lives an internal Darlington NPN series pass stage plus current-sense shunt requiring ~2.0 V minimum collector-to-emitter headroom (V_dropout) just to stay active in closed-loop regulation. Let sawtooth ripple valleys dip below V_out + V_dropout = 7.0 V for even half a millisecond, and the pass transistor slams open—injecting ugly 100/120 Hz hum valleys straight into your 5 V logic!

Modern Low-Dropout (LDO) regulators swap that NPN Darlington for a PNP or P-MOSFET pass switch, squeezing V_dropout down to 100 mV–350 mV so a 5.5 V rail easily regulates down to 5.0 V—though still obeying minimum input headroom physics. When V_min stays strictly above dropout, active feedback achieves 60 dB to 75 dB Power Supply Rejection Ratio (PSRR), squashing 1 Vpp input sawtooth ripple down below 1 millivolt on Vout!

  • Input/Output Ceramic Decoupling Stability Caps: Linear regulators use internal feedback op-amps that oscillate into MHz bursts without tight bypass capacitors! Always wire 0.33 uF right at Vin and 0.1 uF–10 uF right at Vout close to pins.
  • Why Picking an Oversized Transformer Backfires: Using an 18 V_RMS winding instead of 9 V_RMS lifts rectified V_dc_pk above 24 V—quadrupling pass-regulator heat dissipation for zero functional benefit.

3. Thermal Dissipation & Efficiency Calculations

Linear regulators pass load current straight through from input to output (neglecting tiny ~5 mA ground quiescent current). Consequently, all excess potential difference turns irreversibly into heat: P_heat = (V_in_avg − V_out) × I_load, capping maximum theoretical efficiency strictly at V_out / V_in.

At 9 V average rectified bus supplying 5 V at 500 mA, regulator dissipation sits comfortably at (9 − 5) × 0.5 = 2.0 W—already warming a bare TO-220 package roughly +100 C above room air without a heatsink! Pull 1 A cleanly off a 12 V bus (7 W dissipation) without a clipped aluminum heatsink, and internal thermal shutdown cuts output completely within seconds.

Power Dissipation: P_diss = (V_in_avg − V_out) × I_load + (V_in_avg × I_q)
Junction Temp Rise: T_J = T_ambient + (P_diss × θ_JA)   (TO-220 bare θ_JA ≈ 50–65 °C/W)
Linear Efficiency:  η ≈ (V_out / V_in_avg) × 100%

4. Testing Line & Load Regulation Inside NodeSim

Click Simulate Live Circuit above to launch NodeSim's pre-wired 5 V linear regulator testbench. Run DC Sweep (.dc) ramping Vin from 0 V smoothly up to 15 V: note carefully how Vout rises linearly behind Vin through the dead dropout zone below ~6.5 V–7.0 V, then flattens into an unwavering 5.00 V horizontal plateau across 7 V to 15 V!

Next overlay an AC ripple onto Vin or toggle Transient load steps across R_load to inspect how rapidly closed-loop regulation holds steady 5.00 V output under changing current demand.

Reference Component Values & Bill of Materials

Part / DesignatorNominal ValueRole in Circuit
Vin (Unregulated Supply)9 V – 12 V DC/RectifiedProvides rectified bus comfortably exceeding Vout + dropout headroom
U1 (Linear Regulator)LM7805 / 5V RegActive closed-loop pass element pinning output strictly to +5.00 V
Cin (Input Bypass)10 uF / 0.33 uFLowers high-frequency source impedance preventing regulator oscillation
Cout (Output Stability)10 uFSupplies fast microsecond load transient steps before loop responds
RL (Load Resistor)100 Ohm (50 mA)Models downstream regulated microcontroller or analog load current

Expected Waveforms & Simulation Verification

Probe / NodeAnalysis TypeExpected WaveformEngineering Check
Vout vs Vin SweepDC Sweep (.dc)Tracks Vin minus dropout below ~6.8 V, then locks cleanly at +5.00 VClean visualization of regulator dropout threshold and line regulation
Vout Under RippleTransient (.tran)5.000 V with < 5 mV ripple despite ±1 V input swingQuantifies active PSRR rejection of input rectifier sawtooth
I(Vin) vs I(RL)DC Operating (.op)I(Vin) ≈ I(RL) + ~5 mA quiescentConfirms current passes directly through series regulator (efficiency = Vout/Vin)

Troubleshooting Common SPICE & Bench Mistakes

Regulated output stays stuck below 4.5 V and drops whenever load rises
Input voltage sags into Dropout! Either unregulated transformer RMS voltage is too low, filter capacitor is too tiny allowing ripple troughs below 7 V, or over-current protection triggered.
Regulated rail oscillates loudly at hundreds of kHz in hardware
Missing input or output bypass decoupling capacitors close to pins! Some LDOs require strict minimum/maximum ESR on Cout (Check datasheet—some older LDOs fail on ultra-low ESR ceramics without a 1 Ω series resistor).
Output climbs slowly above 5.0 V with zero load attached
Check ground pin continuity! If the GND terminal on a 7805 breaks open, quiescent current pulls Vout all the way up near Vin.

Hands-On Lab Exercises in NodeSim

  1. Run a DC Sweep from 0 V to 15 V in NodeSim and identify the exact Vin voltage where Vout enters clean 5.00 V regulation.
  2. Connect an AC + DC source (9 V DC + 1 Vpk 120 Hz sine ripple) ahead of the regulator and measure exact output attenuation in Transient mode to calculate realized PSRR in dB.
  3. Combine a full-wave 4-diode bridge rectifier and 1000 uF cap ahead of the 5 V regulator, then watch how lowering C down toward 47 uF eventually exposes 120 Hz dropout valleys.
Ready to run your own numbers?
Open this schematic live in NodeSim or export an IEEE PDF lab report.
Related Guides:5V Regulator Lab TemplateZener Shunt RegulatorDiode RectifiersBuck Converter (High Efficiency)Voltage Divider