Go Down

Topic: Convert 6v to 5v to power stand alone Atmega328 (Read 4398 times) previous topic - next topic

Ben1234

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?

TeslaIaint

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.

Ben1234

A zener diode seems like the cheapest and easiest solution, but is it reliable? Is there a benefit to using something like this http://www.sparkfun.com/products/107 ?

madvoid

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.

Ben1234

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.

madvoid

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: http://ruggedcircuits.com/html/ancp01.html#Method10

TeslaIaint

Quote
A zener diode seems like the cheapest and easiest solution, but is it reliable? Is there a benefit to using something like this http://www.sparkfun.com/products/107 ?

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.

db2db

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

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.

MarkT


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.

[ I won't respond to messages, use the forum please ]

dc42

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.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

MarkT


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.
[ I won't respond to messages, use the forum please ]

Ben1234

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?

Ben1234

What happens if I use less than 5v and something like this http://www.sparkfun.com/products/341 ?

madvoid

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.


Go Up