Convert 6v to 5v to power stand alone Atmega328

I am trying to use a 6v battery pack (4x AA batteries) to power a stand alone Atmega328. I have seen people using resistors, low drop out regulators and other things to do this on line, but am not sure how the proper way to get this done is. Any ideas of what to use?

An easy and cheap way would be to use a zener diode rated at 5v. The problem with using resistors in a voltage divider circuit is that as the battery drains, your 5v becomes much less. It all depends on how much current you need or that may not be a problem. You only need 3.3v minimum right? The low drop out regulators are expensive (~$7). You may want to consider getting something like a rechargeable 9v NiMH battery. They're cheap, available at office supply and electronics stores, and throw away alkaline batteries are crap. Then you would be able to use a LM7805 voltage regulator. The LM7805 is cheap, but you need to input at least 7v.

A zener diode seems like the cheapest and easiest solution, but is it reliable? Is there a benefit to using something like this Voltage Regulator - 5V - COM-00107 - SparkFun Electronics ?

If you're looking for a cheap LDO, here's one that I like: http://www.digikey.com/product-detail/en/MCP1702-5002E%2FTO/MCP1702-5002E%2FTO-ND/1098464. 52 cents, 5V output, and a 0.33V dropout @ 250 mA. You might need to find something else if you need more power though.

Do you see any reason why the above one from sparkfun would not work? The datasheet says that it can output 1.5 A, and I know that I will need more than 250mA. Thanks for your help.

The sparkfun regulator can handle higher currents but the downside to is it's high dropout voltage. If you look at page 3 of the datasheet under recommended operating conditions (it's also under electrical characteristics in the dropout voltage line), the 7805 unit has a minimum voltage of 7v, and you have a 6v battery pack. If you add some batteries it will work but not otherwise. If you don't mind me asking, what will you need more than 250 mA for? I was under the impression that the max current allowed through the 328 was 200 mA: 10 Ways to Destroy an Arduino — Rugged CircuitsRugged Industrial Arduino Microcontrollers

A zener diode seems like the cheapest and easiest solution, but is it reliable? Is there a benefit to using something like this Voltage Regulator - 5V - COM-00107 - SparkFun Electronics ?

If you scroll down to page 3 of the data sheet it says that it needs 7v minimum for input. I mentioned that earlier.

A 5v zener diode should be fine. Just check the data sheet.

Just a diode in series drops things .7v.
A little wasteful though.

Or you could simply replace your 4 x 1.5 volt AA alkaline batteries with rechargeable NiMh or Nicad units which run at 1.2 volts, giving you 4.8 volts which will be sufficient to operate your processor directly.

db2db:
Just a diode in series drops things .7v.
A little wasteful though.

Well its an order of magnitude better than using a zener diode. A zener diode is a shunt regulator and requires (for decent regulation) that several times more power is wasted in the diode than in the circuit it powers. Don't use the zener idea!

If you need more than 0.25A, then your zener would need to take perhaps 1A, and thus waste 5W of heat! That's a massive zener on a heatsink, just crazy. A series diode dropping 0.7V at say 0.4A dissipates 0.28W, 20 times less waste!

A sensible solution is a 1A LDO regulator like the STmicroelectronics LF50, drop out of 0.4V at 0.5A - be careful to use the right value capacitors with LDO regulators, read the datasheet, it matters to prevent oscillation.

Don't use a zener diode, you can only use it as a shunt regulator, which is very wasteful of current thereby reducing battery life. Use a low dropout regulator.

jackrae:
Or you could simply replace your 4 x 1.5 volt AA alkaline batteries with rechargeable NiMh or Nicad units which run at 1.2 volts, giving you 4.8 volts which will be sufficient to operate your processor directly.

Actually NiMH are 1.25 to 1.35V, not 1.2 - that gives upto about 5.3V for 4 cells which is just inside the recommended operating voltage.

So could I just run the Atmega328 of off 4x NiMH batteries without any sort of regulation? Or is it probably a good idea to put some sort of protection in place?

What happens if I use less than 5v and something like this Lithium Ion Battery - 850mAh - PRT-13854 - SparkFun Electronics ?

You'll have to check the datasheet for the Atmega328 for both of those questions. MarkT's post says that 4 NiMH cells will be too much voltage but the 328 datasheet says the chip is safe up to 5.5V. Regardless, it will be risky. You can also power it off the li-po battery you posted from spark fun, but since it has a lower voltage, the 328 will have to be slower.

So do the best of both worlds and run it off 3 x AA cells rated at 4.5 volts. From the previous graph it would be capable of operating at virtually top speed. If all you have is a 4-way AA cell holder you can install a dummy cell in place of cell No4.. This can be as simple as a piece of wood with a jumper wire to connect +ve and -ve poles together. If you don't fancy wood then use a "dead" cell and again install a jumper wire or alternatively simply install a jumper between the contacts that would normally connect to the + and - ends of cell No4

I'd guess that whatever config of AA's you use, if you drop .7v with something like a 1n4004 in series, you'd be in the 5.5v safe range.
An LDO regulator is nicer though, but a higher parts count and cost after you add bypass caps(s).

What happens if I use less than 5v and something like this Lithium Ion Battery - 850mAh - PRT-13854 - SparkFun Electronics ?

Bro, It's only 3.7v. But you have the right idea. Do some battery research. Didn't you say that you needed more than 250mA? Just ger a 9v NiMh rechargeable battery from Radio Shack or Office Depot along with an LM 7805 and be done with it. Do that, and I'm sure anybody will be happy to help you wire it. And there are already tons of tutorials about it anyway.

Hi I have run an atmega328p at 8mhz with 4 x alkaline and a diode directly to pin without any problem, new batteries = 6.4 volt less0.7 diode = 5.7 volt and by using internal 8 kHz crystal the BOD will allow you a lower voltage

Did you see the date on those posts. About 6 years ago !!!

MICHAELKRUGER:
Hi I have run an atmega328p at 8mhz with 4 x alkaline and a diode directly to pin without any problem, new batteries = 6.4 volt less0.7 diode = 5.7 volt and by using internal 8 kHz crystal the BOD will allow you a lower voltage

8mhz (milliHerz) or 8MHz.
8KHz crystal or 8MHz.
Details matter.

An atmega328p clocked at 8Mhz is operating within specs between 2.5volt and 5.5volt.
Two alkaline batteries would just be enough, three even better, four could mean trouble.

Note that unregulated battery power could also be problematic for sensors and analogue inputs.
Leo..