I'm getting confused wrt power consumption of my custom board + moteino. The board has a BME280 and 2 rj11 for getting data from wind dir, rain etc.. these are not connected while trying to measure the power consumption.
in my main loop I pretty much do the following:
check radio.receiveDone if data check what kind of cmd we got (clients can request 1 data point or continuous data through a start/stop cmd)
at the end just sleep for 1s w LowPower.powerDown(SLEEP_1S, ADC_OFF, BOD_OFF);
I'll make a long story short but the board was using 22mAmp and after putting flash to sleep and some cleanup I'm now at 17mAmp. Decided to look at MotionMote and after changing the IC2 address to 76 got it to work nicely and I get around 1mAmp! Darn I thought, seems too low :-) Maybe the BME280 library I use is the issue, long story short it's not.
Added a call in the loop to radio.receiveDone, power down for 1 sec (instead of the 8s in the code) and now I see the consumption going from 1ish mAmp and then every sec or so jump to 4 then , then 14 up to 32mAmp and then goes back down. (note that the BME280 is queried every sec or so, maybe the BME280 is stabilizing))
Removing all code from MotionMote and keeping just the sleep code and the radio.receiveDone shows power consumption of 17mAmp - is radio.receiveDone expensive? is there a better to do this?
Looking at RFM69::receiveDone I'm not certain what is taking so long if there is no payload - maybe the call to re-enable the interrupts? maybe I should set the radio in receive mode only once and then only check if we have payload?
Anyhow, please let me know if anyone has a better way to do this or I"m completely off the mark in my assumption.
thanks!
X
update1: the hoperf spec does says Low RX current of 10.3 mA Low current: Rx = 16 mA for RFM69 so I suppose 17mA w my crappy measurement may be correct...