Powering your gadgets generally seems like a necessary evil. To help with this [Felipe La Rotta] made a really nice bench power supply using a PC power supply and a LM317 adjustable voltage regulator. PC power supplies are an example of a switched power supply(more on that later). The LM317 is a type of linear voltage regulator that allows for adjusting the output voltage by varying some resistors. Whats the best way to power your circuits? well that depends…
Usually the first step for powering your product is batteries, they are easy, cheap, and can be strung together to get a voltage close enough to what you need (hey sometimes it doesn’t really matter that much). But What do you do when your super picky sensor only accepts 3.3V? A quick and dirty voltage divider will bring the battery voltage down to 3.3V.
Unfortunately the more the sensor pulls on the divider the farther from 3.3V it will be. This is the basic principle of load regulation. The general idea is that the more current you need the farther off your voltage will be. Well what if there was a buffer in there so that the circuit doesn’t affect the voltage divider at all. Maybe something like this.
But then after a day or so the sensor isn’t sensing very accurately. The voltage going into the sensor is now only 2.8V. This is the second problem with a voltage divider; it’s sensitive to the supply voltage. This is called line regulation. Basically as your battery voltage drops so will your output voltage. What would be useful is a voltage that doesn’t change, that way the output could be based on that. Here is where the Zener diode comes in. The voltage across a Zener is set when it’s made and it varies very little with respect to current (after it gets into breakdown). So now the Zener can be used as a reference, and then the OP-AMP buffers that to the output.
This is the general idea of how voltage regulators work. Luckily there is no need to make one of these for every project because companies sell them in nice little 3 pin packages. All you have to do is hook up ground, the unregulated voltage, and it will regulate the output on the third pin. Linear regulators address both load and line regulation and everybody’s happy, right? Well maybe not. Say a regulator takes in 9V from the battery and supplies 3.3V to a circuit and the circuit responds by drawing in 500mA. This means that the power going into the regulator is 9V*500mA = 4.5W and the power out of the regulator is approximately 3.3V*500mA=1.65W. What happened to the other 2.85W? It was burned off as heat inside of the voltage regulator. That means only about 57% of the power even makes it to the load; The rest is wasted.
Enter switched mode power supplies (like the one in your pc). These circuits are made using inductors, capacitors and switches (transistors) in order achieve much higher efficiencies. They work by constantly adjusting the current through an inductor resulting in higher or lower output voltages. Switching supplies may be more efficient but they are also more complex, harder to implement, and can be rather noisy circuits.
voltage divider: very easy, cheap, bad regulation
Linear voltage regulators: easy, good regulation, poor efficiency
switching power supplies: hard, noisy, good efficiency