BME280 power saving

Hi guys.

Trying to code some power saving measures into my weather station.

At this stage I can’t use sleep due to the very simplistic html page I’ve got running so I’d like to “un-initialise” the BME280 in micropython.

Can this be done? If so, some code for same would be appreciated.

Bonus question: I assume the led on the module can’t be controled?

Cheers.

1 Like

Hi Mark

If the sensor is the PicoDev unit from Core remove the solder bridge or cut the fine track at JP2. Refer schematic.
Cheers Bob

2 Likes

Hi Mark,

Just to confirm, were you using a Pico?

While it certainly can be done, any microcontroller running dwarfs the amount of power that a sensor like the BME280 would consume.

Would it be possible to share a bit more about your project so we can help?
Liam

1 Like

Thanks Liam.

Basically I’m learning by prototyping a basic weather station using a Pico WH with a BME280 powered from a Li-Po 800 mAh battery. The Pico hosts a basic html page and presents the atmos info along with some calculated values, time etc.

I’ve got a multi-meter in series with the battery showing >60mA load when online. A refresh from the browser ups the load by ~10mA momentarily. Probably the Pico LED I have set to blink to indicate a refresh.

I get a run time of ~8 hours on a full charge which sort of correlates to the load I’m seeing.

I can’t sleep the Pico to save power as its got to be online waiting for a refresh. Yes this is a crap way to do this but I’m learning.

Cheers.

Hi @Mark285907

I would say the easiest way to get some more battery life would be to increase the size of the battery that you’re using, from what you’ve told us it doesn’t sound like there is all to much in terms of flexibility for the other components.

1 Like

Hi Mark

Be a little bit cautious here. What current range are you using. The usual Digital MM has quite a “voltage burden” on the mA ranges. This is the voltage drop of the meter itself caused by the internal shunt resistor. This is of little consequence when dealing with higher voltages but can be a significant part of even 5V and at the popular (with some people, not me) 3.3V it will become serious. This voltage drop effectively subtracts from the supply resulting in a voltage which could cause malfunction of the device under test and make readings meaningless.

To minimise this with a DMM the 10A range should be used. This will give you a resolution of 1mA on most better DMMs which should be adequate. Of course a non invasive method with a sensitive clamp meter would be better still.
Cheers Bob

1 Like

Spot on your are Bob.

I’ve got a Fluke 77 which is probably older than most people on this forum! In 10A DC mode it’ll resolve to 10’s of mA (hence my use of ~ and > in the mA readings above) and it’s this mode I’m using.

In the 300mA mode (different lead socket) it reads 235 mA but the Pico does not run. My code blips the Pico LED when connected to wi-fi but here there’s no LED. The BME280 power LED is lit, so lights on, no one home.

Hi Mark

So you found out. Good.

Not quite in my case (89). I can still remember when the best you had was a mirror behind the scale to eliminate (hopefully) Parallax error. A VTVM was the closest approach to a high resistance instrument available.

I think there is still a case for analog meters. I would hate to have to tune a sensitive RF resonant circuit with a DMM. Hopelessly slow. Even a 20kΩ/volt meter is a bit slow to move.
Cheers Bob
PS. Your Fluke 77 could almost be due for a calibration check maybe??

1 Like

Calibration? Hmmm…I would have got it in the 80s so maybe. I have changed the batteries at least once since purchase.

Built to last those Flukes. Like my calculator, a HP 10C. Only made in 1982,83. Changed the batteries about 4 times I think this model is something of a collectors item now.

As a matter of interest, the 12C which was primarily a financial calculator of the same era is still a current model, Available at The Good Guys. How is that for model longevity.
Cheers Bob

2 Likes