I recently bought the sense-hat, previously called astro-pi. Unfortunately the temperature shows 28 to 31 degrees Celsius from both temperature sensors on the board. They often show around 30 degrees right from the start when the raspberry pi boots, so the wrong reading doesn't seem to be from heat from the CPU or the main r-pi 2 board. The room temperature is around 21-23 degrees Celsius. My R-pi 2 is without casing so the sense-hat gets fresh air. I can get the temperature to vary, but the data from those readings is of no importance for the question. The question is why both sensors on the sense-hat constantly show the room temperature plus around 7 degrees Celsius. I would understand it if they showed +1 right from the start when the r-pi2 is cool, but not as high as +7.

(The 2 temperatures from the pressure and humidity sensors only differ by 0.8 degrees Celsius, and they do this constantly every time I start up the r-pi 2, but this is not a problem it's normal for components to require a little calibration.)

I decided to also test the humidity sensor. The reading from the humidity sensor is usually 17-18 %rH, but I got the readings to vary between -55 and +107 %rH. -55 was when I put it close to a window where the sun had heated up the environment for an hour, I only placed it there for a couple of minutes and got around -55 %rH. During these 2 minutes the temperature on the sensor rose from 32 degrees to 36 degrees. +107 %rH was when I was breathing on the sensor. I was expecting it to vary between 5 and 95 %rH at most, so -55 to +107 differs quite a lot from what I was expecting.

I wonder what causes these unexpected readings? Are these normal readings for a sense-hat?

The air pressure readings vary from 1004 to 1016 millibar, which is pretty normal for Stockholm, Sweden, EU where I'm located. They should be around 1012, so I think the pressure sensor shows relatively accurate readings.

  • 2
    Is that a steamy sauna? I thought RH was 0-100%. – joan Apr 14 '16 at 9:01

Firstly, I have no idea why the humidity sensor is not working. However, I do know why the temperature sensor is not working. The temperature sensor is not working as ,when attached to the Pi, the temperature sensor is directly over the CPU (Central Processing Unit) of the Pi. To get round this you can get the temperature from the pressure or humidity but as you say your humidity sensor is not working it is best to get the temperature from pressure. I didn't know if this would be accurate to start when I did used temperature from pressure on my Raspberry Pi but it surprisingly was. To get the temperature from pressure use the following code:

from sense_hat import SenseHat

sense = SenseHat()
sense.clear()

temp = sense.get_temperature_from_pressure()
print(temp)

This should get you a accurate temperature reading.

Hopes this helps, Louis

Note: I just read that you think it isn't the CPU. Despite this, the above code should still get you an accurate reading. Maybe it could be a faulty temperature sensor.

The high temperature sensor readings is a known issue related to being close to the PI's CPU. There is a good article on GitHub that explains this and provides a way to calibrate the temperature sensors using the CPU's temperature readings.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.