Off Grid Weather Station: Usage Determination to size Battery/Solar Combo

Hello,

Thanks in advance for any guidance. I'm trying to calculate the power and energy requirements needed to run a small weather station isolated from the elect grid. I think I have have measured the voltages and currents required of the sensors but my measurements seem to be different than their technical documentation as well as other people's calculations. The current hardware I have is the following along with my measurements:

Arduino Fio (operating): 5.05 V, 67 mA [measured from volt/amp meter]
DHT22: 5 V, .079 mA [measured from volt/amp meter]
BMP180: 5.02 V, .625 mA [measured from volt/amp meter]
Xbee S1: 5 V, 45 mA [Voltage was measured but current was taken from product manual below]
XBee Product Manual

Question 1: Does these voltages and current readings sound accurate? Is there a way to check to ensure these are correct numbers? Sometimes, when I look up other peoples readings, they seem way off. For example, Tinkerman's site here:

I have code written, with the help of some other arduino forum contributors. Currently, the arduino fio is making and transmitting measurements twice a min, (120 times an hour). Depending on what is learned from this excercise I think I will need to adjust the code to include a sleep cylce but I wanted to understand these calculations before proceeding. If you want to take a look at the code please visit this forum string:
https://forum.arduino.cc/index.php?topic=581004.0

From the volt and the amps measurements taken above I create the following calculations:

  • Arduino Fio: (67 mA) * (24hr/day) = 1,608 mAh/day
  • DHT 22: (.079 mA) * (120 events / hour) * (24 hours / day) = 227 mAh/day
  • BMP180: (.625 mA)* (120 events / hour) * (24 hours / day) = 1,800 mAh/day
  • XBee: (45mA) * (120 events / hour) * (24 hours/day) = 129,600 mAh /day

This would have a total of 133,235 mAh/day which seems pretty ridiculous to me.

Question 2: Is this the correct way to go about calculating the mAh/day to help understand the needed battery size?

I'm pretty sure I am missing a, or some, pretty crucial part(s) here. I'm new to this world but find it fascinating. Any help would be much appreciated.

Thanks in advance for your help,

From the volt and the amps measurements taken above I create the following calculations:

  • Arduino Fio: (67 mA) * (24hr/day) = 1,608 mAh/day
  • DHT 22: (.079 mA) * (120 events / hour) * (24 hours / day) = 227 mAh/day
  • BMP180: (.625 mA)* (120 events / hour) * (24 hours / day) = 1,800 mAh/day
  • XBee: (45mA) * (120 events / hour) * (24 hours/day) = 129,600 mAh /day
  • Arduino Fio: (67 mA) * (24hr/day) = 1,608 mAh/day

I agree.

  • DHT 22: (.079 mA) * (120 events / hour) * (24 hours / day) = 227 mAh/day

I don't understand why you have multiplied by 120/hour. If the DHT draws 0.079mA all the time (does it?) then 0.079mA is the figure to use. Unless I've misunderstood the number of measurements per hour is irrelevant, just the current consumption. I make it
0.000079A * 24 = 1.896^-3Ah per day.

The same comment applies to

  • BMP180: (.625 mA)* (120 events / hour) * (24 hours / day) = 1,800 mAh/day
  • XBee: (45mA) * (120 events / hour) * (24 hours/day) = 129,600 mAh /day

I'll leave the maths to you. (You'd better check my maths while you are at it!)

For something battery powered that only does any thing useful for a few seconds twice per hour it makes sense to put a lot of effort into making it sleep the rest of the time.

Don't multiply by "events" - only by time.

If, by "events" you mean that a device is sleeping for part of the time and consuming less power then you need two current measurements - the sleeping current and the operating current and you need to know how many minutes per day the device is in each state.

You need a power supply that can provide the required voltage and plenty of amps. Each device will just take the amount of current that it requires.

More battery capacity and more solar capacity is better.

This JRC link may help you estimate how much solar energy you can expect. But it is an average. Your battery must be able to supply power without being over-discharged through several sunless days in winter.

...R

Arduino Fio (operating): 5.05 V, 67 mA [measured from volt/amp meter]

By applying the most appropriate low power techniques and making measurements/transmitting them only when necessary, you should be able to reduce the average power draw by at least a factor of 1000.

See this excellent tutorial and for a working example of these principles see Gammon's solar powered Arduino project.

