Thanks Gohan,
there are a few reasons for me to use the BME outside. The most important: power management (and that explains my conundrum now...).
The unit contains a light sensor. That basically controls my lighting in the living room. So that needs to measure quite often to be able to control it with any accuracy. I've chosen every minute as a basis. That was also given when I found a sketch with a weather prediction function based on barometric pressure. That sketch needs to read the pressure every minute. That means that the sensor wakes up every minute. Also the radio. That's a huge load. Not really ideal for battery power. But that meant I was able to add the light sensor very easily.
So now I put them in an outdoor sensor with a solar panel to keep the battery topped up. That still means I have to watch the consumption in sleep. Here in NL we have quit a few overcast days, so the panel will not be able to keep up with the demand on those days.
The solution in place now is to wake up the sensor 1 second before measurement. Power up the sensors, put the controller and radio back to sleep for one second. Then do the measurement stuff, power down the sensor and I2C bus and go into deep sleep. Average current consumption measured over 4 hrs is now 140uA. Sleep current for the whole system is 36uA. That is including the charger board and Moteino voltage regulator.
The unit is now up for 3 weeks and the panel keeps up very good. Most of those days were overcast. So when the cold hits next week with clear skies it should be full all the time.
Battery level is sent every 6 hours. And next to that I have implemented a voltage measurement that signals when the battery is being charged. Energy is coming in, so I am allowed an extra data transfer... 😝
Now see if it dies on me again end of november 2019...