If you are wiring a 120V AC to 5V DC power supply for a home workshop control panel, smart home hub, or relay board drawing more than 300mA, abandon linear regulators immediately. The concrete pick for a 5V/2A load in 2026 is the RECOM R-78E5.0-2.0 switching SIP module or a bare LM2596S-5.0 IC. Linear topologies will dissipate fatal heat at this voltage drop. This guide covers the exact voltage regulator diagram wiring, from the AC mains primary down to the DC filtering capacitors, including the dropout math that dictates your topology choice.

The Core Decision: Linear vs. Switching Topologies

Before drawing your schematic, you must choose how the regulator handles the voltage differential. A linear regulator (like the LM7805 or LM317) acts as a smart, variable resistor. It burns off excess voltage as heat to maintain a steady output. A switching regulator (like a buck converter) uses a high-frequency MOSFET and an inductor to chop and store energy, transferring only what the load needs.

Criteria Linear (LM7805 / LM317) Switching (LM2596 / MP2307)
Efficiency Low (30% - 50%) High (85% - 95%)
Heat Dissipation Massive (Requires large heatsinks) Minimal (Often no heatsink needed)
Output Noise/Ripple Ultra-low (< 1mV) Moderate (20mV - 50mV switching spike)
Component Count Low (IC + 2 caps) High (IC, inductor, Schottky diode, caps)
Typical Cost (2026) $0.50 - $1.20 $2.50 - $6.00 (module)

Verdict: For digital logic, ESP32 microcontrollers, and relays, switching is mandatory when the input-to-output differential exceeds 3V at currents over 300mA. Reserve linear regulators strictly for low-current analog audio preamps or precision ADC reference voltages.

AC Mains Wiring and Transformer Protection

When integrating a power supply into a home electrical control panel, the AC side wiring must follow NEC-style guidance for Class 2 power sources. We will use a 120V AC to 12V AC step-down transformer (e.g., Hammond 166 series or a standard doorbell-style transformer rated for at least 30VA).

WARNING: Mains Voltage Hazard. 120V AC can be lethal. Always de-energize the circuit at the breaker panel, lock out the breaker, and verify the wires are dead with a tested non-contact voltage tester and a multimeter before making connections. If you are hardwiring this into a branch circuit, local AHJ codes may require a licensed electrician.

Primary Side (120V AC) Wiring:

  • Black (Hot): Connect to the primary fuse holder, then to the transformer primary terminal.
  • White (Neutral): Connect directly to the second primary terminal.
  • Green/Bare (Ground): Bond to the transformer metal core and the metal enclosure chassis.
  • Protection: Install a 0.5A Slo-Blo (time-delay) fuse on the hot leg to handle transformer inrush current without nuisance blowing.

Secondary Side (12V AC) Wiring:

  • Protection: Install a 3A fast-acting fuse on one of the secondary legs before the bridge rectifier.
  • Rectification: Wire the secondary leads to the AC input pins of a 5A bridge rectifier (e.g., KBU810).

Voltage Regulator Diagram Wiring: The 15V-to-5V Design Example

Let's calculate the exact DC voltage hitting your regulator. A 12V AC RMS transformer outputs a peak DC voltage after the bridge rectifier. The formula is: V_peak = (V_RMS × 1.414) - (2 × V_diode_drop).

Assuming a 1.1V drop per diode under a 2A load: (12 × 1.414) - 2.2V = 14.77V DC. We will design for a nominal 14.8V DC input to our regulator.

Node Component / Value Purpose
Rectifier Output 2200µF, 25V Electrolytic Bulk filtering to smooth 120Hz AC ripple
Regulator Input 100nF (0.1µF) Ceramic High-frequency bypass for regulator stability
Switching Node 33µH Shielded Inductor Energy storage for buck conversion
Catch Diode 1N5822 (3A Schottky) Provides freewheeling path for inductor current
Regulator Output 220µF Low-ESR + 10µF Ceramic Tames high-frequency switching spikes

Dropout and Headroom Math:
Your input is 14.8V. Your target output is 5.0V. The headroom (voltage drop across the regulator) is 9.8V.
If you used a linear LM317 at a 2A load, the power dissipated as heat would be 9.8V × 2A = 19.6 Watts.
If you use an LM2596 switching regulator at 92% efficiency, the input power required for 10W out is 10.87W. The heat dissipated is only 0.87 Watts.