I always do a dimensional analysis if things seem a bit off. In the last three your dimensions are mA*events/day. That needs to be re-worked. The absolute worst case is that the item is always on. In that case multiply 24 hours times the current to get your absolute maximum requirement.

I get approximately 2700 milliAmp hours per day as your maximum requirement.

Sparkfun has a meter that will total up ma/h over longer periods so you don't need to estimate how long a specific operation will be high draw

Thanks all for your help! This was really helpful and makes sense. I have made some updates to the code which enables sleeping modes for the Fio and Xbee for 60 sec and then turns it on for, lets say 5 sec (conservative estimate). The Xbee is on less than 5 sec but thought I would just have it the same as the Fio which is again, conservative. Updated figures below:

Below are my usage requirement estimates:
When Operating:

  • Arduino Fio: (10.38 mA) * (24hr/day) = 19.163 mAh/day
  • DHT 22: (.079 mA) * (1.85 hours / day) = .146 mAh/day
  • BMP180: (.625 mA)* (1.85 hours / day) = 1.154 mAh/day
  • XBee: (56mA) * (1.85 hours/day) = 104.529 mAh /day
    Total Operating current (mA) needed: 67.70 mA
    Total Operating mAh needed per day: 124.99 mAh

When Sleeping:

  • Arduino Fio: (10.38 mA) * (22.15 hr/day) = 12.628 mAh/day
  • DHT 22: (.079 mA) * (22.15 hours / day) = 0.000 mAh/day
  • BMP180: (.625 mA)* (22.15 hours / day) = 0.000 mAh/day
  • XBee: (56mA) * (22.15 hours/day) = .222 mAh /day
    Total Operating current (mA) needed: .58 mA
    Total Operating mAh needed per day: 12.85 mAh

With the above calculations, this would mean I need a battery that has minimum 137.84 mAh to last one day if it had an input voltage of 5.03 V. However the above numbers were measured when the device had a 5.03 V source. The batteries I've been looking into are 3.7V. Using Ohm's Law I get the following current reductions:

Ohms Law: V = I * R

Calculating the Resistance with a 5.03 Voltage Source
R (operating): = 5.03 V / (67.70 mA * 1000) = 74.29 ohms
R (sleeping): = 5.03 V / (.58 mA * 1000) = 8,672.41 ohms

After reducing to a 3.7 voltage source (batteries links below) - the current (I) would be reduced to the below numbers:
I (operating): = 3.7 V / (74.29 ohms * 1000) = 49.80 mA
I (sleeping): = 3.7 V / (8,672.41 ohms * 1000) = .43 mA

mAh needs per day
Operating: 49.80 mA * 1.85 hr /day = 92.13 mAh
Sleeping: .43 mA * 22.15 hr / day = 9.52 mAh
Total needs for 1 day: 101.65 mAh

I was thinking about buying one of the below batteries that would last (1) 3.95 days and (2) 8.38 days respectively.
Option #1: 3.7V, 400mAh, 400mA - Lithium Ion Battery - 400mAh - PRT-13851 - SparkFun Electronics
Option #2: 3.7 V 850mAh, 850mA - Lithium Ion Battery - 850mAh - PRT-13854 - SparkFun Electronics

Does this thought process make sense?

Some other questions came up which I was wondering if anyone had input or suggestions:

  1. I still need to determine my sites solar availability. I wanted to use the SunEye by Solmetric to help with this but it's pretty expensive. Any other suggestions about ways to do this that are quick and easy? I was searching for smartphone apps but didn't find anything. Reason I need to do this is because I have two large trees facing west and east ... so this will impact available solar and therefore the solar panel size I'll need.

  2. Any suggestions, regarding where to learn more about pairing up Solar and Batteries? Is the main consideration, that it has the ability to charge the battery, and therefore the current is the most important thing? For the Fio it looks like the Solar Voltage has to be between 3.7 - 7 V (as indicated on the Arduino Fio site). Any suggestions or resources would be much appreciated.

  3. Also, I wanted to make sure that the Fio should be able to take the input from the solar and charge the battery? This is a plug and play right? No resistors, or extra code needed, correct? Just want to make sure that once I find the specs of the solar panel, I can plug it in and not worry about fires or glitches... If there are other updates needed, does anyone know where I can look into those?

Thanks so much for the suggestions! This is really helpful!

Thanks all for your help!

A pleasure, and a pleasure to see you doing something with the advice you've been given :slight_smile:

