Go Down

Topic: Off Grid Weather Station: Usage Determination to size Battery/Solar Combo (Read 555 times)previous topic - next topic

DGenter

Feb 18, 2019, 07:03 amLast Edit: Feb 18, 2019, 07:06 am by DGenter
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:
http://tinkerman.cat/weather-station/

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.

PerryBebbington

#1
Feb 18, 2019, 09:53 amLast Edit: Feb 18, 2019, 10:04 am by PerryBebbington
Quote
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
Quote
- Arduino Fio: (67 mA) * (24hr/day) = 1,608 mAh/day
I agree.

Quote
- 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

Quote
- 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.

Robin2

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
Two or three hours spent thinking and reading documentation solves most programming problems.

jremington

#3
Feb 18, 2019, 04:20 pmLast Edit: Feb 18, 2019, 04:22 pm by jremington
Quote
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.

AJLindfors

#4
Feb 19, 2019, 07:35 amLast Edit: Feb 19, 2019, 07:40 am by AJLindfors
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.

saildude

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

DGenter

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 - https://www.sparkfun.com/products/13851
Option #2: 3.7 V 850mAh, 850mA - https://www.sparkfun.com/products/13854

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!

PerryBebbington

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

Quote
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.

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?

BMP180: https://cdn.sparkfun.com/datasheets/Sensors/Pressure/BMP180.pdf

Thanks again for the help.

PerryBebbington

#9
Apr 18, 2019, 09:29 amLast Edit: Apr 18, 2019, 09:41 am by PerryBebbington
Quote
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.

Quote
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.

Quote
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).

srnet

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.
\$50SAT is now Silent (but probably still running)
http://www.50dollarsat.info/
http://www.loratracker.uk/

srnet

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.
\$50SAT is now Silent (but probably still running)
http://www.50dollarsat.info/
http://www.loratracker.uk/

DGenter

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.

Quote
The current consumption of that is so low as to be negligible.
and
Quote
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?

Quote
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

dave-in-nj

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?

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 :
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.

DGenter

#14
Apr 30, 2019, 08:33 amLast Edit: Apr 30, 2019, 08:53 am by DGenter
Quote
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?