LM7805C Regulator - 9v to 5v

Hi, working with a few LM7805CV linear regulators.

This is the datasheet for them.

I'm building a transmitter module which will use an nRf24 transceiver, two joysticks, an lcd and an ATtiny84.

The joysticks and the ATtiny84 run at 5v, but I would like to power the whole assembly with 9v.

I have three questions:

  1. Exactly how much current comes from the batteries? Do the batteries constantly output a certain mA, or will the circuit only draw as much current as it needs? I'm worried about overloading the regulator. I know the ATtiny84 draws 15-20mA, but I don't know about the joysticks...

  2. Will a 9v to 5v conversion generate enough heat to require a heat sink?

  3. Are capacitors absolutely necessary to use the regulators? I've read I would need a .33uF and a .1uF, but I don't have these and likely don't have time to get them.

Thanks much!

Capacitors are absolutely necassary. You can use other values. CI can probably be any capacitor that is 0.33uF or larger. CO can not be anything. A 100nF decoupling capacitor is the most used capacitor there is. Can you buy a few of them ? You probably need those in the future anyway.

Do you want to use a 9V battery to power the project ? A common 9V battery is very weak, it might work only for a few hours (or perhaps not at all).

I don't know if a heatsink is needed. If you put your finger on the 7805 and you can't keep your finger on it, then it is too hot.

  1. The circuit will only draw as much current as it needs. Assuming you are not using a surface mount package, the regulator has a thermal resistance junction-to-ambient (without heatsink) of 60°C/W (max). If we allow the junction to rise say 90 °C above ambient (to keep within the maximum 125°C), that means the package can dissipate 1.5 W without getting too hot. Allowing for a new battery being say 9.5V, you will be dropping 4.5V across the regulator. So the maximum current will be 1.5/4.5 A = 333mA before the regulator gets too hot.

  2. If the joystick potentiometers are 10kΩ, they will draw only 1mA per joystick. So you certainly shouldn't need a heatsink!

  3. You can probably get away without capacitors. See the bottom of page 25 of the datasheet. The capacitor on the output side of the regulator is the more important.

Archibald:
3) You can probably get away without capacitors. See the bottom of page 25 of the datasheet. The capacitor on the output side of the regulator is the more important.

Au contraire! According to the linked data sheet the output capacitor is not needed for stability but it improves transient response. The input capacitor is needed if the regulator is an appreciable distance from the power supply filter. He is feeding it from a 9 V battery which has a relatively high impedance and no doubt wires of significant length so it is needed.

To be safe I always fit both having had problems in the past. You can get away without them but the circuit layout becomes critical as little as 2 pF stray capacitance between the input and output can cause oscillation.

Russell.

Okay, thanks for everything guys, this answers all my questions!

As already mentioned, your basic PP3 9V primary battery is a weak power source. Consider going with a lithium ion PP3 secondary cell instead. That way the rated voltage will be lower and you'll waste less power, while at the same time dramatically improving battery capacity and current sourcing capability.

Archibald:
3) You can probably get away without capacitors. See the bottom of page 25 of the datasheet. The capacitor on the output side of the regulator is the more important.

I agree with russellz that that is horrible advice. You should always start with the capacitors and then if your circuit is working fine you can then decide if it will continue to work without them. Not the other way around -- you can waste hours of time troubleshooting a circuit just to find out that you needed those caps.

Chagrin:
I agree with russellz that that is horrible advice. You should always start with the capacitors and then if your circuit is working fine you can then decide if it will continue to work without them. Not the other way around -- you can waste hours of time troubleshooting a circuit just to find out that you needed those caps.

I fully agree that it is advisable to have capacitors but the OP has indicated that they will probably not have time to get them. In the circumstances, I think it is still worth seeing if it will work without the capacitors considering the small load current. I would certainly use at least one capacitor close to the microcontroller regardless of how its powered.

Power regulation has been a topic that to me seems to be widely debated... I recently was reading an older book dealing with OLD 8-bit processors, and it talked about creating the power circuitry for a 5v 5a system, basically it required a filter cap of about 27,000uF just to stabilize the circuit so the regulator could work properly. I thought that it was extremely overkill, but this is coming from a guy that designed older computer systems. So I guess he probably knew what he was talking about.

I too agree that not using caps is bad advice. Also, with the 7805 its basically converting the voltage drop to to heat. My understanding of how the 78* series works is that if your circuit draws 1amp at 5v, then the voltage regulator pulls 1amp at (in this case) 9v. the 4v difference is lost through heat transfer of the watts. Basically, you'd have 4 watts which you need to dissipate. This is a good example of why it is important to prototype everything on breadboard before completing a circuit. You're not going to know whether or not you need a heat sink unless you know how much current you're drawing. And to find that out, you are either going to have to estimate based on the datasheets and give yourself enough room for error, or build the circuit and measure it yourself.

Having said that, my go to circuit for MOST projects that will have an MCU consists of 20uF caps before and after the LM7805C. However, if I were going to be using something that pulled a lot of current, ie. an lcd, I would probably bump those up to at least 100uF. This is all in addition to the standard practices of using a .1uF/100nF cap next to each IC, and a 4.7uF cap for every 7 ICs on the board.

jdgabbard:
Power regulation has been a topic that to me seems to be widely debated... I recently was reading an older book dealing with OLD 8-bit processors, and it talked about creating the power circuitry for a 5v 5a system, basically it required a filter cap of about 27,000uF just to stabilize the circuit so the regulator could work properly. I thought that it was extremely overkill, but this is coming from a guy that designed older computer systems. So I guess he probably knew what he was talking about.

That's not for the regulator, its a smoothing capacitor to store energy for 10ms or so
between mains-waveform peaks. Without it the input voltage drops 100 or 120 times a
second below what's needed... In those days power supplies were mains transformer,
rectifier bridge, smoothing capacitor. Modern switch-mode supplies use much smaller
smoothing capacitors as they can draw power for most of the waveform, not just the
peaks. They then chop the mains up at high frequencies so subsequent capacitors /
transformers can be much smaller.

consider using a step-down converter instead of the 7805. Less energy wasted -> longer battery life.

Also, the nRF24 needs 3.3 Volts.

So, I managed to get a hold of more capacitors, but I've found I only have values up to .1uf. Is the CI absolutely necessary?

Thanks...

CantSayIHave:
So, I managed to get a hold of more capacitors, but I've found I only have values up to .1uf. Is the CI absolutely necessary?

Thanks...

Yes, read the data sheet.

Having said that you could try it with the 0.1 uF. You might be lucky!

Russell.

Wait, so worst case it actually does need a .33uF cap, will something go bad if I use just a .1uf cap?
How do I know if it is/isnt working?

Three 0.1uF caps in parallel = 0.3uF
Relax.

Never mind, I found a .33uf cap. Everything works fine, Thanks much!