With the above calculations, this would mean I need a battery that has minimum 137.84 mAh to last one day if it had an input voltage of 5.03 V. However the above numbers were measured when the device had a 5.03 V source. The batteries I've been looking into are 3.7V. Using Ohm's Law I get the following current reductions:

Ohms Law: V = I * R

Calculating the Resistance with a 5.03 Voltage Source
R (operating): = 5.03 V / (67.70 mA * 1000) = 74.29 ohms
R (sleeping): = 5.03 V / (.58 mA * 1000) = 8,672.41 ohms

After reducing to a 3.7 voltage source (batteries links below) - the current (I) would be reduced to the below numbers:
I (operating): = 3.7 V / (74.29 ohms * 1000) = 49.80 mA
I (sleeping): = 3.7 V / (8,672.41 ohms * 1000) = .43 mA

mAh needs per day
Operating: 49.80 mA * 1.85 hr /day = 92.13 mAh
Sleeping: .43 mA * 22.15 hr / day = 9.52 mAh
Total needs for 1 day: 101.65 mAh

Errrr, NO. Well, probably not anyway. You can't assume that electronic components behave linearly like resistors do (other than resistors, which, surprisingly enough, DO behave like resistors). Most likely the current does not fall proportionally with voltage, you need to check that. (I am NOT saying that Ohms law does not apply, I am saying that the resistance of the components varies with voltage. Ohms law always applies).

Bear in mind that your calculations are for new batteries. All batteries of whatever chemistry degrade over time. I suggest you at least double whatever capacity you initially calculate to allow for this.

Thanks Perry,

So I have some questions. I've been looking at the spec sheets for my two sensors (see below) and googling a little bit but can't find much on how the resistance changes with voltage for the sensors.

  1. Can this be found in documents or does it have to be measured? If it needs to be measured, any suggestions about how to create a 3.7 voltage source?
  2. Also, why does my 3V3 pin on my Fio measure to be 5.13V?

DHT22: https://cdn-shop.adafruit.com/datasheets/Digital+humidity+and+temperature+sensor+AM2302.pdf
BMP180: https://cdn.sparkfun.com/datasheets/Sensors/Pressure/BMP180.pdf

Thanks again for the help.

So I have some questions. I've been looking at the spec sheets for my two sensors (see below) and googling a little bit but can't find much on how the resistance changes with voltage for the sensors.

I wouldn't expect you to find that. What you will find is typical current consumption, which is shown on page 5, section 7, electrical characteristics of the Digital relative humidity & temperature sensorAM2302/DHT22 data sheet, and page 6, section 1 of the BMP180. The current consumption of that is so low as to be negligible.

If it needs to be measured, any suggestions about how to create a 3.7 voltage source?

I can't believe you are asking that! Buy a 3.7V voltage regulator. For the currents involved here it might as well be linear. Note that if you use any kind of voltage regulator or converter in your project it too will consume some current, don't forget to take that into account.

Also, why does my 3V3 pin on my Fio measure to be 5.13V?

Not a clue, sorry! You are measuring in the wrong place? It's faulty? It's not a 3V3 pin? It's Thursday? (I never could get the hang of Thursdays).

Calculations have their limits, it can be difficult to get all the timing measurements for exactly how long a particular device or sensor consumes what amount of power.

To check for real how much power your using, get one of those cheap USB power meters, that will tell you, in mAhr, the running amount of power used.

You cannot really rely on even the most sophisticated calculations, so you need to measure the actual power used anyway.

DGenter:
2. Also, why does my 3V3 pin on my Fio measure to be 5.13V?

If its really 5.13V, thats bad for the output of a 3.3V regulator.

Thanks all for your responses and patience,

So, would do you suggest gettingg another Arduino Fio if the current board's 3.3V pin is actually outputting 5.13 V? I'm powering the board most of the time through the FTDI pins when working through issues, but the end goal is to power it through the batteries mentioned in previous posts.

Perry, from your comments:

The current consumption of that is so low as to be negligible.

and

For the currents involved here it might as well be linear.

The spec sheets say that the current is negligible so are you saying the calculations estimated before (quoted below) should be fine and accurate enough?

With the above calculations, this would mean I need a battery that has minimum 137.84 mAh to last one day if it had an input voltage of 5.03 V. However the above numbers were measured when the device had a 5.03 V source. The batteries I've been looking into are 3.7V. Using Ohm's Law I get the following current reductions:

Ohms Law: V = I * R

