5
\$\begingroup\$

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).

data-sheet: https://www.sparkfun.com/datasheets/Components/LM7805.pdf

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!

\$\endgroup\$
2
  • \$\begingroup\$ If you have a 5V battery, you don't use a regulator. \$\endgroup\$
    – Kaz
    Sep 22, 2012 at 7:40
  • \$\begingroup\$ Whatever you do, don't use 4 batteries in series. I understand the picaxe m/c is very fussy about voltage and anything over 5v will fry it for breakfast. \$\endgroup\$ Dec 9, 2012 at 6:27

6 Answers 6

8
\$\begingroup\$

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.

\$\endgroup\$
3
  • \$\begingroup\$ 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/…). \$\endgroup\$ Sep 20, 2012 at 23:01
  • \$\begingroup\$ Ah right, that should have no problems at all. \$\endgroup\$
    – Oli Glaser
    Sep 20, 2012 at 23:09
  • 1
    \$\begingroup\$ A TO-220 package has a thermal resistance of 50°C/W to ambient. Your maximum current calculations are incorrect. Additionally, the part is an L7805, not a LM7805. The L7805 has a maximum output current of 500mA. \$\endgroup\$
    – metacollin
    Feb 20, 2016 at 6:45
8
\$\begingroup\$

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.

\$\endgroup\$
4
\$\begingroup\$

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.

\$\endgroup\$
1
  • \$\begingroup\$ Wish I could have accepted both as your answer deals more completely with the second question. Thanks a lot! \$\endgroup\$ Sep 20, 2012 at 22:58
3
\$\begingroup\$

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.

\$\endgroup\$
1
  • \$\begingroup\$ 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 \$\endgroup\$
    – Kaz
    Sep 22, 2012 at 8:16
2
\$\begingroup\$

If you want to get more use out of the battery just use a LDO (Low drop out regulator)

\$\endgroup\$
2
  • 3
    \$\begingroup\$ I don't quite get how this works. If you have 9 volts in, 5 volts out, and a linear regulator, won't the loss always be exactly the same, regardless of regulator type/model etc.? With efficiency being ~5/9 = 55.55%? LDO or not, it still has to drop the voltage somewhere. \$\endgroup\$
    – exscape
    Sep 21, 2012 at 7:37
  • 1
    \$\begingroup\$ that is true, it's just that a LDO can operate to closer to teh output voltage. So you can run the battery down more before the regulator stops regulating. For example: using a 7805 your battery starts at 9 and runs to 7 before dropping out. And LDO with say 0.3 Volts of headroom the battery starts at 9 and runs to 5.3 V before loosing regulation. That doesn't mean that you get 3.7/2 X more power out as the battery can be non-linear. It does mean that you will get more power out. But you're right same amount of power scrubbed [I*(Vin-Vout)] \$\endgroup\$ Sep 21, 2012 at 15:51
1
\$\begingroup\$

There are a few issues here.

  1. The datasheet on Sparkfun's site is for a different regulator than the one they're actually selling and shipping to people.

  2. Batteries are a pain in the butt

