Comments: How to Power a Project


Looking for answers to technical questions?

We welcome your comments and suggestions below. However, if you are looking for solutions to technical questions please see our Technical Assistance page.

  • UpGoer / about 5 years ago * / 1

    My favorite low cost supplies are adjustable buck regulators, similar to your fixed breadboard supplies:

    but they're adjustable and have a convenient readout. I mount two or three of these next to a breadboard.

    Would make a great Sparkfun product, right? The up regulators are great for high power LED lights (~24V 2A) on flying things.

  • yiati / about 7 years ago / 1

    I'm trying to understand some of the math for calculating the current draw in the "How much battery capacity do I need for my project" section.

    The 20 mA current draw for the Atmega 328 microcontroller seems to be stated as the "Output Low Voltage" in the datasheet when being powered at 5V. I'm not sure if that's where the 20 mA came from.

    For the 3 leds it seems to be stated that each has a 10 mA current draw. I cannot figure out where that comes from. With the 330 ohm current limiting resistors, and 5 V flowing into the resistor, it seems like the current draw for each led should be 15.15 mA (which would be Ohms law of 5 volts / 330 ohms).

    The math I did for the Micro Metal motors was to see the specs on the page for the item state it's rated for "30mA @ 6V", which means the current resistance of the motors would be 200 ohms. Then I calculated the actual current draw at 5 V to be 25 mA (which would be Ohms law of 5 volts / 200 ohms), and that seems to match the stated 25 mA current draw listed article.

    Any help or resources to look at would be appreciated!

    • M-Short / about 7 years ago / 2

      The math for calculating the power you need is a lot of guessing. Most LEDs have a max rating about 20mA, and so that's the number people tend to use since they do tend to try to power them at full brightness. Technically yours would be below 15.15mA as well since you didn't seem to account for the voltage drop across the LEDs, but again, it really is a guessing game. Guessing on the high side is always a good idea. As for the ATMega328 that is tricky because it really depends on the application and how fast it is running. If you can do things like turn off I2C or SPI if you don't need them you will save power. While 20mA is the max current per pin usually you aren't going to be that high for just the processing power. I would calculate 5-10mA (which is still high) for just the processing power. As for the motors, remember you are dealing with the maximum current and you may or may not have your motors on all the time. Usually I take guesses on the high side, add everything up and find a battery that will work, knowing that I'll actually have more battery life than I need. The most accurate option is to get a coulomb counter and actually do the math to see how much the circuit is pulling on a live circuit. You can also get a small battery and figure out how long your circuit lasts and do the math from there. Like I said, it is basically a guessing game.

If you've found a bug or have other constructive feedback for our tutorial authors, please send us your feedback!