Ripple Expectations: A properly wired LM2596 with the low-ESR output capacitor and a ceramic bypass will yield roughly 30mV to 40mV of peak-to-peak ripple. This is perfectly clean for ESP32 microcontrollers, relays, and LEDs, but requires an additional LC pi-filter if you are powering a sensitive analog microphone or DAC.

Thermal Derating and Heatsink Math

What if your project demands a linear regulator for ultra-low noise, but you are pulling 500mA? You must calculate thermal derating to prevent the silicon from hitting its 125°C thermal shutdown threshold.

Assume a TO-220 package LM317 dropping 9.8V at 0.5A. That is 4.9W of heat.
The junction-to-ambient thermal resistance (θ_JA) of a bare TO-220 in free air is roughly 65°C/W.
Temperature rise = 4.9W × 65°C/W = 318°C. Add a 30°C ambient room temperature, and your junction is at 348°C. It will instantly vaporize or trigger thermal protection.

The Fix: You need a heatsink. To keep the junction under 110°C in a 30°C ambient environment, your maximum allowed thermal resistance is (110 - 30) / 4.9 = 16.3°C/W. Subtracting the junction-to-case (3°C/W) and case-to-sink (0.5°C/W with thermal paste), you need a heatsink rated for 12.8°C/W or lower. A standard 2-inch extruded aluminum finned heatsink easily meets this spec.

Decision Tree: Picking Your Exact Regulator IC

Do not guess your topology. Follow this decision matrix based on your specific load parameters to terminate your design with a concrete part number.

Condition / Load Profile Required Topology Concrete Part Pick (2026)
Load < 100mA, Vin - Vout < 5V, noise critical (e.g., analog sensors) Linear (Standard) LM78L05 (TO-92)
Load < 800mA, Vin - Vout < 2.5V, space constrained Linear (LDO) AMS1117-5.0 (SOT-223)
Load 0.5A - 3A, Vin - Vout > 3V, digital logic / relays Switching (Buck) LM2596S-5.0 (TO-263)
Load up to 2A, Vin 7V-28V, drop-in linear replacement needed Switching (SIP Module) RECOM R-78E5.0-2.0 (SIP-3)

Default Recommendation: For 90% of home workshop control panels and smart home hubs requiring 5V at 1A to 2A from a 12V AC transformer, use the RECOM R-78E5.0-2.0. It is a 3-pin SIP switching module that physically fits into a standard LM7805 footprint on your PCB or terminal block, requires zero external inductors or diodes, and runs at 93% efficiency without a heatsink.

Final Wiring Verification and Ripple Testing

Once your voltage regulator diagram wiring is complete, do not just apply power and hope. Follow this bench verification sequence:

  1. Continuity Check: With the mains unplugged, use your multimeter's continuity setting. Verify there is no short between the DC output positive and ground. A reading of less than 2 ohms indicates a solder bridge or backward capacitor.
  2. Unloaded Voltage Test: Power the AC primary. Measure the DC output with no load. A switching regulator should read exactly 5.0V to 5.1V. If it reads 14V, your regulator IC is blown or wired backward.
  3. Load Test: Connect your actual load (or a power resistor bank drawing 2A). Verify the voltage does not sag below 4.8V. If it sags, your bulk input capacitor is undersized, or the AC transformer is rating-limited and collapsing under load.
  4. Ripple Measurement:
    Pro Tip: When measuring switching ripple with an oscilloscope, do not use the long ground spring clip on your probe—it acts as an antenna and will show massive false ringing. Use the probe's ground spring tip directly across the output capacitor terminals, and set the scope to AC-coupling with a 20MHz bandwidth limit.

By treating the AC primary wiring with the same respect as mains branch circuits, and letting dropout math dictate your DC topology, your control panel will run cool, quiet, and reliably for years. For deeper schematic references on buck converter layout, consult the Texas Instruments LM2596 datasheet and always verify your enclosure grounding against NFPA 70 (NEC) Article 250 requirements for equipment grounding conductors.