Calculating the Resistance with a 5.03 Voltage Source
R (operating): = 5.03 V / (67.70 mA * 1000) = 74.29 ohms
R (sleeping): = 5.03 V / (.58 mA * 1000) = 8,672.41 ohms

After reducing to a 3.7 voltage source (batteries links below) - the current (I) would be reduced to the below numbers:
I (operating): = 3.7 V / (74.29 ohms * 1000) = 49.80 mA
I (sleeping): = 3.7 V / (8,672.41 ohms * 1000) = .43 mA

mAh needs per day
Operating: 49.80 mA * 1.85 hr /day = 92.13 mAh
Sleeping: .43 mA * 22.15 hr / day = 9.52 mAh
Total needs for 1 day: 101.65 mAh

I'll compare my calculations to the meter reading but want to make sure I'm understanding the concepts. Thanks again for the clarifications, help and patience.

I'm thinking of the below meter:
KEWEISI 4V-20V 0-3A USB Charger Power Battery Capacity Tester Voltage Current Meter

DGenter:
Thanks Perry,

So I have some questions. I've been looking at the spec sheets for my two sensors (see below) and googling a little bit but can't find much on how the resistance changes with voltage for the sensors.

  1. Can this be found in documents or does it have to be measured? If it needs to be measured, any suggestions about how to create a 3.7 voltage source?
  2. Also, why does my 3V3 pin on my Fio measure to be 5.13V?

DHT22: https://cdn-shop.adafruit.com/datasheets/Digital+humidity+and+temperature+sensor+AM2302.pdf
BMP180: https://cdn.sparkfun.com/datasheets/Sensors/Pressure/BMP180.pdf

Thanks again for the help.

