Calculating Power

Power to your circuits

It’s important to know how to calculate total power consumption in your circuit. This allows you to specify, with a good degree of certainty, a reliable power supply for your project’s needs.

Providing insufficient power to your circuit usually results in ‘brownouts’: power failures effectively which will cause your circuit to operate erratically. The most common sign of insufficient power, if you’re using a microcontroller, is seeing the device power cycle itself without warning.

The other sign might be more obvious – if you’re using a ‘wall-wart’ or ‘plugpack’ AC-to-DC adapter, it’s going to get really hot before it throws itself into thermal protection mode and shut down – that’s if you’re lucky and not destroy the electronics in the adapter! Batteries get hot when you draw too much power too quickly, too, so watch out for those signs.

AC-to-DC adapter, sometimes known as a ‘wall-wart’ or a ‘plugpack’. Read those labels, they tell you if it’s suitable for your needs!

How to calculate power consumption

There are two ways to do this. The first way is theoretical, i.e. you calculate all of the components’ power consumption with the help of datasheets. The second way is to use a digital multimeter (DMM), set to measure amperage, or a bench power supply that gives you a readout of the power supplied to your circuit.

It’s obvious that the latter method (using DMMs / bench power supplies) will give you more exact, ‘real-world’ readings. The theoretical method however lets you ballpark the initial expected power consumption profile for your circuit and is usually the first step to determining the right power supply rating for your needs.

To get started you need to be familiar with the concept of voltage and amperage.

Electrical power, measured in Watts, is derived by multiplying your supply voltage with the amperage. For example, 5V x 2A = 10W. Use this formula to easily convert between ratings printed on the power supplies.

1. Know your voltage(s)

The assumption here is that you are working with DC voltage. Circuits powered by batteries, USB, or a ‘wall-wart’ AC-DC adapter are an example of DC circuits.

Here are some typical scenarios:

Once you know the voltage, we can look at power consumption.

2. RTFM: Calculating from datasheets

Go to each component’s datasheet to get a nominal rating of power consumption. It’s important to note the term nominal or typical, which points to the average power consumption rating. This might change depending on the component and how the circuit is utilised.

For example, look at the Particle Photon:

Activity Power consumption
WiFi transmitting 235-430mA
WiFi standby 80-100mA

(refer to datasheet for full details)

This means if you have a project that uses WiFi very actively, you will want to lean towards the peak consumption of 235-430mA a bit more than the typical 80-100mA.

Once you have the mA ratings found, add them all up. For example, using a Photon that sends WiFi data every 10 minutes, but uses say a sensor that consumes 40mA typical, will give us about 100+40mA = 140mA.

With this value, I find it to be good practice to add a 20% buffer to compensate for inefficiencies, power fluctuations and peak draw. 140mA + 20% = 168mA.

You now have the total theoretical power consumption for your circuit!

3. I’ve got the power, now what?

With the voltage and amperage known, you can now look around for a suitable power supply.

AC-DC adapters: wall outlet power source

We’ll focus on ‘plugpack’, ‘wall-wart’ power supplies first. The image at the top of this page shows an example.

It’s likely no manufacturer will have one that is exactly what you need, so find a power supply with the correct voltage, and select the next step upwards from your amperage. In our example above, you’ll be hard-pressed to find a 168mA plugpack, and the next closest one might be 500mA, so choose that.

More amps in a plugpack is fine; like a car, this means it just has more headroom to spare. A circuit will only draw as much current as it needs, so you won’t consume more power.

Read the one shown on this page: the OUTPUT label describes a 5V/3A supply.

Another important detail for plugpacks is the barrel jack connector. There is a polarity that you have to follow.

A DC barrel jack, disassembled

Power barrel jacks have polarity! If you are going to solder your own jack to your power supply, be careful that you use proper wire colours to help you identify the polarity of the power supply!

Positive Tip Polarity
Negative Tip Polarity
Polarity is always printed on a power supply. In this case we have a positive tip polarity.

Most devices have positive on the inside ‘tip’, as shown in diagram A.

Use these labels which can be found printed on AC/DC adapters as a reference, and solder your own jacks carefully!


The other alternative of course is batteries. Let’s be more environmentally-aware and use rechargeable batteries instead of the alkaline ones.

A good start is the 4xAA battery holders you can get from an electronics supply store. 4xAA = 4x1.5V = 6V. However, rechargeable NiMH batteries are rated at 1.2V, so that will give you 4.8V, which is usually still sufficient for 5V systems.

The challenge of such AA / AAA / C / D size batteries is that they have a fixed voltage, which usually implies that you need some form of a voltage regulator to get them operating at your ideal voltage. For example, 2xAA will give you between 2.4 and 3V, not quite sufficient for a 3.3V system. Likewise, a 4xAA gives 4.8-6V, not exactly a very strong voltage to power a 5V Arduino UNO on the low end, and a touch too high at 6V. In such cases you will need to rely on voltage regulators, a topic that deserves a separate article. Meanwhile come speak to me if you have questions, or access the internet for tutorials on voltage regulators.

The topic of lithium-polymer (LiPo) batteries is a bit more complex and won’t be covered in this article – come talk to me if you intend to use this potentially hazardous energy source.

4. Summary

You can break down theoretical power calculation thusly:

Other ways

Adafruit has the Charger Doctor that provides USB-powered circuits a quick and easy way to measure power consumption. It’s handy but only works easily if you are drawing 5V from a USB power source.

If you want absolute precision in measuring power consumption, consider Dave Jones’ (of EEVBlog fame) µCurrent GOLD.