The regulator sparkfun sells is the ST L7805C, not the old LM7805 stalwart we know and love. The L7805C is an extra crappy (but cheap!) clone of the LM7805. By clone, I mean it does the same thing and has similar specs, but it isn't the same part just made by a different company. It's a independantly designed part. Here is the actual datasheet for the part you're using. The critical differences are as follows:

  1. The L7805C requires a minimum load of 5mA for the output to be in regulation. The quiescent current does NOT count towards that number. It also has a maximum output current of 500mA, not 1 or 1.5A. It thirdly has a thermal resistance of 50°C/W, the numbers in the other answer for power dissipation are nonsense. If you have an ambient of 50°C, you have 100°C of temperature headroom. 2W will cause this part to heat up 100°C above ambient. Any more than that, and you'll need to lower it's thermal resistance to ambient with a heatsink or copper pour.

  2. The L7805C has a typical dropout of 2V. A typical rating in a datasheet does not, in anyway, imply a guarantee of any sort. If the dropout is typically 2V, that means its probably around that, but it might be higher, it might be lower. The part that is a guarantee is the 'max' and 'min' values in a datasheet. The L7805C has none for drop out. That means that this part is not specced or checked to make sure the dropout is within any maximum value. The L7805/L7805A (no letter implies A), which is the better version, has a maximum drop out of 2.5V. Considering that is the GOOD version, and the 7805C doesn't even spec a maximum drop out... all I can say is, do you like do gamble?

  3. This part can put out have a nominal output voltage of 4.75 and 5.25V. Nominal. That means other factors can influence that number further. It's load regulation is only guaranteed to be 100mV. That means higher loads could cause, say, a 4.8V nominal output to fall to 4.7V. Worse, dropout is defined as a 5% fall in nominal output voltage, so if a regulator has a higher than normal drop out of 2.5V (which definitely happens), then if you're inputting 7.2V (2.5V above 4.7V) then the 4.7V may only be 4.46V. Personally, I would not call that 5V, but ST apparently does. It says so in the datasheet.

  4. Most of the specs are specified with an input of 10V. It's also sold by large distributors like Farnell etc. as a 10V minimum input regulator. Sure, it will probably "work" (as long as your definition of "work" is as loose as the datasheet's) with just 8V in, or even 7V. Probably. If it doesn't, the datasheet never promised it would. If you want to be sure, you'd buy the L7805A version with it's maximum dropout of 2.5V (or better yet, buy the TI part), but that's not what Sparkfun is selling.

The L7805 is literally the cheapest and crappiest 5V regulator 20¢ can buy. And you definitely get 20¢ worth of regulator. Er, it costs 19¢ each for a whole real of 2500. Even one costs 45¢ from a distributor. Unless that distributor is Sparkfun. It would appear they think anything with '7805' in the name is equivalent, and bought a ton of the cheapest part available, because that's exactly what they're selling, only using TI's LM7805 datasheet. I don't think there is any foul play here, I think someone at Sparkfun simply doesn't know that the L7805 and LM7805 are different parts.

Now, about batteries. For primary cells (non-rechargeable batteries), the voltage is their peak voltage. This is the voltage they will putout if fresh and basically full. Alkaline cells start at 1.5V, but this voltage falls as they are discharged, until it reaches 0.9-0.8V. A 9V is 6 of these cells in series. Considering the heavy (for a 9V battery) load of as much as 8mA quiescent current on top of 5mA output current, a high quality 9V battery from Energizer will spend nearly 40% of its capacity at a terminal voltage that is less than 7V.

So no, this regulator is not going to meet your expectations if you plan to use an alkaline 9V battery.

Secondary cell battery voltages on the other hand refer to the AVERAGE voltage. An NiMH cell has an average voltage of 1.2V, but have very flat discharge curves, and will actually run things longer and put out a higher voltage than alkaline cells for much longer, despite the common myth that rechargeables are not as high power or otherwise less potent than alkaline cells. If one labeled primary cells using average voltage like rechargeable cells, alkaline batteries would be 1.1V cells. Rechargeable NiMH cells are objectively superior to alkaline cells in every measurable way, except for self-discharge. They're fairly terrible in that metric, but only that one.

A typical "9V" NiMH battery will have 7 1.2V NiMH cells in series for 8.4V average. By the end of their useful life, they'll still not fall below 1V, so you'll always have at least 7V. They also have much lower internal resistance, so loading will not be an issue if the load is just a microcontroller. NiCds are more or less the same in terms of voltage levels and discharge curves as well, but have very poor capacity compared to NiMH. There are also some nice LiIon 9V cells out there which, unfortunately, will start at 8.4V but will fall below 7V before their capacity is used up. But there will be a more reasonable 20% or so left when this happens, so they're better than alkaline cells. They also have great capacity. Personally, I prefer LiIon 9Vs to any other chemistry.

So yes, if you use a NiMH or NiCd 8.4V rechargeable "9V" battery, an LM7805 will meet your expectations. The regulator Sparkfun is selling is NOT an LM7805, but an L7805C.

A L7805C will probably meet your expectations, but it also might not. It's a gamble that the specs of the specific part you receive will be good enough, and the datasheet makes it clear that some of these parts can be quite terrible and be 'in spec'. It's a gamble.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.