15
\$\begingroup\$

What's a good way to reduce the output from a 9V battery to the 1.8V to 5V required by an ATmega328 controller? The context is a small robotics platform with low power requirements (very slow movement).

\$\endgroup\$
3
  • \$\begingroup\$ A similar question, but with different voltages: What is the coolest way (using passive cooling only) to step 12V DC down to 5V DC \$\endgroup\$
    – pingswept
    Commented Dec 20, 2010 at 23:06
  • \$\begingroup\$ Is 9v dc converted into 5v dc using 7805 ,0.33microF cap & 0.1 microF cap? pl answer me fast.. \$\endgroup\$
    – user3209
    Commented Mar 2, 2011 at 4:38
  • \$\begingroup\$ @Rajesh, yes, this does get the job done. \$\endgroup\$
    – Kortuk
    Commented Mar 2, 2011 at 7:31

6 Answers 6

22
\$\begingroup\$

I would use a 7805 to get 5 volts simple circuit. Here is a image: 7805

idea: please make sure that caps are ceramic/polymer caps. The ceramic caps only have low ESR value. specially the right hand one.

\$\endgroup\$
8
  • 7
    \$\begingroup\$ And for reference, here is how to decide what value to make the capacitors electronics.stackexchange.com/questions/8121/… \$\endgroup\$
    – Kellenjb
    Commented Dec 21, 2010 at 0:23
  • 2
    \$\begingroup\$ +1 since the 7805 is simple and good for rapid prototyping. But remember that this solution will drain the battery really fast! So if you are thinking about power management go with another solution. \$\endgroup\$
    – Johan
    Commented Dec 22, 2010 at 12:13
  • \$\begingroup\$ What would be the ground current for a 9v input with an LM7805? \$\endgroup\$ Commented Dec 27, 2010 at 23:47
  • 4
    \$\begingroup\$ @Kortuk, ground current is related to power wasted irrespective of load. According to the Fairchild LM7805 datasheet, graound current for lm7805 is 5mA typ, 8mA max, and doesn't change much with load or input voltage. This current will drain a standard 9V Energizer 522 flat in about 100 hours, so if the circuit will be on standby it would be better to use a more modern regulator with lower ground current. \$\endgroup\$
    – markrages
    Commented Mar 1, 2011 at 7:40
  • 1
    \$\begingroup\$ @markrages, I did not know the term ground current and took a shot at answering since he asked a while ago. Thank you for taking the time to clear that up! \$\endgroup\$
    – Kortuk
    Commented Mar 1, 2011 at 7:54
14
\$\begingroup\$

Since you want to power from a 9V battery we have to look out for possible current losses. While a three-legger like LM7805 may be an obvious choice, this regulator has a ground current of 8mA maximum. An LDO (low drop-out) regulator typically needs far less, e.g. the ground current of an LP2981 is only 800\$\mu\$A maximum. That's only 10%!
LDOs are as easy to use as an LM7805. The output capacitor is a bit larger, though, important for stability.

edit
Johan wanted an example:
alt text

If not used, the ON/OFF input must be tied to \$V_{IN}\$. The output capacitor value of 3.3\$\mu\$F is the minimum required for stability. "More capacitance provides superior dynamic performance and additional stability margin" (dixit NS)

edit 2
You can even save more power, but it's probably not worthwhile; your motors may consume a lot more than the LDO's 800\$\mu\$A.
Anyway, there are LDOs with < 1\$\mu\$A ground current, like the Seiko S-812C50. Input voltage up to 16V, output voltage is selectable from 2V to 6V in 100mV increments. Output current is limited, however, to 50-75mA.

\$\endgroup\$
1
  • \$\begingroup\$ Where the heck do you get one of these (the LP2981) that can be used on a breadboard? I can only find tiny pcb versions of this regulator. \$\endgroup\$ Commented Jul 9, 2020 at 5:57
11
\$\begingroup\$

I might consider just providing the ATmega328 unregulated power unless you have something that actually requires it on the board. 2-3 AA cells should remain within 1.8 to 5.5 V over their life.

A schottky might be prudent if you insert the batteries the wrong way (probably will need 3 cells then), and you could add a TVS if you want to be even safer.