you might want to verify your data sheets.
The BMP180 shows :
Supply voltage:
1.8 ... 3.6V (VDD)
1.62V ... 3.6V (VDDIO

Absolutemaximum rating Supply voltage

all pins -0.3 to +4.25V
Low power:
5μA at 1 sample / sec. in standard mode

Peak current
Ipeak during conversion 650μA

Standby current
IDDSBM@ 25°C0.141μA
if you are measuring 5 volts and 0.625mA, I would question your wiring and possibly your software.

as a suggestion :
run a data acquisition table for all your readings.
I highly suspect that you will never see much of a change in 1/2 second, especially for temperature and humidity.

With the low power use of the Phillips sensors, what benefit do you get with the DHT11 over the BME280 ?
Have you looked at the humidity specs for both devices ?

you could do a 10 second high/low loop.
at the start of the loop
highT = temp
lowT = temp
if temp > highT
then highT = temp
then every 5 seconds, log the temp, the highT and lowT
and then re-set so all readings = the new temp at 6 seconds.

if you could do readings every 5 seconds and still maintain the accuracy you want, you would save non-sleeping power.

Thanks for your comments Dave-in-nj but I don't fully understand these comments.

you might want to verify your data sheets.
The BMP180 shows :
Supply voltage:
1.8 ... 3.6V (VDD)
1.62V ... 3.6V (VDDIO

Absolutemaximum rating Supply voltage

all pins -0.3 to +4.25V
Low power:
5μA at 1 sample / sec. in standard mode

Peak current
Ipeak during conversion 650μA

Standby current
IDDSBM@ 25°C0.141μA
if you are measuring 5 volts and 0.625mA, I would question your wiring and possibly your software.

Sorry, but it isn't fully clear to me. Can you tell me why you are questioning the wiring and/or the software?

For your other questions:

With the low power use of the Phillips sensors, what benefit do you get with the DHT11 over the BME280 ?
Have you looked at the humidity specs for both devices ?

I'm not too sure, I haven't looked at the specs for the BME280. The sensors I used were sensors people used on other similar projects as mine so I just went with that.

Thanks for your help.

DGenter:
Thanks for your comments Dave-in-nj but I don't fully understand these comments.
Sorry, but it isn't fully clear to me. Can you tell me why you are questioning the wiring and/or the software?

For your other questions:I'm not too sure, I haven't looked at the specs for the BME280. The sensors I used were sensors people used on other similar projects as mine so I just went with that.

Thanks for your help.

in yoru first post, you state you physically measured :
BMP180: 5.02 V, .625 mA [measured from volt/amp meter]
putting 5.02 volts on a 3.3v device might damage it. some devices are are more tolerant of higher voltages than others.
since you have a 3.3 volt power on your Arduino UNO board, and since there are many ways to connect these devices of different voltages, you should consider what is the best option.
#2)
the DataSheet for the BMP180 shows the maximum power of the device to be 650micro-amp to 1,000mico-amp during the conversion (readings) and you say you are measuring 650mili-amps, it seems like the device might be getting really hot, or might be wired incorrectly.
If you are open to alternatives, the ESP8266 has sleep mode, runs on 3.3 volts, can read the BME280 tht does pressure, temperature and humidity, and has two output options.
#1) ESP-NOW
#2) WiFi
ESP-NOW is a bit lower power.
there are also some much lower power RF boards that might be better suited to wireless and longer battery life.
for my weather sensor, I am using both a DS18B20 temperature sensor and the BME280. they never read exactly the same, but my needs for gardening are to know if the temperature is even close to freezing/frost and not so much if it is a fraction of a degree away, more like 3 or 5 degrees.
here is an interesting read : Paul_RB

Thanks for elaborating dave-in-nj. I'll go back and look through my wiring in more detail and the suggested sensors. I think I may have damaged the Fio board when soldering the pins because its odd that the 3V3 is measuring 5V.

So, this project seems like there may be quite a few areas for improvement. I would like to understand conceptually how to determine the solar panel requirements for a project like this. Lets say the above numbers are accurate and the weather station requires the following to function throughout the day.

  • 3.7V
  • 75.5 mAh / day
  • .311 Wh / day

The battery being purchased is a 3.7V 400 mAh battery (Lithium Ion Battery - 400mAh - PRT-13851 - SparkFun Electronics) and would provide enough backup to last almost 6 days without being recharged.

For my location, I only get 3-4 hours a day due to shading during winter. From what I have read, it sounds like the solar panel should be rated to a higher voltage than the battery. It seems to me like this Solar Panel (1 Watt 6 Volt Solar Panel | Small Solar Panels) would suite the needs above well. It has a potential of outputting 6.5V, 180mA when in optimum conditions. This means for 3 hours it could output 540 mAh which could fully recharge the battery (400 mAh) while also power the weather station (75.5 mAh).

I have a few questions:

  1. Is that thought process the right way to look at it for working out solar specs needs?
  2. Do I need to worry about voltage regulation for the battery if the Fio has a Miniature Single-Cell, Fully Integrated Li-Ion,Li-Polymer Charge Management Controllers (MCP73831/2). This can regulate different voltages (4.20V, 4.35V, 4.40V, 4.50) but how do I know which is right for the battery and then how do I set the controller to output that voltage?

Any resources, reading, suggestions and/or guidance would be much appreciated!
And thanks again for all your help with this project. Its been a good learning experience.

  1. What about extended cloudy or stormy periods, when the solar panel provides no useful power?

  2. You have to use the appropriate charge profile for the battery you have chosen. Consult the battery manufacturer's data sheet for the details.

You also need a low voltage cutoff PCB on the battery, as lithium based cells are destroyed by discharging too far. Most single chip charge controllers take no account of any load on the battery, and are not necessarily reliable if the rest of the circuit is actively drawing power from the battery.

Thanks Jremington,

The battery would provide power for at least 5 days if calculated correctly. Isn't this a big enough buffer? Let me know if something is going right over my head.

To your second point, the battery says it has protection against minimum voltage. Under the Sparkfun website it says the following (Lithium Ion Battery - 400mAh - PRT-13851 - SparkFun Electronics

The battery includes built-in protection against over voltage, over current, and minimum voltage.

In the datasheet on sparkfun it says the following (https://cdn.sparkfun.com/datasheets/Prototyping/spe-00-502535-400mah-en-1.0ver.pdf

The battery is discharged at 0.2C5A in the constant current till it reaches overdischarge protection voltage at(20±5)°C,connected with a 30Ω lead and discharged for 24h

I'm not 100% sure what the second quote means. Is a low voltage cutoff PCB still needed?

Thanks again for your help!

The battery would provide power for at least 5 days if calculated correctly.

The calculations are difficult to follow and certainly do not appear to be correct.

From reply #8:

When Sleeping:

  • Arduino Fio: (10.38 mA) * (22.15 hr/day) = 12.628 mAh/day

When I multiply 10 mA by 22 hr/day in my head, I get 220 mAh/day. So no, the battery would not last for 5 days; not even 2, just powering the Fio in sleep mode.

I recommend to study the "bare bones" tutorial linked earlier. The Arduino sleep mode current can be reduced to negligible values.