How does an LM7805 voltage regulator work?
Voltage regulators achieve "stiffness" via a feedback control loop, where "stiffness" means that a large change in load current causes a small change in voltage.
Both switching and linear regulators include a control loop (historically analog... some of the newer switchers use digital control loops) to adjust some parameter of the circuit so that the output voltage remains constant in the presence of load current changes and input voltage changes.
In a linear regulator the circuit parameter is the pass transistor drive circuit (which produces base current for an NPN/PNP power transistor, gate voltage for a MOSFET).
In a switching regulator the circuit parameter is the duty cycle of the switching element(s).
So there's really two areas you need to understand if you want to get into the details of how regulators work:
- topology design (achieve required limits of current/voltage/etc)
- control loop tuning + stability
Voltage regulators have a transistor which in a control loop can conduct more or less, according to demand, so that's a bit like a variable resistor.
This schematic shows the basic principle upon which most linear regulators are built:
The zener diode is a 6.2V version, so the node marked "feedback" needs about 6.8V to make Q1 conduct. R1+R2 divide the output voltage by 2, so that makes the output 13.6V.
If the output voltage would rise, Q1 would start conducting and pull the base of Q2 down, so that Q2 supplies less current to the output and its voltage decreases again.
If the output voltage will go below the set voltage of 13.6V, Q1 switches off and via R3 the input voltage will give Q2 sufficient current so that the output voltage rises again.
So Q1 will make sure that the output remains at 13.6V.
This is a very basic setup, and stability and line regulation are not optimal. Integrated voltage regulators will add extra components for increased (temperature) stability, current limiting and overheating protection.
This is an excellent way to understand the theory. A linear regulator will use a transistor to step the voltage down as an inline resistor(the transistor can be modeled as a variable resistance) with feedback changing its resistance to get a very dependable output voltage. This method is very low noise but not power efficient in general.
The wikipedia page is not half bad to learn about them. Switching regulators use a method that can be though of more as a charge pump, taking advantage of inductors changing voltage to push a continuous current.