\$\endgroup\$
3
  • \$\begingroup\$ yea this is almost certainly the way to go, on the other hand the QA is asking specifically about using a 9V battery... \$\endgroup\$
    – vicatcu
    Commented Dec 20, 2010 at 21:34
  • \$\begingroup\$ @tyblu: it can't be the best solution since it doesn't comply with the given input voltage of 9V. Isaac may have his reasons to use a 9V battery instead of AA cells, like a stock of 2000 of them :-) \$\endgroup\$
    – stevenvh
    Commented Dec 21, 2010 at 12:10
  • \$\begingroup\$ My particular application uses motors that I intend to run at 9v. \$\endgroup\$ Commented Dec 27, 2010 at 23:43
5
\$\begingroup\$

It depends how efficient you need it to be. Simplest would be an LM317, but it will waste a lot of power. A switcher would be better, like those made by Nat Semi.

I wouldn't use a 9V battery, though.

\$\endgroup\$
5
  • \$\begingroup\$ What power supply would you suggest instead? -- I'm curious to know what you would suggest as a good power supply for using during development as well. \$\endgroup\$ Commented Dec 20, 2010 at 19:23
  • 3
    \$\begingroup\$ Four AA cells would be a lot better, with an LDO if you need 5V. I use a bench power supply for development. \$\endgroup\$ Commented Dec 20, 2010 at 19:40
  • 2
    \$\begingroup\$ @Issac Sutherland, AA batteries are simply better batteries than 9V cells. A boost regulator would allow you to follow a "constant power performance" curve on a battery datasheet and drain it to just over 1V/battery (fully drained), whereas a linear regulator would follow a "constant current performance" curve and drain each to ~5.35V/#batteries (best for 5+ AA's). You have to run the numbers to figure out for sure which solution is best, but it's usually the switcher that comes out on top. \$\endgroup\$
    – tyblu
    Commented Dec 20, 2010 at 20:21
  • \$\begingroup\$ a 9V battery isn't a bad choice in terms of physical size if you can live with the inferior mAh they tend to provide. \$\endgroup\$
    – vicatcu
    Commented Dec 20, 2010 at 20:39
  • 1
    \$\begingroup\$ A 7805 (as shown in Dean's answer) is simpler because it doesn't require any resistors. \$\endgroup\$ Commented Dec 20, 2010 at 21:58
3
\$\begingroup\$

if you want an efficient solution, using a Buck Converter would be a smart choice. you can build it with discrete components (inductor, diode, capacitor and transistor) or you can use some IC.

http://en.wikipedia.org/wiki/Buck_converter

\$\endgroup\$
1
\$\begingroup\$

Another way to drop the voltage down from 9V would be to put an appropriate number of forward biased diodes in series with the positive supply. Typically you get about 0.7V drop per diode, so to bring it down to 5V from 9V you'd need something like 6 diodes in series.

Fine... or a single Zener diode!

\$\endgroup\$
11
  • 5
    \$\begingroup\$ If the micro ever went to sleep, the sudden drop in current would cause the voltage to easily rise over 5 V. \$\endgroup\$
    – Nick T
    Commented Dec 20, 2010 at 21:20
  • 1
    \$\begingroup\$ You can use combinations of LEDs, too, if you can't quite get the right number with typical silicon diodes. For example, you can use a red ~1.7V drop LED to get 3.3V from 5V. This also removes some of the heat dissipation. \$\endgroup\$
    – tyblu
    Commented Dec 20, 2010 at 21:21
  • 4
    \$\begingroup\$ This is not the right way to do it: the voltage will vary widely with load, temperature and supply input. \$\endgroup\$
    – Thomas O
    Commented Dec 20, 2010 at 21:26
  • 1
    \$\begingroup\$ @Thomas I agree, it's not the right way to do it, but it is a way to do it in principle under some constrained contexts. \$\endgroup\$
    – vicatcu
    Commented Dec 20, 2010 at 21:31
  • 2
    \$\begingroup\$ If you really want to use series diodes, a single zener would be a better choice in terms of load regulation and temperature. It wouldn't help with line regulation. Nick T's caution is important, though. \$\endgroup\$ Commented Dec 20, 2010 at 21:57

Not the answer you're looking for? Browse other questions tagged or ask your own question.