Hello,
My device is Anarduino + RF96 (LoRa)
It have to work in outdoor conditions, box with device will be covered under snow most time.
Temperature should be about 0 Celsius - ground level.
Device will consume about 50-60 mA in RX-TX window and 0.04mA in sleep mode - this values is measured when testing.
Also there is photo-resistor, so device will be in sleep mode in dark time of day.
I suppose that device will consume about 65mA in 24 hours - it will work 3 seс in every minute, then it will go into sleep mode for rest time, then wakeup, do work, and then again sleep.
this 65mA was calculated in this way:
3sec/3600*60*24*50mA == 60mA in 24 hours in work mode.
57sec/3600*60*24*0.05mA == 1.14mA in 24 hours in sleep mode.
With photo-resistor it will maybe 30mA in a day, because device should sleep half of 24 hours.
My question is - which batteries should I use for my device if I want my device working at least 3 month ?
I'm looking at 18650 batteries with 3000mAh.
Two such batteries give me 6000mAh and seems it will work for more that 90 days even without photo-resistor - 6000/60 == 100days.
Any advices? maybe I'm wrong in my calculations ?
Thank you in advance.
According to http://oregonembedded.com/batterycalc.htm with a 3 Ah battery -- Estimated battery life is: 35.3 days, or 0.1 years. You can double it if sleeping through the nights.
The 40 uA sleep current sounds excessive, you might be able to bring it below 10 or so. But it's not the biggest factor, 60 mA is a lot, are you sure it's for the full 3s period?
Thank you for answer.
- as for 60mA - I just see this value - 55-60 on my multimeter when device in RX-TX mode, and according to my code it should be not more than 3 sec:
.......
while(millis() - startTime < 3000) // life == 3 sec.
//do stuff
.....
so I just take this value as average.
- as for consumption in sleep mode - again, my multimeter show value like 0.047 when device in sleep mode.
and I can't get better value. so I'm ok with this.
So seems my calcilations are correct and two 18650 batteries on 3000mAh will work for me
Well in any case, I suggest adding battery voltage reporting to your project so you're notified of the battery status...
Yes, I have such code and it works well.
but it works for power supply 5V and I connect it to Vin pin.
And if I'm going use 18650 batteries - I have to connect it to Vcc pin and seems I need to change this code to measure voltage on Vcc pin.
If you skip the LDO, you can use the "secret Arduino voltmeter" code for measuring the Vcc - just google it (example (http://provideyourown.com/2012/secret-arduino-voltmeter-measure-battery-voltage/)).
I suspect your consumption estimate is way over-stated. The period of high drain (radio transmission) should be measured in milliseconds not seconds. I am not familiar with LoRa but with RFM12B radio I have temperature measuring nodes that run almost 3 years on a single AA alkaline cell via a 3.3V boost chip, while sending a measurement every minute. I think that's around 1500mAh.
To measure the short bursts of high current consumption accurately in this kind of scenario you need an oscilloscope - lots of examples and learnings can be found on the JeeLabs blog (example (http://jeelabs.org/2013/10/05/flashback-anatomy-of-a-transmission/)).
Also the choice of battery chemistry is more critical if freezing conditions are to be tolerated.
Quote from: damonb on November 18, 2015, 09:37:01 PM
...with RFM12B radio I have temperature measuring nodes that run almost 3 years on a single AA alkaline cell via a 3.3V boost chip, while sending a measurement every minute.
@damonb That impressive! Which 3.3v boost chip are you using? I ask because I was under the impression that the boost circuits added considerably to the current drain, even if the Moteino is asleep. If that's not true, then I would maybe like to do the same.
@d00m178 The units you calculated in your OP are wrong. You want to calculate your current consumption in mah per day, not ma. Then, you can roughly estimate how many days by dividing that number into the mah of your battery capacity.
Quote from: damonb on November 18, 2015, 09:37:01 PM
I suspect your consumption estimate is way over-stated. The period of high drain (radio transmission) should be measured in milliseconds not seconds.
Yes, I suppose you are right.
I just connect multimeter to circuit, turn on device, and start monitoring values. So definitely these values pretty average and inacurate. Unfortunately I have no oscilloscope so I cant measure it more accurate.
So I believe, in fact, power consumption should be less. But I need to be sure that my batteries will work all the time which I need, so I'm going to install batteries with reserve of power.
Quote from: WhiteHare on November 18, 2015, 10:59:13 PM
@d00m178 The units you calculated in your OP are wrong. You want to calculate your current consumption in mah per day, not ma. Then, you can roughly estimate how many days by dividing that number into the mah of your battery capacity.
That's what exactly I did - I have calculated power consumption per hour and then multiplied it on 24.
I have also calculated it in different way and values came the same:
work mode (WM) - time 3 sec (according to my code), power consumption 50 mA (according to MAX multimeter values in measure time)
sleep mode (SM) - time 57 sec, PS == 0.05 mA
then:
WM - in 1 hour device will work 3*60minutes == 180 sec
SM - in 1 hour device will sleep 57*60 == 3420 sec
1 hour has 3600 sec so,
1 hour WM will consume power:
3600 - 50
180 - x
x == (180*50)/3600 == 2.5 mA
1 hour SM will consume power:
3600 - 0.05
3420 - x
x == (3420*0.05)/3600 == 0.0475 mA
In sum power consumption PER HOUR will be 2.5475 mA.
PER DAY == 2.5475*24 == 61.14 ~ 65mA as I stated previously.
Am I still wrong? Please take a look.
Quote from: d00m178 on November 18, 2015, 11:48:22 AM
<...snip>
I suppose that device will consume about 65mA in 24 hours - it will work 3 seс in every minute, then it will go into sleep mode for rest time, then wakeup, do work, and then again sleep.
this 65mA was calculated in this way:
3sec/3600*60*24*50mA == 60mA in 24 hours in work mode.
57sec/3600*60*24*0.05mA == 1.14mA in 24 hours in sleep mode.
With photo-resistor it will maybe 30mA in a day, because device should sleep half of 24 hours.
My question is - which batteries should I use for my device if I want my device working at least 3 month ?
I'm looking at 18650 batteries with 3000mAh.
Two such batteries give me 6000mAh and seems it will work for more that 90 days even without photo-resistor - 6000/60 == 100days.
Any advices? maybe I'm wrong in my calculations ?
Thank you in advance.
Given your model of
- 50uA quiescent,
- 60mA for a 3 second duration (there are probably ways to improve this...)
- 60 seconds sampling interval
- sampling only 12 hours a day
a 3000mAH battery will give you around 81 days of life. IF you can actually pair two LiPos to yield 6000mAH IN PARALLEL, then you'd get double this. I qualify the statement because putting two batteries in series does nothing to extend your battery life - you'll only throw away any power above 3.3V. You could use two schottky diodes with a common cathode feeding Vin and each anode tied to each battery. This won't be perfect but it will be close...
BTW, two AA Ultimate Lithium batteries will give you the same result (as one 18650), albeit not rechargeable, but won't self-discharge as quickly either.
Tom
UPDATE: Added clarification to AA battery life.
I have 3 LiPo batteries like this
http://www.alibaba.com/product-detail/505072-lithium-polymer-battery-3-7v_60180851261.html
3.7 V and 2000 mAh
Can I connect them in parallel to increase capacity to ~6000 mAh?
These batteries has some charge controller onboard so I'm wondering if it safe to connect in parallel.
By the way, table 55 of the RFM95/96 datasheet says that typical current during receive mode is 10.3-13.8ma, and 20-28ma in Tx mode. So, as Tom alluded, 60ma over 3 seconds sounds a lot higher than it needs to be... For instance, if you're transmitting every minute, maybe just Tx and forget about listening for an ACK. That alone might save your high current window by 90%, even with the low LoRa bitrates.
I have 10 thermosensors ds18b20 which measure in this 3 sec window and they powered from digital pin of MC.
so maybe consumption grows because of these sensors.
Now I need install my LiPo battery and just wonder if I can connect them in parallel.
Quote from: d00m178 on November 19, 2015, 04:12:47 PM
<...snip>
Now I need install my LiPo battery and just wonder if I can connect them in parallel.
Definitely not, unless you have the fire department and bomb squad standing by.
You can connect more than one battery to Vin IF and ONLY IF, you isolate each battery from each other with a blocking diode as I suggested earlier.
Also, I personally wouldn't trust a LiPo battery from 'just anybody'. I know someone on this forum (who shall remain anonymous) who has regretted that decision. If you really care about reliability, then buy from a source (manufacturer) you know and warrants their product.
Doing more than one battery this way will complicate your charger (you'll need three individual circuits) if you have an on-board charger. On the other hand, it would permit you to pull 2 of the batteries while the other remains while you charge the two.
Tom
Quote from: d00m178 on November 19, 2015, 04:12:47 PM
I have 10 thermosensors ds18b20 which measure in this 3 sec window and they powered from digital pin of MC.
so maybe consumption grows because of these sensors.
<snip...>
The DS18B20 sensors take some time to power up enough to provide a reading (750mS IIRC). Their current isn't very high, but, when you wake up and take a reading from your sensors, keep your radio asleep until you're ready to send the entire packet. I think your power profile will be a lot lower if you do. Single digit mA until you turn the radio on and then, as WhiteHare suggested, TX only, don't bother waiting for Ack. It's a waste of power if you're sampling so often.
Tom
ok
thank you all for advices..
but seems I have new issue.
My results of measurement of power consumption which I have (work mode ~50mA and sleep mode ~0.05mA) I did when my device was powered via USB FTDI adapter, which power MC via VIN pin I suppose.
So 5V from USB goes through onboard stabilizer and then convert to 3V.
But when I power device direct to VCC pin from my LiPo battery my multimeter shows different result for sleep mode - about 0.7mA ! for work mode result the same - ~50mA.
I decided to power device from battery via VIN and it works ok, but when I connect my multimeter into the circuit it goes crazy and blink with different values and device doesn't work. Seems it is not enough power for device when multimeter connected.
So I'm stuck - I can't check how many power my device consume when it powered via VCC from battery..
Any help and explanations will be very helpful.
Thank you in advance.
It may be that the voltage drop across your ammeter (aka "burden voltage") is so high that your circuit gets inadequate voltage to operate. Try using your multimeter as a voltmeter instead and measure the voltage drop across a 1ohm resistor as a proxy for a current reading. If you want higher accuracy than that, consider buying a uCurrent Gold from Dave Jones (at EEVblog).
Yes, Im also thinking about voltage drop.
But I'm totally don't understand why power consumption grows to 0.7mA if I power device via VCC from 3v battery?
Is there some explanation for such effect ?
Or I just need power it via VIN and hope that consumption will be the same as when I power it via VIN from USB adapter?
Actually I have 3.8v on battery contacts which shows me my multimeter, so after VIN it should be 3.3 which means that stabilizer works and drain battery.
QuoteThe DS18B20 sensors take some time to power up enough to provide a reading (750mS IIRC).
BTW, one issue I initially overlooked with my sensors is that the 328p should be powered down while sensors are powering up. Otherwise you waste a lot of energy just waiting for the sensors to get ready. A battery powered node should not contain any invocations of the function delay() for this reason unless delays <50ms are required (which aren't available via the WDT). Use LowPower.powerDown instead.
Quote from: joelucid on November 23, 2015, 12:43:02 PM
BTW, one issue I initially overlooked with my sensors is that the 328p should be powered down while sensors are powering up.
Does this mean even GPIO powered sensors? I hadn't thought of that. Sequence would be:
- Wake up from listen mode burst.
- Set the GPIOs that power the sensors.
- Send the reset, SKIP_ROM sequence to the one wire sensors.
- Lowpower.Sleep for 750mS.
- Do the readings.
- Wake up the radio, send the info, and go back to sleep.
Cool... Ya know, Joe, one of these days you just might amount to something! ;D
Tom
Yup - that's how I do it ;D
Quote from: WhiteHare on November 18, 2015, 10:59:13 PM
Quote from: damonb on November 18, 2015, 09:37:01 PM
...with RFM12B radio I have temperature measuring nodes that run almost 3 years on a single AA alkaline cell via a 3.3V boost chip, while sending a measurement every minute.
@damonb That impressive! Which 3.3v boost chip are you using? I ask because I was under the impression that the boost circuits added considerably to the current drain, even if the Moteino is asleep. If that's not true, then I would maybe like to do the same.
@WhiteHare: My sensor network is built on hardware and libraries from JeeLabs (http://jeelabs.org/). The long-lived temperature node is a JeeNode v6 (http://jeelabs.net/projects/hardware/wiki/JeeNode) with a single DS18B20 sensor powered by 3.3V (always on) and the whole thing is powered by a AA Power board (http://jeelabs.net/projects/hardware/wiki/AA_Power_board). The boost regulator chip is a LTC3525. The LDO 3.3V regulator on the JeeNode is left in place i.e. not bypassed. I haven't measured the actual current drain but the battery life speaks for itself.
Quote from: damonb on November 29, 2015, 03:12:53 AM
Quote from: WhiteHare on November 18, 2015, 10:59:13 PM
Quote from: damonb on November 18, 2015, 09:37:01 PM
...with RFM12B radio I have temperature measuring nodes that run almost 3 years on a single AA alkaline cell via a 3.3V boost chip, while sending a measurement every minute.
@damonb That impressive! Which 3.3v boost chip are you using? I ask because I was under the impression that the boost circuits added considerably to the current drain, even if the Moteino is asleep. If that's not true, then I would maybe like to do the same.
@WhiteHare: My sensor network is built on hardware and libraries from JeeLabs (http://jeelabs.org/). The long-lived temperature node is a JeeNode v6 (http://jeelabs.net/projects/hardware/wiki/JeeNode) with a single DS18B20 sensor powered by 3.3V (always on) and the whole thing is powered by a AA Power board (http://jeelabs.net/projects/hardware/wiki/AA_Power_board). The boost regulator chip is a LTC3525. The LDO 3.3V regulator on the JeeNode is left in place i.e. not bypassed. I haven't measured the actual current drain but the battery life speaks for itself.
Thanks! That's a nice chip. You may also be interested in a variant of that chip, which allows for a passthrough: http://cds.linear.com/docs/en/datasheet/3525d33fb.pdf I presume that way you could power-up everything (so you don't have to worry about backfeeding) to 3.3V prior to using the DS18B20 and then switch back to pass-through afterward. The passthrough is controlled by a single pin, so switching between 3.3V and passthrough would be easy to implement.