-
-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sleep mode current #21
Comments
I've honestly never tested the sleep (or wake) current draw. |
@neilh10, thanks for doing these power tests, using both a Mayfly and the ModularSensors library. Making sure power draw is low during sleep is quite important, and given that it's been the goal of a substantial amount of recent work, including:
@SRGDamia1, @gcutrell, @fisherba, I suggest all of us do our testing with a simple current tester, such as the MakerHawk UM25C USB Tester (which I just got) or something similar. |
Thanks - just checking and putting it out there to see if anybody has any insights. |
@aufdenkampe - want to send me one? |
Almost all of the work I've done to minimize power draw has been in working to minimize the sensor-on time. The only "special" thing I have coded in to reduce the draw while actually sleeping is to force the I2C pins to go low in sleep to reduce parasitic draw. On the processor, I'm disabling the on-board ADC, the brown-out detector, the various internal clocks, and going into "SLEEP_MODE_PWR_DOWN", which is the lowest power use setting. |
I could write up a method for doing sleep power measurements. For a LiPo cable current measurement if its of interest - it would be about having a Digital Voltmeter with 0.1mV resolution - and then a modified battery extension cable with a 0.1ohm in series most of the time. For a current pulse of 1A this would drop 100mV - which I think would be OK, but needs to be verified. |
If I use the |
I'm trying another approach that seems to be working , using a current monitor Adafruit/904 which has INA219B, with the I2C on a separate Mayfly board. The Mayfly#1 running a modified With no Xbee, and Mayfly#2 running a simple program writing to the SD card every minute the results from Mayfly#1 are with polling about every 2seconds what you would expect - the multimeter reported 0.38mA - which the INA219B is limited to 0.1mA resolution with no rounding of measurements. (code https://github.com/neilh10/ModularSnsrsNh/tree/test_nh1/sensor_tests or
I have a spare adafruit.com/product/904 and cables so I could make up a similar setup tomorrow and share it... |
@neilh10, thanks for all these tests and ideas. I'll see what I can do to replicate your setup, and then we'll see if we can get @SRGDamia1 setup too. |
@aufdenkampe - I already have the feather M0, I'd just need the the featherwing and cables. |
@gcutrell, I think it would be really helpful to us to set up a high-frequency power recording system similar to the one that @neilh10 set up in his #21 (comment) above, which uses an Adafruit INA219 High Side DC Current Sensor Breakout and an extra Mayfly. What do you think? I know you've had success with the MakerHawk UM25C USB Tester, but I think this might be able to provide a more accurate power readout for our purposes of figuring out what portions of the code are using the most power, because this enables us to configure the Mayfly exactly as we would for a field deployment. |
SwitchDocLabs sells a grove ANI219 breakout: https://www.amazon.com/Grove-Headers-INA3221-Breakout-Board/dp/B00WFB9F76/ref=sr_1_1?ie=UTF8&qid=1541525085&sr=8-1&keywords=INA219+grove&dpID=414gF39dvnL&preST=_QL70_&dpSrc=srch |
Interesting find. It has three sensors - but turns out that the channels aren't as sensitive. |
I've written up the monitoring cable https://github.com/neilh10/ModularSensors/wiki/Test-equipment-cable-monitor-LiIon |
I got an INA219 to use for testing, but so far have done nothing more than open the box. |
Great - would it work to make up battery cable so you can insert it inline with the battery?. I believe that is the easiest way of measuring sleep current. |
Just checking on mA consumed during sleep -
for the current 'develop' branch using logging_to_EnviroDIY.ino, on sleep the current reduces to about 3.5mA after EnviroDIYLogger.systemSleep() is executed.
This is with a barebones Mayfly0.5b and only one sensor ProcessorStats_SampleNumber() in variableList[], no SD card, no Xbee or anything. Just the rtc coin battery added to the board.
I'm expecting to get to about 0.5mA as per @s-hicks2 https://www.envirodiy.org/topic/low-power-project/
With Sensors sampling and Green and Red led its about 10.5mA
If I comment out the real work of sensor update - and just leave
EnviroDIYLogger.checkInterval() -
EnviroDIYLogger.systemSleep()
then in one case it went to sleep and consumed 0.5mA - hurrah.
However on repeating the same exercise above, it didn't reduce the current - but stayed at 3.5mA
So it could be that I just got lucky once - and it doesn't matter whether its actually running the sensors update or not.
I'm measuring current as taken for the LiIon battery with a good digital multimeter with a mA range (and also uA range).
I've modified LiIon battery extension cable so that it works for a running mayfly.
I power up from cold by plugging in the LiIon cable
I can see EnviroDIYLogger.systemSleep() has a lot of good code to do a powerdown, but I'm not getting there.
Just wondering if I'm missing a switch, or any suggestions on how to measure sleep current. Thanks
The text was updated successfully, but these errors were encountered: