All regular voltage regulators (like 7805) have several disadvantages like output voltage is always lower than input, and some power is dissipated in the control element. Dissipated power is approximately equal to I(Vin-Vout).
There is another way to generate a regulated voltage. The method is different from the previous one. A transistor operates as a saturated switch in a switching regulator, which periodically applies the full unregulated voltage across an inductor in short intervals. During each pulse, inductor current builds up, storing energy on its magnetic field:
Inductor also smooths the output voltage. Feedback circuit with comparator compares the output voltage with reference and this way changes oscillators pulse width or frequency.
Switching regulators have few attractive properties that made them popular. Low power dissipation even if there is a large drop from input to output; switching regulators may generate output voltages higher than unregulated input; they can generate opposite polarity than input; switching regulators can be designed to run AC power line directly with no power transformer. This way, modern DC supplies are lightweight. As an example, you can take a computer power supply block.
But… Switching supplies have side effects- they generate noise and can put hash back to the power line. But these problems have been solved.
Simple explanation of step down:
When the MOS switch opens, the inductor current continues to flow in the same direction. Output capacitor acts as energy smoother. When the switch closes inductor current decreases linearly. Of course, a complete circuit has a feedback circuit that compares output voltage, controls pulse width or frequency.
For instance, lof current fixed +5V regulator MAX638. This chip includes nearly all necessary elements, including a resistor divider.
In MAX638, the switching oscillator runs at 65kHz, and the comparator circuit permits or cuts switching pulses, and this way, efficiency reaches about 85% independently from the input voltage.
When the output voltage is needed greater than input or output voltage has to be opposite polarity to input, then step- switching regulators are used:
Looking at the step-up circuit, we can see that inductor current ramps up during the switch-on. When the switch is off, voltage raises at X point as the inductor attends to maintain a constant current. The diode turns on, and the inductor dumps current into the capacitor. The output voltage can be much larger than the input.
In the inverting circuit, during switch conduction, the current linearly increases from X point to ground. When the switch is off, the inductor pulls X point to negative voltage as much as needed to maintain current flow. The output voltage can be larger or smaller depending on magnitude -defined in feedback.
As step up regulator good example is MAX631:
And as inverting switching regulator MAX637:
MAX637 can have the input of 2V and provide 5V with a greatly reduced maximum output current. External components are not critical as in circuit. They are manufacturer recommended, but for instance, larger inductance lowers the peak current but increases efficiency.
As wee switching regulators are quite handy elements. Power efficiency and lightweight design allow constructing compact design. For instance, step-up regulators are ideal where relatively high voltage is required, like using fluorescent or plasma technology. Switching regulators have another terminology Dc to DC converter. DC to Dc converters or switching regulators is handy where battery-operated design is used. For instance, using an alkaline battery of 9V, which voltage actually starts at 9.5V and steadily drops to 6V. So low power +5V regulator will provide steady 5V with high efficiency over mos all battery life; what cannot be said about linear regulators like 7805 where input voltage has to be much higher to produce reliable output voltage, and of course, a voltage difference is dissipated as heat, what makes battery life very short.