ATTINY84 Power regulator

Hi all. I am designing a circuit that utilizes the ATTINY84 microcontroller. I want to power my circuit with a 9 volt battery, so I will need a regulator. I was originally going to use the LM1117IMPX-5.0, the same one that is in the arduino uno, but they are currently unavailable. Will something like the LM1117MP-5.0 work instead? If not, what is another alternative? Will I have to add any external components(e.g. resistors, capacitors, .etc)?

Thanks in advance.

Yes, of course. See the data sheet for the recommended configuration.

Or use this, which is self contained and vastly more energy efficient.

I actually already looked at it, but the only schematic is for a variable output, not a fixed output. Like I mentioned earlier, I need a fixed voltage of 5 volts.

Page 17 of the LM1117 data sheet.

Capture

NO 9V BATTERIES! (Think "Mommy Dearest" & No WIRE HANGERS!) They don't last! LOL

Can I have a link to the Digi-key part you are referring to? I think we are looking at 2 different models of the same regulator.

LM1117 is wasteful and not great for battery-powered projects. It consumes 5-10mA and does have a minimum load requirement of 1.7mA (5mA hot) and it's not really an LDO despite the label it loses about 1.3V spec's do vary a bit between manufacturers.
Instead, I use LP2950 and it's great with 9V battery stuff.

1 Like

I don't. The output capacitor is ALWAYS required, and you are strongly advised to use the input capacitor as well.

And, as stated, it is just plain silly to use a linear regulator with a 9V battery. You are simply throwing away money and energy.

That link that @jremington posted goes to fixed step down regulators.
One of which is;

If all you can get is a variable, you set the control potentiometer to give 5V output and put some adhesive on the control.

Tom.... :smiley: :+1: :coffee: :australia:

What is the difference between the LP2950 and LM1117?

@prairiemystic, how do you use the LP2950? Do you mind supplying a simple schematic diagram?

This circuit shows something that works. 5V 100mA max. and down to 0.075mA if you can put the ATtiny into a deep sleep. I use same IC in my car (plus TVS surge protector and fuse) ATtiny85 for years now. Minimum input is 5.4V and max. is 30V, so it works with quite a dead 9V battery.
D1 protects against reverse polarity at the battery clip and best a Schottky part.
Output capacitor C2 needs to be in a range 1-100uF for the IC to behave. 1uF is the lowest and around 2.2-10uF is fine, it depends on the loads you have and if you want to use this at -40C

No significant difference. Both convert about 40% of the 9V battery energy and cost into wasted heat.

Ok, so I just measured the current draw of my project, and it averages around 75ma, but occasionally peaks to 105ma. As the LP2950 can only supply 100ma, will that 5ma overdraw cause significant problems? It only peaks to 105ma about one every 5 seconds, and stays there for about 1/4 second.

That's too much current for the LP2950 LDO, the 5V will sag and a 9V battery at 105mA is a bit much, it's a few hours run time.
Instead I would use a 5V buck-converter. These are more efficient but no good for an MCU that has to sleep, their quiescent current alone will drain the battery.
You haven't told us your requirements for the regulator.

My project is one that is only used for about 10 minutes at a time a few times a week. It is turned off the rest of the time. Like I mentioned above, the average current draw is 75ma, with up to a 105ma spike every 15-20 seconds. The components are the ATTINY84, HC-SR04, 4 LEDs, and a buzzer.

If there's no on/off switch and no sleep mode, then a 5V buck-converter board is probably the easiest way to go. Pololu, Adafruit, eBay offer many low cost boards.

There is an on/off switch though. I thought I mentioned that earlier?

If there's an on off switch then WTF is the issue? Leave it off when not actively in use and you'll get the best possible (almost) battery life. Certainly OFF is a lower power setting than even uA!

Yes, I know. I need a linear voltage regulator that is small, cheap, and power efficient. If anyone knows of a regulator that is similar to the LP2950, just with 150ma current draw instead of 100ma, please share. That is all I need. Thanks.

Linear != power efficient