dclement
Posts: 2
Joined: Sat May 14, 2016 3:38 am

Sense Hat temperature reading -200 degrees?

Sat May 14, 2016 3:51 am

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!

jgates1
Posts: 1
Joined: Sat May 14, 2016 8:07 am

Re: Sense Hat temperature reading -200 degrees?

Sat May 14, 2016 8:08 am

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.

cpascu01
Posts: 6
Joined: Thu May 19, 2016 1:32 am

Re: Sense Hat temperature reading -200 degrees?

Thu May 19, 2016 1:34 am

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?

_lateo_
Posts: 7
Joined: Thu May 19, 2016 4:38 pm

Re: Sense Hat temperature reading -200 degrees?

Thu May 19, 2016 4:39 pm

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.

dschmidle
Posts: 4
Joined: Thu May 19, 2016 7:08 pm

Re: Sense Hat temperature reading -200 degrees?

Thu May 19, 2016 7:12 pm

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?

User avatar
Davespice
Forum Moderator
Forum Moderator
Posts: 1662
Joined: Fri Oct 14, 2011 8:06 pm
Location: The Netherlands
Contact: Twitter

Re: Sense Hat temperature reading -200 degrees?

Fri May 20, 2016 10:35 am

Hmm, I think we need to investigate this. Would anyone volunteer to send us one of their Sense HATs for analysis?

mvdb
Posts: 1
Joined: Fri May 20, 2016 1:24 pm

Re: Sense Hat temperature reading -200 degrees?

Fri May 20, 2016 1:29 pm

Exactly the same here, I get around -165 degrees.
I'm curious to hear about any bugfix/update on this topic.

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5702
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?

Fri May 20, 2016 4:17 pm

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

dschmidle
Posts: 4
Joined: Thu May 19, 2016 7:08 pm

Re: Sense Hat temperature reading -200 degrees?

Fri May 20, 2016 4:34 pm

Humidity sensor temperature: -132.6593017578125 C

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5702
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?

Fri May 20, 2016 4:41 pm

And this?

Code: Select all

i2cdump -r 0x00-0x3f -y 1 0x5f b

dschmidle
Posts: 4
Joined: Thu May 19, 2016 7:08 pm

Re: Sense Hat temperature reading -200 degrees?

Fri May 20, 2016 4:55 pm

Sorry prematurely sent the last message here's an updated reading.

[email protected]:~ $ 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
[email protected]:~ $ 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??.??

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5702
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?

Fri May 20, 2016 5:11 pm

Thanks, I'll see if I can spot a bug in the software.

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5702
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?

Fri May 20, 2016 8:03 pm

Crunching the numbers manually, I get the same strange answer:

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
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.

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
The rest of the registers look the same, so there doesn't seem to be a problem there. Will have a think about it.

cpascu01
Posts: 6
Joined: Thu May 19, 2016 1:32 am

Re: Sense Hat temperature reading -200 degrees?

Sat May 21, 2016 5:59 am

below is my output:

Code: Select all

[email protected]:~ $ 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
[email protected]:~ $ 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?
[email protected]:~ $
I'm willing to send mine out if it means this getting fixed.

Thanks!

cpascu01
Posts: 6
Joined: Thu May 19, 2016 1:32 am

Re: Sense Hat temperature reading -200 degrees?

Sat May 21, 2016 6:03 am

Davespice wrote:Hmm, I think we need to investigate this. Would anyone volunteer to send us one of their Sense HATs for analysis?
i'll send mine out. just pm me the address.

Thanks!

_lateo_
Posts: 7
Joined: Thu May 19, 2016 4:38 pm

Re: Sense Hat temperature reading -200 degrees?

Sat May 21, 2016 8:03 pm

Here is the output for my Raspberry Pi B+:

Code: Select all

[email protected]:~ $ 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

[email protected]:~ $ 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??".??.?????."?

dclement
Posts: 2
Joined: Sat May 14, 2016 3:38 am

Re: Sense Hat temperature reading -200 degrees?

Sun May 22, 2016 1:52 am

Hi,

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
and:

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?

fmlin429
Posts: 1
Joined: Sun May 22, 2016 2:12 pm

Re: Sense Hat temperature reading -200 degrees?

Sun May 22, 2016 2:17 pm

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 } }

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5702
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?

Mon May 23, 2016 5:47 pm

Could I also get the output of these commands?

Code: Select all

sudo dtoverlay i2c-gpio i2c_gpio_sda=2 i2c_gpio_scl=3
i2cdump -r 0x00-0x3f -y 3 0x5f b
Running them will prevent I2C from working until you reboot, so don't forget to do that.
fmlin429 wrote:I have the same issue. Why is it happen?
Still looking into it.

_lateo_
Posts: 7
Joined: Thu May 19, 2016 4:38 pm

Re: Sense Hat temperature reading -200 degrees?

Mon May 23, 2016 7:54 pm

So here are the steps I took (since dtoverlay was not installed):

Code: Select all

[email protected]:~ $ dpkg -S */dtoverlay
libraspberrypi-bin: /opt/vc/bin/dtoverlay
[email protected]:~ $ sudo apt-get install libraspberrypi-bin
[email protected]:~ $ 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
[email protected]:~ $ i2cdump -r 0x00-0x3f -y 3 0x5f b^C
[email protected]:~ $ mkdir /config/device-tree
mkdir: cannot create directory ‘/config/device-tree’: Permission denied
[email protected]:~ $ sudo mkdir /config/device-tree
[email protected]:~ $ sudo dtoverlay i2c-gpio i2c_gpio_sda=2 i2c_gpio_scl=3
* configfs overlays folder not found - incompatible kernel
[email protected]:~ $
[email protected]:~ $ uname -a
Linux raspberrypi 4.1.19+ #858 Tue Mar 15 15:52:03 GMT 2016 armv6l GNU/Linux
Am I missing something here? Is this a result of using rpi-update?

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5702
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?

Mon May 23, 2016 8:04 pm

Needs to be a fully up to date image

Code: Select all

sudo apt-get update
sudo apt-get dist-upgrade
sudo systemctl reboot

_lateo_
Posts: 7
Joined: Thu May 19, 2016 4:38 pm

Re: Sense Hat temperature reading -200 degrees?

Mon May 23, 2016 8:25 pm

Thanks! Here is the output:

Code: Select all

[email protected]:~ $ sudo dtoverlay i2c-gpio i2c_gpio_sda=2 i2c_gpio_scl=3
bash: lxpanelctl: command not found
bash: lxpanelctl: command not found
[email protected]:~ $ 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??".??.?????."?
[email protected]:~ $

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5702
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?

Mon May 23, 2016 8:49 pm

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.

_lateo_
Posts: 7
Joined: Thu May 19, 2016 4:38 pm

Re: Sense Hat temperature reading -200 degrees?

Mon May 23, 2016 8:57 pm

In that case, should I request replacement from the vendor?

Thank you for investigating the issue :).

cpascu01
Posts: 6
Joined: Thu May 19, 2016 1:32 am

Re: Sense Hat temperature reading -200 degrees?

Tue May 24, 2016 11:58 am

ShiftPlusOne wrote:Could I also get the output of these commands?

Code: Select all

sudo dtoverlay i2c-gpio i2c_gpio_sda=2 i2c_gpio_scl=3
i2cdump -r 0x00-0x3f -y 3 0x5f b
Running them will prevent I2C from working until you reboot, so don't forget to do that.
Here's my output...I believe as it's the same as before
[email protected]:~ $ 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?

Return to “Astro Pi”