# Proper use of a voltage regulator

I want to power a prototyping kit for an 8 pin picaxe micro-controller with a 9v battery (the board itself requires a 5v input).

I have the following regulator: https://www.sparkfun.com/products/107

On the 3rd page of the data sheet says that for that 5v regulator, the min voltage is 7 and the max voltage is 25 (input).

However, in the comments section of the first link,a few people said that it is not a good idea to use this regulator to reliably drop voltage from 9v to 5v.

Questions: What do you think? Does that voltage regulator fit my expectations?

What would happen if I find that 5v battery and connect the 5v battery to the voltage regulator? What voltage would it output?

Thanks so much!

-
If you have a 5V battery, you don't use a regulator. –  Kaz Sep 22 '12 at 7:40

The regulator will work perfectly if you keep within the datasheet specs. If you supply it with less than 7V it will lose regulation.

Things to be aware of are that if you supply power with a 9V battery and try and draw too much current, the battery voltage will eventually sag below the 7V required (this is likely what was happening to the first commentor)

Also, the higher your input voltage, the more power is dissipated in the regulator so you may need a heatsink. There are many answers on here that go through all this. To tell you whether you would need one we would need to know how much current you are planning on drawing from it at what input voltage.
If it's 9V, then assuming a maximum ambient temperature of 50°C, a maximum operating temp of 125°C:

(125 - 50) / 19 = 3.95W maximum.
at 9V:
3.95W / (9V - 5V) = ~1A maximum

If it's just the microcontroller you are powering though, then it's almost certainly no problem. As we can see over an amp would be needed to needed to reach maximum operating temperature (even if reached, it's unlikely to break - it will just shut down) Your kit will probably only draw a few milliamps, maybe up to 100mA with all pins driving heavyish loads.

-
Thx =) yeah, the only thing I'm going to be powering off this is the micro-controller for now (it's for the same proto-board that you answered [electronics.stackexchange.com/questions/41810/…). –  stackOverFlew Sep 20 '12 at 23:01
Ah right, that should have no problems at all. –  Oli Glaser Sep 20 '12 at 23:09

The LM7805's a fairly standard linear regulator. What that means is that it has a transistor inside it that effectively acts as a big variable resistor, connected in series with the circuit you're powering, whose resistance is continuously adjusted so that the output voltage is 5V. Now like any resistor, this produces heat, and the amount of heat produced is equal to the current through the regulator times the voltage drop across it. So higher input voltages mean it can handle less current before it overheats.

One quirk of linear regulators is that there's a minimum voltage drop across them called the dropout voltage. If your input voltage isn't higher than the output voltage by at least that amount the regulator "drops out" of regulation and the output voltage tracks the input voltage minus the dropout voltage. Since its dropout voltage is about 2 volts, if you put 5 volts in you could expect to get about 3 volts out. The LM7805's old as the hills and there are a whole bunch of "low drop out" regulators with dropout voltages in the low hundreds of millivolts, though even they require an input voltage higher than the output voltage. A lot of them are surface-mount parts unfortunately.

-

You need at least 7 V since the dropout is typically 2 V. Since that is typical, it may be more and you may need more than 7 V.

9 V to 5 V is 4 V. That times the current is the power lost in the regulator. If that is too high the part may stop working or get very hot.

A 5 V input to the regulator might get you 3 V out. It definitely won't get you 5 V out.

-
Wish I could have accepted both as your answer deals more completely with the second question. Thanks a lot! –  stackOverFlew Sep 20 '12 at 22:58

If you're running off batteries, don't waste energy with a regulator. Maybe the board will run off three or four AA batteries in series.

The people who made the 5V board probably thought about power dissipation, which is why they made it run off 5V rather than 9V. But, here you are, trying to us 9V to drive a heater (which also puts out 5V for the board as a side effect).

Although regulators provide a fixed voltage, the main reason for their use is that they eliminate the power supply ripple from rectified AC that filter capacitors alone are not able to remove. Regulators do this actively: they contain a feedback-based amplifier which amplifies a reference voltage (e.g. provided by a temperature-stable Zener) and monitors the amplified output voltage, adjusting the gain so that it is ruler flat over time.

So they are used even for circuits that could run off a range of voltages perfectly well: a flat, ripple free voltage is often more important than a particular, precise voltage value (though the latter is undeniably also important sometimes!).

Since you're running off batteries, you do not have power supply ripple, and so the only reason for using a regulator would be that you're overly concerned with running the board off 5.0 volts, which may be completely unnecessary.

-
A look at the picaxe web site tends to confirm what I wrote. Quote: "All the latest (M2 and X2) PICAXE parts can be run at 3V, 4.5V or 5V. Most people generally use 4.5V from a 3xAA cell battery pack. There is no need to build special interfacing circuits to run with 3V parts like GPS or XBee modules - simply run the PICAXE at 3V as well." Source: picaxe.com/What-is-PICAXE/PICAXE-Pinouts –  Kaz Sep 22 '12 at 8:16