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).
-
Is 9v dc converted into 5v dc using 7805 ,0.33microF cap & 0.1 microF cap? pl answer me fast.. – Mar 02 '11 at 04:38
-
@Rajesh, yes, this does get the job done. – Kortuk Mar 02 '11 at 07:31
-
A similar question, but with different voltages: [What is the coolest way (using passive cooling only) to step 12V DC down to 5V DC](http://electronics.stackexchange.com/questions/2314/what-is-the-coolest-way-using-passive-cooling-only-to-step-12v-dc-down-to-5v-dc/2315#2315) – pingswept Dec 20 '10 at 23:06
6 Answers
I would use a 7805 to get 5 volts simple circuit. Here is a image:
idea: please make sure that caps are ceramic/polymer caps. The ceramic caps only have low ESR value. specially the right hand one.

- 1,695
- 2
- 23
- 38

- 8,408
- 27
- 70
- 120
-
7And for reference, here is how to decide what value to make the capacitors http://electronics.stackexchange.com/questions/8121/capacitor-sizes-for-7805-regulator – Kellenjb Dec 21 '10 at 00:23
-
2+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. – Johan Dec 22 '10 at 12:13
-
What would be the ground current for a 9v input with an LM7805? – Isaac Sutherland Dec 27 '10 at 23:47
-
@IsaacSutherland, input current = output current on a linear regulator(minus a small leakage). This means that if you are pulling 30mA at 5V you will see at 30mA at 9V as your input. This should explain the inefficiency as your efficiency is approximately Vout/Vin. – Kortuk Mar 01 '11 at 06:03
-
4@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. – markrages Mar 01 '11 at 07:40
-
1@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! – Kortuk Mar 01 '11 at 07:54
-
7805 regulators are stable with capacitors of any ESR, they do not have to be ceramic or poly. Realistically, I'd probably just use two 0.1 uF caps (since they're so cheap), and maybe a big electrolytic on the input, if the wires to the battery from the regulator are particularly long/thin. – Connor Wolf May 24 '14 at 10:18
-
You should consider adding a heatsink to the regulator, especially when converting 9V to 5V and especially if the circuit uses a lot of current. – Oct 29 '16 at 03:43
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:
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.
-
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. – user3308807 Jul 09 '20 at 05:57
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.

- 12,360
- 2
- 44
- 71
-
yea this is almost certainly the way to go, on the other hand the QA is asking specifically about using a 9V battery... – vicatcu Dec 20 '10 at 21:34
-
@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 :-) – stevenvh Dec 21 '10 at 12:10
-
My particular application uses motors that I intend to run at 9v. – Isaac Sutherland Dec 27 '10 at 23:43
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.

- 38,774
- 2
- 60
- 96
-
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. – Isaac Sutherland Dec 20 '10 at 19:23
-
3Four AA cells would be a lot better, with an LDO if you need 5V. I use a bench power supply for development. – Leon Heller Dec 20 '10 at 19:40
-
2@Issac Sutherland, [AA batteries](http://data.energizer.com/PDFs/E91.pdf) are simply better batteries than [9V cells](http://data.energizer.com/PDFs/522.pdf). 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. – tyblu Dec 20 '10 at 20:21
-
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. – vicatcu Dec 20 '10 at 20:39
-
1A 7805 (as shown in Dean's answer) is simpler because it doesn't require any resistors. – Kevin Vermeer Dec 20 '10 at 21:58
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.

- 296
- 2
- 3
- 8
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!

- 22,499
- 13
- 79
- 155
-
5If the micro ever went to sleep, the sudden drop in current would cause the voltage to easily rise over 5 V. – Nick T Dec 20 '10 at 21:20
-
1You 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. – tyblu Dec 20 '10 at 21:21
-
4This is not the right way to do it: the voltage will vary widely with load, temperature and supply input. – Thomas O Dec 20 '10 at 21:26
-
1@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. – vicatcu Dec 20 '10 at 21:31
-
1I think it's a reliable and simple way of accomplishing a task, and not one I'd shy away from. So long as you have a minimum load, it'll be "good enough". – tyblu Dec 20 '10 at 21:33
-
2If 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. – Kevin Vermeer Dec 20 '10 at 21:57
-
1If you're going to do it this way, you might as well use a single zener diode. – Thomas O Dec 20 '10 at 22:10
-
@Thomas O but then you don't get the extra feature of having a power LED. – Kellenjb Dec 21 '10 at 00:21
-
@Kellenjb, it will cost less to have a zener+LED than it will to have two or three LEDs. – Thomas O Dec 21 '10 at 01:37
-
@ThomasO But 2 or 3 leds makes it easier to see! Sorry, my sarcasm didn't shine through as well as I had hoped it would. – Kellenjb Dec 21 '10 at 01:49
-
@Kellenjb. Actually, you make a good point. On some devices (esp. safety related, e.g. fire/burglar alarm) I've seen two or three LEDs for major functions. I'm not sure if this is for redundancy in case one LED fails or if it's just for additional visibility. – Thomas O Dec 21 '10 at 01:51