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