# How to Power a Project

Pages
Contributors: JordanDee

## Overview

This tutorial will cover the various ways you can power your electronic projects. It will go into some detail about voltage and current considerations you may want to make. It will also go into the extra considerations you have to make if your project is mobile/remote or, in other words, not going to be sitting next to a wall power outlet.

If this is truly your first electronic project, you have the option of reading through this tutorial or sticking with the recommended supply for the project or development board of your choice. The SparkFun Inventor’s Kit contains the USB cable you need for power and works fine for all the projects in the kit as well as many more advanced projects. If you're feeling overwhelmed, that kit is the best place to start.

Here are related tutorials you may want to check out before reading this one:

## Ways to Power a Project

Here are some of the most common methods used for powering a project:

• USB Power
• Variable DC Benchtop Power Supply
• AC to DC Wall Adapter (like a computer or laptop would use)
• Batteries

Four common ways to supply power to your project

### Which Option Should I Pick to Power My Project?

The answer to this question largely depends on your project specific requirements.

#### USB Power

If you're starting off with the SparkFun Inventor's Kit or another basic development board, you will likely just need a USB cable. The Arduino Uno is an example that requires only a USB A to B cable to supply the power to run the example circuits in the kit. Here are a few USB cables from our catalog to power your project from a USB port.

CAB-10215
1

CAB-11301
$3.95 2 ### USB 3.1 Cable A to C - 3 Foot CAB-14743$4.95
3

#### Variable DC Benchtop Power Supply

If you're in the business of building projects and testing circuits regularly, acquiring a variable DC bench power supply is highly recommended. This will allow you to set the voltage to a specific value depending on what you need for your project. It also buys you some protection as you can set a maximum current allowed. Then, if there is a short circuit in your project, the bench supply will shut down hopefully preventing harm to some components in your project.

Here are a few variable DC benchtop power supplies from our catalog.

TOL-14926

TOL-14928
$183.95 ### Switching Power Supply - DC 20V, 5A TOL-14929$286.95
2

#### AC to DC Wall Adapters

A specific AC to DC power supply is often used after a circuit is proven. This option is also great if you often use the same development board again and again in your projects. These wall adapters usually have a set voltage and current output, so it's important to make sure that the adapter you choose has the correct specifications as the project you will be powering and to not exceed those specifications. Here are a few wall adapters from the catalog that offer a few amps.

TOL-15313
2

TOL-15314
$5.95 1 ### Wall Adapter Power Supply - 5VDC, 2A (USB Micro-B) TOL-15311$5.95

For more current hungry projects, check out some of these power supplies from our catalog. Just make sure to get the appropriate cable for your region from product page's recommended products.

TOL-14601

TOL-16266
$23.95 ### Mean Well Switching Power Supply - 5VDC, 18A TOL-16607$19.95

#### Batteries

If you want your project to be mobile or based in a remote location away from where you can gather AC wall power from the grid, batteries are the answer you're looking for. Batteries come in a huge variety, so be sure to check out the later parts of this tutorial so you can figure out precisely what to choose. Common choices include alkaline, rechargeable NiMH AA's, and lithium polymer ion. Here are a few batteries from the catalog.

PRT-13855
3

PRT-10218
$1.95 1 ### 2500 mAh NiMH Battery - AA PRT-00335$3.25

If your project needs a certain voltage or a bit more current from a battery, try adding a boost converter or switching regulator. You can take the varying voltage from your battery and output a set voltage 5V. Depending on the board and components used with your project, you could potentially output 9V or 10V depending on the configuration. You'll just need make sure to get the necessary components to build your circuit in order to output voltages higher than 5V. Here are a few converters from our catalog.

COM-15208
1

PRT-10255
7

CAB-00507
2

CAB-00508
42

PRT-11367
2

PRT-12044
17

PRT-13268
3

DEV-13317
5

PRT-10288
12

PRT-10811

PRT-12618
3

PRT-09749
\$0.95
2

### Connector Basics

#### January 18, 2013

Connectors are a major source of confusion for people just beginning electronics. The number of different options, terms, and names of connectors can make selecting one, or finding the one you need, daunting. This article will help you get a jump on the world of connectors.

## Remote/Mobile Power

### Which Battery Should I Choose?

When you're powering a remote circuit, the same issues of finding a battery that delivers the proper voltage and current still apply. Battery life, or capacity, is a measure of total charge the battery contains. The capacity of a battery is usually rated in ampere-hours (Ah) or milliampere-hours (mAh), and it tells you how many amps a fully charged battery can supply over a period of one hour. For example, a 2000mAh battery can supply up to 2A (2000mA) for one hour.

