Barometer module doesn't work with battery/usb

Hi,
when I power my FEZ Spider with the power adaptor from the socket , my barometer module works fine and displays me correct values (temperature & pressure). However when I power it with a 9V battery or USB I get crazy values for pressure (-300 to 1000 hPa) and temperature (-10 to 50 °C). They are not constant, they change after each measurement interval. What’s the problem here?

Not enough power will be my guess. Do you use same power module in both cases?

Yes, it’s the same power module.

Maybe the sensor needs an accurate 5V and using USB will probably not give you that. You can measure the 5V line and compare maybe.

It looks like on its own this module should work fine from any source. But I guess you have some other power hungry modules attached (display at a minimum). This can be a reason too.

@ Gus
I checked the description of the sensor and its supply voltage is in 2.2v-3.6v range.
http://www.hoperf.com/sensor/barometer_sensor/hp03m.htm

Then this is even more strange now :slight_smile: I have no logical explanation.

Hmm I think my display was very power hungry :wink: I changed the code now:
First initialize the barometer, then wait for a short time, then turn on the display and everything works fine :slight_smile:

Thanks