7805 voltage regulator circuit
A 9 V battery into a 7805 with its 0.33 uF and 0.1 uF capacitors: 5 V out to an LED, until the battery sags below about 6.7 V. There is no microcontroller in it: the simulator solves the 6 parts as a circuit, so it runs the moment you press Run, and nothing needs compiling.
Teaching? Assign it to your class in one click.
Beginner Runs in your browser. Free, and no account needed.
The parts retail for about $5.85. On Mokxi they're free.
How it works
There is no microcontroller in this one, so nothing is compiled: the simulator solves the circuit itself. The file in the editor is the notes that come with it.
// A 7805 voltage regulator: 9 V in, 5 V out.
//
// There is no microcontroller here. Press Run and the simulator solves the
// circuit; the number under the 7805 is its output.
//
// THE PINS. Looking at the front of the TO-220 with the legs down: IN, GND,
// OUT. The tab is GND too. The 7805 holds OUT 5 V above its GND leg whatever
// the input does, as long as the input is high enough.
//
// THE CAPACITORS. 0.33 uF from IN to ground and 0.1 uF from OUT to ground,
// close to the legs. They are on the datasheet because a regulator far
// from its battery or its filter capacitor can oscillate; they cost nothing,
// so they go on every build.
//
// THE DROPOUT. The 7805 needs about 2 V across itself to regulate. A fresh
// 9 V battery is 9.6 V, so the output reads 5.0 V. Drag the battery's charge
// down: at 50 % the battery is 7.2 V and the output still reads 5.0 V, and
// at 40 % (6.7 V) it just holds. Below that the output follows the input
// down: at 25 % the battery is 6.0 V and the output 4.3 V, and a flat
// battery's 4.8 V gives 3.2 V. That is why a 7805 wants 7 V or more in. An
// LDO such as the AMS1117-5.0 needs only about 1.1 V.
//
// THE HEAT. A linear regulator burns what it does not pass on: here the LED
// takes about 7 mA, so (9.6 - 5) V x 7 mA is about 30 mW in the regulator.
// At half an amp it would be 2.3 W, and the 7805 would need a heatsink.
Parts list
7 parts, plus the jumper wires. They retail for about $5.85; on Mokxi they're free.
How it is wired
4 connections, pin by pin, read from the circuit itself. Each line is one set of pins joined together, by a jumper wire or a breadboard strip.
- Battery: AA, coin cell, LiPo pin V+; Voltage regulator pin IN; Capacitor, 330 nF pin 1
- Ground: Battery: AA, coin cell, LiPo pin V-; Voltage regulator pin GND; Capacitor, 330 nF pin 2; Capacitor, 100 nF pin 2; LED, green pin C
- Voltage regulator pin OUT; Capacitor, 100 nF pin 1; Resistor, 330 Ω pin 1
- Resistor, 330 Ω pin 2; LED, green pin A
Change it and keep it
Open it in the editor, change the circuit or the code, and keep your version in a free account.