Voltage regulator
A linear voltage regulator: the 7805, the AMS1117-3.3 module or the MCP1700-3.3 low dropout part. Aliases: LM7805, LDO, 3.3 V regulator.
A linear regulator is a transistor between IN and OUT that an amplifier opens
just far enough to hold OUT at its voltage. Two things follow. It needs some
voltage across itself, the dropout, so below OUT plus the dropout on IN the
output follows the input down. And whatever the load draws comes through from IN:
a 7805 turning 12 V into 5 V at half an amp burns 3.5 W as heat.
Pins
| Pin | What it does |
|---|---|
IN |
The unregulated input. |
GND |
Ground, and the bias current's way out. |
OUT |
The regulated output. |
The legs are drawn where the real part has them. The 7805 reads IN GND OUT from
the left, printing toward you, with the tab on ground. An MCP1700 in TO-92, flat face
toward you and legs down, reads GND IN OUT, and is drawn that way. The AMS1117-3.3
is drawn as the little blue module, whose header reads VIN GND VOUT; the bare
AMS1117 in SOT-223 soldered on it is GND OUT IN with the tab on OUT, and not
every module puts its header in the same order, so follow the silkscreen on the one
in your hand.
Properties
model is 7805, AMS1117-3.3 or MCP1700-3.3.
legs is package (the model's real order, above, which every new part gets) or
schematic, which draws IN GND OUT from the left whatever the model, the way every
regulator was drawn before the setting existed. A project saved then opens with
schematic, so its breadboard keeps every leg in the hole it was in. Only the
MCP1700 is different between the two.
model |
output | dropout | bias current | current limit | input |
|---|---|---|---|---|---|
7805 |
5 V | 2 V at 1 A | 4.2 mA | 2.2 A peak | 7 V to 35 V |
AMS1117-3.3 |
3.3 V | 1.1 V at 0.8 A | 5 mA | 1.1 A | 4.4 V to 15 V |
MCP1700-3.3 |
3.3 V | 178 mV at 250 mA | 1.6 uA | 408 mA | 3.5 V to 6 V |
The figures are the typical ones from TI's uA7805C, AMS's AMS1117 and Microchip's MCP1700 sheets.
While it runs
The readout is OUT above GND.
What the model gets right
Dropout. The pass transistor is a threshold and a resistance, fitted to meet each sheet's dropout at its test current: the 7805 as 1.7 V plus 0.3 ohm, the AMS1117 as 1.0 V plus 0.125 ohm, the MCP1700 as 0.71 ohm. So a 7805 on four AA cells (6.4 V fresh) gives about 4.7 V, and an AMS1117-3.3 on one full 18650 (4.2 V) gives about 3.2 V. The MCP1700 holds 3.3 V from the same cell, which is why battery projects use it.
The input current is the output current, plus the bias current, which goes out
of GND. A 9 V battery feeding a 7805 and 50 mA sags by (50 + 4.2) mA times its
own resistance.
Load regulation. The output droops a few millivolts from no load to full load, fitted to each sheet: 15 mV for the 7805, 7 mV for the AMS1117, 1% for the MCP1700.
One way only. A regulator cannot sink current, and with its input gone it passes nothing back.
What it does not model
The 7805's foldback to 750 mA into a dead short, heat and thermal shutdown, line regulation and ripple rejection, the AMS1117's 5 mA minimum load, and the output capacitors every sheet asks for: a real regulator can oscillate without them, and this one cannot. The body diode that lets a real CMOS regulator conduct backwards is not modeled either. The fits to the dropout are assumptions that meet the sheets at their test currents.
Common mistakes
Feeding a 7805 from less than 7 V. It drops out and gives less than 5 V.
Running an AMS1117-3.3 from one Li-ion cell. It needs about 4.4 V to make 3.3 V.
Forgetting the heat. A 7805 dropping 7 V at half an amp needs a heatsink.
See it in action
Solar sensor node makes its 3.3 V rail with an MCP1700 from an 18650. Open it at /templates.