Sense Hat temperature reading -200 degrees?
Hi,
I just purchased a sense hat and copied the example python code for reading temperature. The temperature is reading about -206 degrees though!
I feel like I am missing something very basic but have been unable to find any information that would lead me to believe I skipped a step.
Getting the temp via the humidity sensor gets the same reading, however the pressure sensor gives me 27ish, which seems to correlate with other forum posts I have read about the temp being too high due to heat from the pi itself.
Thanks!
I just purchased a sense hat and copied the example python code for reading temperature. The temperature is reading about -206 degrees though!
I feel like I am missing something very basic but have been unable to find any information that would lead me to believe I skipped a step.
Getting the temp via the humidity sensor gets the same reading, however the pressure sensor gives me 27ish, which seems to correlate with other forum posts I have read about the temp being too high due to heat from the pi itself.
Thanks!
Re: Sense Hat temperature reading -200 degrees?
I am having the EXACT same issue with mine. It seems strange as it will change, and report different temps but it's always that big -160 to -200 range.
Re: Sense Hat temperature reading -200 degrees?
I have also have the same issue. I bought another because i thought it was broken. both of them reflect a high negative #.
Anyone have any thoughts on this?
Anyone have any thoughts on this?
Re: Sense Hat temperature reading -200 degrees?
I am having the same issue.. do we need to do some sort of calculation on the reading from the humidity sensor? The reading from the pressure sensor seems fine, but I don't want a faulty device, so hoping this is just some sort of user error.
Re: Sense Hat temperature reading -200 degrees?
I am having the same problem with pi. It reads between -111 to -145. Humidity never breaks 9%. The pressure sensor seems fine and everything else is good too. I'm wondering if there was a bad patch humidity sensors as I am seeing all the individuals of this forum bought their Sense Hats some time in early to mid May of 2016. Is anyone aware of a way that you can calibrate this sensor?
- Davespice
- Forum Moderator
- Posts: 1665
- Joined: Fri Oct 14, 2011 8:06 pm
- Location: The Netherlands
- Contact: Twitter
Re: Sense Hat temperature reading -200 degrees?
Hmm, I think we need to investigate this. Would anyone volunteer to send us one of their Sense HATs for analysis?
Re: Sense Hat temperature reading -200 degrees?
Exactly the same here, I get around -165 degrees.
I'm curious to hear about any bugfix/update on this topic.
I'm curious to hear about any bugfix/update on this topic.
-
- Raspberry Pi Engineer & Forum Moderator
- Posts: 6275
- Joined: Fri Jul 29, 2011 5:36 pm
- Location: The unfashionable end of the western spiral arm of the Galaxy
Re: Sense Hat temperature reading -200 degrees?
Could the people seeing this problem please install i2c-tools and provide the output of the following:
Code: Select all
python -c 'from sense_hat import SenseHat
sense = SenseHat()
temp = sense.get_temperature()
print("Humidity sensor temperature: %s C" % temp)'
Code: Select all
i2cdump -r 0x00-0x3f -y 1 0x5f b
Re: Sense Hat temperature reading -200 degrees?
Humidity sensor temperature: -132.6593017578125 C
-
- Raspberry Pi Engineer & Forum Moderator
- Posts: 6275
- Joined: Fri Jul 29, 2011 5:36 pm
- Location: The unfashionable end of the western spiral arm of the Galaxy
Re: Sense Hat temperature reading -200 degrees?
And this?
Code: Select all
i2cdump -r 0x00-0x3f -y 1 0x5f b
Re: Sense Hat temperature reading -200 degrees?
Sorry prematurely sent the last message here's an updated reading.
pi@raspberrypi:~ $ python -c 'from sense_hat import SenseHat
> sense = SenseHat()
> temp = sense.get_temperature()
> print("Humidity sensor temperature: %s C" % temp)'
Humidity sensor temperature: -128.81590271 C
pi@raspberrypi:~ $ i2cdump -r 0x00-0x3f -y 1 0x5f b
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 bc ...............?
10: 1b 00 66 32 9a be cc a1 9e b2 03 00 18 00 80 9e ?.f2???????.?.??
20: 87 00 00 00 00 00 00 03 60 1a 42 e1 fe ff 2a e1 ?......?`?B??.*?
30: 36 85 a8 21 00 c4 f4 ff 66 03 44 d2 05 00 1c 03 6??!.??.f?D??.??
pi@raspberrypi:~ $ python -c 'from sense_hat import SenseHat
> sense = SenseHat()
> temp = sense.get_temperature()
> print("Humidity sensor temperature: %s C" % temp)'
Humidity sensor temperature: -128.81590271 C
pi@raspberrypi:~ $ i2cdump -r 0x00-0x3f -y 1 0x5f b
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 bc ...............?
10: 1b 00 66 32 9a be cc a1 9e b2 03 00 18 00 80 9e ?.f2???????.?.??
20: 87 00 00 00 00 00 00 03 60 1a 42 e1 fe ff 2a e1 ?......?`?B??.*?
30: 36 85 a8 21 00 c4 f4 ff 66 03 44 d2 05 00 1c 03 6??!.??.f?D??.??
-
- Raspberry Pi Engineer & Forum Moderator
- Posts: 6275
- Joined: Fri Jul 29, 2011 5:36 pm
- Location: The unfashionable end of the western spiral arm of the Galaxy
Re: Sense Hat temperature reading -200 degrees?
Thanks, I'll see if I can spot a bug in the software.
-
- Raspberry Pi Engineer & Forum Moderator
- Posts: 6275
- Joined: Fri Jul 29, 2011 5:36 pm
- Location: The unfashionable end of the western spiral arm of the Galaxy
Re: Sense Hat temperature reading -200 degrees?
Crunching the numbers manually, I get the same strange answer:
The procedure is documented in section 9 here (if anyone wants to have a go themselves): http://www.st.com/content/ccc/resource/ ... 116291.pdf
For comparison, my data is below, which gives the right temperature.
The rest of the registers look the same, so there doesn't seem to be a problem there. Will have a think about it.
Code: Select all
t_out: -7870
t0x8: 168
t1x8: 289
t0: 21.000000
t1: 36.125000
t0_out: 5
t1_out: 796
y = 0.019121x + 20.904392
= -129.580765
For comparison, my data is below, which gives the right temperature.
Code: Select all
0 1 2 3 4 5 6 7 8 9 A B C D E F
00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 BC
10: 1B 00 87 33 99 BE B0 A1 9E B2 F9 00 E8 01 80 82
20: 87 00 00 00 00 00 00 03 E1 00 29 02 AC 01 41 02
30: 3B 88 AA 20 00 C4 20 00 89 02 B4 DC FE FF 34 03
t_out: 553
t0x8: 170
t1x8: 288
t0: 21.250000
t1: 36.000000
t0_out: -2
t1_out: 820
y = 0.017944x + 21.285889
= 31.208942
Re: Sense Hat temperature reading -200 degrees?
below is my output:
I'm willing to send mine out if it means this getting fixed.
Thanks!
Code: Select all
pi@rpi3:~ $ python -c 'from sense_hat import SenseHat
> sense = SenseHat()
> temp = sense.get_temperature()
> print("Humidity sensor temperature: %s C" % temp)'
Humidity sensor temperature: -397.54498291 C
pi@rpi3:~ $ i2cdump -r 0x00-0x3f -y 1 0x5f b
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 bc ...............?
10: 1b 00 95 32 9b be 08 a2 9e b2 fc 00 c8 01 80 9e ?.?2???????.????
20: 87 00 00 00 00 00 00 03 c0 4d 95 a1 fe ff cd a1 ?......??M???.??
30: 37 84 a8 21 00 c4 00 00 50 03 11 d0 fe ff 67 03 7??!.?..P????.g?
pi@rpi3:~ $
Thanks!
Re: Sense Hat temperature reading -200 degrees?
i'll send mine out. just pm me the address.Davespice wrote:Hmm, I think we need to investigate this. Would anyone volunteer to send us one of their Sense HATs for analysis?
Thanks!
Re: Sense Hat temperature reading -200 degrees?
Here is the output for my Raspberry Pi B+:
Code: Select all
pi@raspberrypi:~ $ python -c 'from sense_hat import SenseHat
> sense = SenseHat()
> temp = sense.get_temperature()
> print("Humidity sensor temperature: %s C" % temp)'
Humidity sensor temperature: -124.549255371 C
Code: Select all
pi@raspberrypi:~ $ i2cdump -r 0x00-0x3f -y 1 0x5f b
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 bc ...............?
10: 1b 00 96 32 9b be 1a a2 9e b2 04 00 d8 01 80 9e ?.?2???????.????
20: 87 00 00 00 00 00 00 03 02 1c fa e1 fe ff 22 e2 ?......??????."?
30: 37 83 a7 22 00 c4 06 00 b8 03 ba cf fb ff 22 03 7??".??.?????."?
Re: Sense Hat temperature reading -200 degrees?
Hi,
Sorry for the delayed response. Thank you for looking into this (and kind of glad it's not just me).
My results are:
and:
Sorry for the delayed response. Thank you for looking into this (and kind of glad it's not just me).
My results are:
Code: Select all
python -c 'from sense_hat import SenseHat
> sense = SenseHat()
> temp = sense.get_temperature()
> print("Humidity sensor temperature: %s C" % temp)'
Humidity sensor temperature: -207.426895142 C
Code: Select all
i2cdump -r 0x00-0x3f -y 1 0x5f b
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 bc ...............?
10: 1b 00 87 33 99 be d0 a1 9e b2 01 00 28 00 80 82 ?.?3???????.(.??
20: 87 00 00 00 00 00 00 03 aa 1f e5 cd fe ff bd cd ?......??????.??
30: 3b 87 a9 20 00 c4 10 00 81 02 41 dd 02 00 46 03 ;?? .??.??A??.F?
Re: Sense Hat temperature reading -200 degrees?
I have the same issue. Why is it happen? Also, Anyone knows how to change the event publish interval?
{ "d": { "temperature": -171.91, "humidity": -0.45, "pressure": 993.03 } }
{ "d": { "temperature": -171.91, "humidity": -0.45, "pressure": 993.03 } }
-
- Raspberry Pi Engineer & Forum Moderator
- Posts: 6275
- Joined: Fri Jul 29, 2011 5:36 pm
- Location: The unfashionable end of the western spiral arm of the Galaxy
Re: Sense Hat temperature reading -200 degrees?
Could I also get the output of these commands?
Running them will prevent I2C from working until you reboot, so don't forget to do that.
Code: Select all
sudo dtoverlay i2c-gpio i2c_gpio_sda=2 i2c_gpio_scl=3
i2cdump -r 0x00-0x3f -y 3 0x5f b
Still looking into it.fmlin429 wrote:I have the same issue. Why is it happen?
Re: Sense Hat temperature reading -200 degrees?
So here are the steps I took (since dtoverlay was not installed):
Am I missing something here? Is this a result of using rpi-update?
Code: Select all
pi@raspberrypi:~ $ dpkg -S */dtoverlay
libraspberrypi-bin: /opt/vc/bin/dtoverlay
pi@raspberrypi:~ $ sudo apt-get install libraspberrypi-bin
pi@raspberrypi:~ $ sudo dtoverlay i2c-gpio i2c_gpio_sda=2 i2c_gpio_scl=3
mount: mount point /config/device-tree does not exist
* Failed to mount configfs - 2
pi@raspberrypi:~ $ i2cdump -r 0x00-0x3f -y 3 0x5f b^C
pi@raspberrypi:~ $ mkdir /config/device-tree
mkdir: cannot create directory ‘/config/device-tree’: Permission denied
pi@raspberrypi:~ $ sudo mkdir /config/device-tree
pi@raspberrypi:~ $ sudo dtoverlay i2c-gpio i2c_gpio_sda=2 i2c_gpio_scl=3
* configfs overlays folder not found - incompatible kernel
pi@raspberrypi:~ $
pi@raspberrypi:~ $ uname -a
Linux raspberrypi 4.1.19+ #858 Tue Mar 15 15:52:03 GMT 2016 armv6l GNU/Linux
-
- Raspberry Pi Engineer & Forum Moderator
- Posts: 6275
- Joined: Fri Jul 29, 2011 5:36 pm
- Location: The unfashionable end of the western spiral arm of the Galaxy
Re: Sense Hat temperature reading -200 degrees?
Needs to be a fully up to date image
Code: Select all
sudo apt-get update
sudo apt-get dist-upgrade
sudo systemctl reboot
Re: Sense Hat temperature reading -200 degrees?
Thanks! Here is the output:
Code: Select all
pi@raspberrypi:~ $ sudo dtoverlay i2c-gpio i2c_gpio_sda=2 i2c_gpio_scl=3
bash: lxpanelctl: command not found
bash: lxpanelctl: command not found
pi@raspberrypi:~ $ i2cdump -r 0x00-0x3f -y 3 0x5f b
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 bc ...............?
10: 1b 00 96 32 9b be 1a a2 9e b2 04 00 d8 01 80 9e ?.?2???????.????
20: 87 00 00 00 00 00 00 03 07 23 6d da fe ff 95 da ?......??#m??.??
30: 37 83 a7 22 00 c4 06 00 b8 03 ba cf fb ff 22 03 7??".??.?????."?
pi@raspberrypi:~ $
-
- Raspberry Pi Engineer & Forum Moderator
- Posts: 6275
- Joined: Fri Jul 29, 2011 5:36 pm
- Location: The unfashionable end of the western spiral arm of the Galaxy
Re: Sense Hat temperature reading -200 degrees?
Thank you.
Unfortunately that still gives the same wrong value. The idea was to eliminate possible problems in the specific i2c driver and hardware, but that's not the problem. Since every Sense HAT I've used before has given sensible values, I believe this is a hardware problem with the HTS221 chip.
Unfortunately that still gives the same wrong value. The idea was to eliminate possible problems in the specific i2c driver and hardware, but that's not the problem. Since every Sense HAT I've used before has given sensible values, I believe this is a hardware problem with the HTS221 chip.
Re: Sense Hat temperature reading -200 degrees?
In that case, should I request replacement from the vendor?
Thank you for investigating the issue
.
Thank you for investigating the issue

Re: Sense Hat temperature reading -200 degrees?
Here's my output...I believe as it's the same as beforeShiftPlusOne wrote:Could I also get the output of these commands?Running them will prevent I2C from working until you reboot, so don't forget to do that.Code: Select all
sudo dtoverlay i2c-gpio i2c_gpio_sda=2 i2c_gpio_scl=3 i2cdump -r 0x00-0x3f -y 3 0x5f b
pi@rpi3:~ $ i2cdump -r 0x00-0x3f -y 3 0x5f b
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 bc ...............?
10: 1b 00 95 32 9b be 08 a2 9e b2 fc 00 c8 01 80 9e ?.?2???????.????
20: 87 00 00 00 00 00 00 03 fa 4d 4f a1 fe ff 87 a1 ?......??MO??.??
30: 37 84 a8 21 00 c4 00 00 50 03 11 d0 fe ff 67 03 7??!.?..P????.g?