28 October 2014
Tuesday, October 28, 2014 By Mike McRoberts
After reviewing the code it would appear I was powering down the micro-controller but not the radio module. So after amending the code to ensure that the radio module was also placed into sleep mode (using the Lowpowerlab libraries, not the Jeelib libraries) I ran it for testing purposes again. Overnight the voltage has dropped 0.13 volts. Something is obviously still not right.
After some discussion on Twitter it would appear I should also be powering up and down the sensor. So instead of having it powered from the 3.3v power rail it should be powered by an output pin so the power can be turned on and off in-between reads and transmits. So, I will be amending my code to allow for this and then running further tests to see how this impacts the power loss.
I am aware that 2 seconds is a lot and as such the battery is not going to last years like that. However, I would expect even with 2 seconds per reading that the battery should still last a few weeks at least. Once I am happy that I am achieving this then the node will be set to transmit only once every minute to conserve power.