Calculating Total Arduino Power Consumption

Hello everyone, this all fairly new to me so sorry if my question sounds really basic or bad overall.

So I am making (trying) an environmental monitoring system that uses 4 sensors operating a 5v, an ESP8266 at 3.3v and an SD card module at 5v. There will probably be a few more bits added later, but the question I wanted to ask is:

How do you calculate the total system energy usage?

I plan on making the system run on batteries and charge via solar energy, but I assume I need to know my total system usage first before I can choose the right battery type and capacity.

Any help would be greatly appreciated and thanks in advance.

It's easiest just to measure it, rather than calculate. You can buy a digital multimeter on eBay or Aliexpress for ~$3 USD w/ free shipping that measures down to tenths of a microamp. Of course that's only the momentary current draw so if your device's current draw changes (e.g. going in and out of sleep mode) then you would also need to account for that.

For a solar powered system, it is usually important to save as much energy as possible.

So, I strongly recommend that you carefully go through this excellent tutorial on power saving techniques.

Also, check out Nick Gammon's solar cell/supercap powered Arduino sensor project.

Thanks for the responses everyone. I was able to find some sources around making system calculations. I'm not 100% sure how accurate they might be or whether or not my calculations are right. But according to the calculations my entire system works out to use 835.1 mA.

With some other formulas I found I would need a 7740 watt battery and a Solar panel that was rated at 15.2 watts.

Thank you for the links you have provided.

Batteries are not measured in Watts, they are measured in Volts and Ampere hours.

7740 Watts is enough power to heat a small building, so check your calculations.

Sparkfun sells a Watt Meter that also measures Amp Hours - yes after the fact but one way to check things after the build

800mA seems high, but for example 10 hours at 800mA would require an 8 Amp-Hour* battery.

Is it going to operate 24 hours a day? What are the consequences if you have no sun for a day, or a few days, or several days? Is it a disaster if the battery dies?

It's a good idea to make an estimates, but in the end, you'll have to do some experiments and make some measurements, and possibly re-adjust your design with a bigger battery or a bigger solar panel.

I'd say the most difficult thing to calculate/estimate/predict is the energy from the solar panel. You're only going to get the maximum from the solar panel at noon, on the equator, on a clear day in the summer! :smiley: :smiley: And of course, there is randomness in the weather... Some clouds at lunch time will affect the amount of energy you can collect for that day.

Also battery charging/discharging is not 100% efficient so you have to feed-in more energy than you take-out.

  • You'll have to check the specs for the particular battery, but the real-world usable life depends on how much extra-voltage the battery has. I believe the amp-hour rating usually assumes the battery is good down to 60% of its rated voltage. So a 7.2V battery would be down to about 4.3V and that may not be enough if you need 5V (and you'll get less than the rated/calculated hours). However, if you need 5V and you have a 12V battery then you can go beyond the rated/calculated hours.

What are your storage requirements.
Your ESP8266 module could have more than enough SPIFFS memory to store the data.
An SD card might not be needed.

The ESP module itself draws about 80mA@3.3volt, and <20mA when WiFi is disabled (e.g. during the night).
Post links to the sensor you’re planning to use.

This guide might be a good read.
Leo…

Wawa:
What are your storage requirements.
Your ESP8266 module could have more than enough SPIFFS memory to store the data.
An SD card might not be needed.

The ESP module itself draws about 80mA@3.3volt, and <20mA when WiFi is disabled (e.g. during the night).
Post links to the sensor you’re planning to use.

This guide might be a good read.
Leo…

Hi @Wawa thanks for the information you provided. I’m not sure about my storage requirements as of yet. Storing raw data from the sensors must be very small, like at a byte level. I already own a 1Gb SD card which is plentiful and the SD module only supports a maximum of 2Gb.

Here are the different components I am using in my project:

  1. Solar Panel http://bit.ly/2zimtCj
  2. Rechargeable 9V Battery http://bit.ly/2DxPRma
  3. Uno Rev 3 http://amzn.to/2DxVCQP
  4. SD Module http://bit.ly/2DyDFl9
  5. Grove Dust Sensor http://bit.ly/2Caxx6z
  6. Grove Temp & Humidity Sensor http://bit.ly/2ybWbxG
  7. Grove Light Sensor http://bit.ly/2ybWbxG
  8. ESP8266 Transceiver http://bit.ly/2zN3kEL
  9. Grove Air Quality Sensor http://bit.ly/2khVUah

As far as progress is concerned I have successfully managed to get my ESP8266 connected up to my thingspeak channel Environment Monitoring System - ThingSpeak IoT and the sensors communicating with it. Only issues at the moment is the analogue read of my light sensor.

I hope this information helps in anyway :slight_smile:

jremington:
Batteries are not measured in Watts, they are measured in Volts and Ampere hours.

7740 Watts is enough power to heat a small building, so check your calculations.

Yes the example I found the person was referring to watt. I’m not sure why as I also found it odd.

I revisited my earlier calculations and tried again and shown below are my new values:

Variables:

  • System power usage = 835.1mA
  • Solar energy for my location = 1100kwH/m^2
  • Hours in 1 Month = 730h / 31 Days = 744h
  • Hours in 1 Year = 8760h
  • Solar Panel efficiency = 15.5%

1st Calculation:
1100kwH/m^2 / 8760h = 0.126mW/m^2 * 1000 = 126w/m^2 ← Total solar radiation for 1 year

2nd Calculation:
126w/m^2 / 12 = 10.5w/m^2 ← Total Solar radiation for 1 month

3rd Calculation:
10.5w/m^2 * 0.155 (15.5%) = 1.63 W/m^2 ← produced by the solar cell

4th Calculation:
1.63w/m^2 / 10 = 0.163mW/cm^2 ← converted into milliwatts per cm^2

5th Calculation:
835.1mA / 1000 = 0.8351 Amps

6th Calculation:
5.00v * 0.8351 = 4.18w

7th Calculation:
4.18w / 1.63w/m^2 = 2.56cm^2 ← Size of solar panel needed

8th Calculation:
744h * 0.8351 = 634.71

9th Calculation:
634.71 * 2 (some rule of thumb apparently) = 1269.42 ← Battery capacity ?

10th Calculation:
1269.42 / 835.1 = 1.52 ← hours run time ?

Sorry for the long post, I imagine this probably makes little sense and unfortunately I miss placed the source when I got the calculations method from. :frowning:

A lot on that parts list doesn't make sense.

You need a boost converter + charge controller to charge a 9volt NiMH battery with a single 5.5volt solar panel.
That makes overall charge efficiency very low, especially when you only have 170mA in full sun.

Dropping that to 5volt and 3.3volt with a linear regulator will convert more than half of the power from the battery into heat.

Several of the sensors will need a much larger battery (current) to even work.

My advice is to use one sensor at the time with the Arduino on USB power, and learn from it before you take the much harder road of battery powering the whole project.
Leo..

hymcode:
1st Calculation:
1100kwH/m^2 / 8760h = 0.126mW/m^2 * 1000 = 126w/m^2 ← Total solar radiation for 1 year

This only works if you somehow get 24 hours of sun for an entire year. Realistically, average will be 12 hours per day, and it would be better to design the system to be able to run at full capacity (with some leeway for weather) at whatever amount of sunlight you get on the shortest day of the year.

Also, do you know how this value (- Solar energy for my location = 1100kwH/m^2) was measured? It’s not an instantaneous power, but we don’t know whether they extrapolated from an ideally placed panel on a sunny day at noon or did an actual measurement from a panel over a day or several. Without knowing how this was measured, you can’t know how to use this value to plan around.

SteevyT:
This only works if you somehow get 24 hours of sun for an entire year. Realistically, average will be 12 hours per day, and it would be better to design the system to be able to run at full capacity (with some leeway for weather) at whatever amount of sunlight you get on the shortest day of the year.

Also, do you know how this value (- Solar energy for my location = 1100kwH/m^2) was measured? It’s not an instantaneous power, but we don’t know whether they extrapolated from an ideally placed panel on a sunny day at noon or did an actual measurement from a panel over a day or several. Without knowing how this was measured, you can’t know how to use this value to plan around.

Thank you for the response and sorry for the late reply. Indeed you have pointed out a big flaw in my maths. I had completely disregarded that 8760h factored in a full 24 hours of each day. So looks like I will need to redo my maths using 4380h instead (8760h / 2).

My eventual goal is to have the system running at full capacity, but at the moment as this is all new to me, I’m just trying to find the simplest possible method of running the system for a short period of time, turning off and charging through solar energy.

The 1100KwH solar energy value I got from this PDF document: http://bit.ly/2GLU1JV

I hope this information helps.

hymcode:
The 1100KwH solar energy value I got from this PDF document: http://bit.ly/2GLU1JV

I hope this information helps.

Bottom left corner shows average annual sum over several years. Looks like that is the amount of total energy the area will receive over a year. Interestingly, that may be really useful to get a general idea if the system has a hope of working if you can figure out how much energy your system will use in a year. However, it says nothing about what to expect on long days vs short days which makes figuring out what kind of battery system you'll need kind of tricky.

Also, remember to keep in mind the efficiency of solar panels. They aren't 100% efficient so there are power losses just converting sunlight to electricity.