Battery size, shape, and weight is also something to consider when making your project mobile, especially if it's going to be on something that flies like a small quad-copter. You can get a rough idea of the variety by visiting this Wikipedia list. Learn more about battery types in our battery technology tutorial.

### Battery Technologies

#### February 6, 2013

The basics behind the batteries used in portable electronic devices: LiPo, NiMH, coin cells, and alkaline.

### Batteries in Series and Parallel

You can add batteries in series or parallel to produce the desired voltage and current needed for your project. When two or more batteries are placed in series, the voltages of the batteries are added together. For example, lead-acid car batteries are actually made out of six single-cell lead acid batteries tied together in series; the six 2.1V cells add up to produce 12.6V. When tying two batteries in series, it's recommended that they be of the same chemistry. Also, be wary of charging batteries in series as many chargers are limited to single-cell charging.

When you connect two or more batteries in parallel, the capacities add. For example, four AA batteries connected in parallel will still produce 1.5V, however the capacity of the batteries will be quadrupled.

### How Much Battery Capacity Do I Need For My Project?

This question is easier to answer once you have determined the amount of current that your circuit normally draws. In the following example, we will use estimation. However, it is encouraged that you measure current draw of your circuit using a Digital Multimeter to get accurate results.

As an example, let’s start with a circuit, estimate its current output, then select a battery and calculate how long it the circuit will run on battery power. Let’s choose a ATmega 328 microcontroller to be our brains for the circuit. It draws about 20mA under normal conditions. Let’s now connect three red LED’s and the standard 330 ohm current limiting resistors to digital I/O pins of the microcontroller. In that configuration, each LED added makes the circuit draw about 10mA more current. Now let’s connect two Micro Metal motors to the microcontroller as well. Each one of these uses approximately 25mA when turned on. Our total possible current draw is now:

Let’s choose a standard alkaline AA battery for this because it has more than enough current capability (up to 1A), has a decent battery capacity (usually in the range of 1.5 Ah to 2.5Ah), and is very common. We'll assume the average is 2Ah for this example. The downside to using a AA is it only has a 1.5V output, and, since the rest of our components will run on 5V, we need to step up the voltage. We can use this 5V step-up breakout to get the voltage we need, or we can use three AA batteries in series to get us close to the voltage we need. Three AA’s in series gives us a voltage of 4.5 V (3 times 1.5V). You could also add another battery for a total of 6V and regulate the voltage down to what your circuit requires.

To calculate how long a circuit will last on battery power, we use the following equation:

For a circuit powered by 3 AA's in parallel that's connected to a circuit with a constant 100mA current draw, this translates to:

We would ideally get 60 hours of battery life out of these three alkaline AA’s in this parallel configuration. However, it’s good practice to ‘derate’ batteries, which means to assume you’re going to get less than ideal battery life. Let’s conservatively say that we’ll get 75% of the ideal battery life, and therefore about 45 hours of battery life for our project.

Battery life can also vary based on the actual current draw amount. Here's a graph from an Energizer AA battery showing its expected battery life based on constant current draw.

Energizer AA, Current vs Battery Life

This is just one of the numerous configurations you could use to power your project remotely.

## Stress Testing

Now that you have chosen your power supply and connector, make sure to test your project out and observe its behavior. Depending on the manufacturer, power supplies may have varying performances. Make sure to test the wall adapter over a certain period of time to ensure that the microcontroller won't brownout, and power supply won't reset under a load. For certain projects using capacitive touch sensors, make sure to test to see if there are any latencies caused by noisy power supplies.

If you are powering your project remotely, make sure to always test it with the battery. Batteries can provide varying outputs depending on the load attached and battery chemistry. This can also cause the microcontroller to brownout or stop providing power.

## Resources and Going Further

You should now know the most common ways to power your circuit and how to figure out which way is best for you depending on your your project’s specific requirements. You can make a better judgment now based on current, voltage, connector, and mobility considerations for your project. Check out these other great tutorials to monitor, control, or power your project!

### 12V/5V Power Supply Hookup Guide

In this tutorial, we will replace the 12V/5V (2A) power supply's molex connector with two male barrel jacks adapters.

### Understanding Thermal Resistance

Discussing what thermal resistance is, how it’s used for thermal management, and how to maximize the life of your project.

### SparkFun Qwiic Quad Solid State Relay Kit Hookup Guide

A Hookup Guide to get you started with the SparkFun Qwiic Quad Solid State Relay Kit (say that five times fast!).

### SparkFun Qwiic Dual Solid State Relay Hookup Guide

A Hookup Guide to get you started with the SparkFun Qwiic Dual Solid State Relay.

Or check out some of these blog posts for ideas: