Voltage Regulators
The voltage regulator parts model linear (series-pass) regulators that turn a higher, possibly noisy input voltage into a clean, stable output. de:volt ships fixed-output regulators (7805, AMS1117-3.3, AMS1117-5.0) and one adjustable regulator (LM317). All four are linear regulators: they drop the difference between input and output across an internal pass element, so the excess turns into heat.
Fixed regulators
These hold a preset output as long as the input has enough headroom above it.
| Part | Vout | Dropout | Max current | Package |
|---|---|---|---|---|
| 7805 | 5.0 V | ~2.0 V | 1.0 A | TO-220 |
| AMS1117-3.3 | 3.3 V | ~1.1 V | 0.8 A | SOT-223 |
| AMS1117-5.0 | 5.0 V | ~1.1 V | 0.8 A | SOT-223 |
The AMS1117 parts are low-dropout (LDO): they regulate with as little as ~1.1 V of headroom, so the AMS1117-5.0 runs cooler than a 7805 when the input is close to 5 V.
Fixed pinout
All three fixed regulators share the same three-pin model.
| Pin | Label | Description |
|---|---|---|
| in | IN | Unregulated input |
| gnd | GND | Ground reference |
| out | OUT | Regulated output |
Pin order differs by package. On the 7805 (TO-220) the flat face forward gives IN / GND / OUT left to right, and the metal tab is GND. On the AMS1117 (SOT-223) the large tab is OUT. Always check the datasheet pinout for your physical part.
Adjustable regulator (LM317)
The LM317 has no fixed output. Instead it holds a constant 1.25 V reference between its OUT and ADJ pins, and you set the output with two external resistors:
Vout = 1.25 * (1 + R2 / R1)R1 connects OUT to ADJ; R2 connects ADJ to GND. A common starting point is R1 = 240 Ω with R2 to ground. For example, R1 = 240 Ω and R2 = 720 Ω give Vout = 1.25 * (1 + 720/240) = 5.0 V. The output is adjustable from ~1.25 V (R2 = 0) up to ~37 V.
LM317 pinout
| Pin | Label | Description |
|---|---|---|
| in | IN | Unregulated input |
| adj | ADJ | Adjustment / feedback (1.25 V below OUT) |
| out | OUT | Regulated output |
The LM317 pin order is not the same as the 78xx series. On the TO-220 package, flat face forward, it reads ADJ / OUT / IN left to right, and the metal tab is OUT (not GND). The ADJ pin draws ~50 µA of bias current, so R1 should be small enough that the divider current swamps it — the catalog recommends R1 ≥ 120 Ω, and the common 240 Ω gives ~5 mA of divider current, far above the 50 µA bias so it barely shifts Vout.
| Spec | Value |
|---|---|
| Vref (OUT − ADJ) | 1.25 V |
| Dropout | ~2.0 V |
| Max current | 1.5 A (with heatsink) |
| Output range | 1.25–37 V |
How the simulation behaves
The engine models each regulator with three operating regimes. Which one is active depends on the input voltage and the load current you draw.
- Constant-voltage (CV). With enough input headroom and a load under the current limit, the output sits at its target (or the divider value for the LM317). This is normal regulation.
- Dropout. If the input falls below Vout + dropout, the regulator can no longer hold the target and the output follows the input down (minus the dropout voltage). For the 7805 the input must stay above ~7 V; for the AMS1117 parts above Vout + ~1.1 V; for the LM317 above Vout + ~2 V.
- Current limit. If the load tries to pull more than the limit (1.0 A for the 7805, 0.8 A for the AMS1117, 1.5 A for the LM317), the regulator caps the current and the output sags.
Because a linear regulator dissipates P = (Vin − Vout) * Iout, a large input-to-output gap at high current means a lot of heat. In real hardware you need a heatsink once dissipation rises past roughly 500 mW.
Input and output capacitors
Linear regulators want a small ceramic capacitor near the input to absorb supply transients and an output capacitor for stability.
- 7805: 0.1 µF ceramic close to IN and OUT.
- AMS1117: these LDOs need bulk capacitance — about 10 µF on both input and output.
- LM317: 0.1 µF on IN and ~1 µF on OUT.
Example circuit
A 9 V battery regulated down to a 5 V logic rail with a 7805:
9V Battery + ─── IN ──[ 7805 ]── OUT ─── +5V rail
│
0.1µF ┤ GND ┤ 0.1µF
│
9V Battery − ──────────┴────────────────── GNDAdjustable 5 V rail from the LM317 (R1 = 240 Ω, R2 = 720 Ω):
Vin ─── IN ──[ LM317 ]── OUT ──┬─── Vout (5.0 V)
│ │
│ R1 240 Ω
│ │
└── ADJ
│
R2 720 Ω
│
GNDTune R2 (or swap it for a potentiometer) to dial Vout from 1.25 V upward.