# Enviro pHAT - Temperature WAY off

**URL:** <https://forums.pimoroni.com/t/enviro-phat-temperature-way-off/10039>\
**Category:** Support\
**Created:** [March 3, 2019, 1:02pm UTC](https://forums.pimoroni.com/t/enviro-phat-temperature-way-off/10039 "2019-03-03T13:02:37Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alexander](https://avatars.discourse-cdn.com/v4/letter/a/bc8723/32.png) [@Alexander](https://forums.pimoroni.com/u/Alexander)\
**Post date:** [March 3, 2019, 1:02pm UTC](https://forums.pimoroni.com/t/enviro-phat-temperature-way-off/10039/1 "2019-03-03T13:02:38Z")

</div>

Hi, just installed my first Enviro pHAT. Basically it seems to be working fine, I can get reading, turn Leds on/off etc.

But I wanted to build WLAN thermometers with it. And the temperature reading is way off. At a room temperature of 24C it reports around 36C, generally around 8C above the correct value. It tried the pHat also on three different Raspis (two Zero W, one 3B+), same result.

What could have gone wrong? Is the pHAT defect?

---

<div class="post-metadata">

**Author:** ![alphanumeric](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/alphanumeric/32/2729_2.png) [@alphanumeric](https://forums.pimoroni.com/u/alphanumeric)\
**Post date:** [March 3, 2019, 1:25pm UTC](https://forums.pimoroni.com/t/enviro-phat-temperature-way-off/10039/2 "2019-03-03T13:25:26Z")

</div>

What can happen is the heat from the Pi’s SOC / CPU gets absorbed by the Enviro Phat circuit board. And that will throw off your readings. If thats what’s happening from a cold start it should read normal, then slowly go high as the Pi SOC heats up with use.  
If that is the case there are ways around that issue. Mounting the enviro pHat on a phat stack or Mini black hat hacker.

> **[Fully Assembled Kit pHAT Stack – Pimoroni](https://shop.pimoroni.com/products/phat-stack?variant=658973392906)**
>
> A preposterous pile of peripherals on your Pi! Mix and match 3 HATs or 5 pHATs into a platter of functionality. Use pHAT Stack for specific setups and projects, or just as a handy way to use several HATs or pHATs at once.

  

> **[Fully Assembled Mini Black HAT Hack3r – Pimoroni](https://shop.pimoroni.com/products/mini-black-hat-hack3r?variant=19448025991)**
>
> Need to detach or debug your HAT? Then the Mini Black HAT Hack3r is for you!

Other options are to put some distance between the Pi and pHat. A proto zero with a stacking header will do it. tape or solder the holes over if you want.

> **[ProtoZero – Pimoroni](https://shop.pimoroni.com/products/protozero)**
>
> The ProtoZero is a prototyping board for the Raspberry Pi Zero, that also fits the A+, B+ and Pi2.

A 90 degree header on the Pi of phat may work too.

---

<div class="post-metadata">

**Author:** ![Alexander](https://avatars.discourse-cdn.com/v4/letter/a/bc8723/32.png) [@Alexander](https://forums.pimoroni.com/u/Alexander)\
**Post date:** [March 3, 2019, 10:18pm UTC](https://forums.pimoroni.com/t/enviro-phat-temperature-way-off/10039/3 "2019-03-03T22:18:14Z")

</div>

It seems your diagnosis is correct. Less than a minute after power-up the temperature is already off by +2C, and then you can watch it climb like it’s placed on a hot oven.  
It seems the placement of the sensor on the board is very unfortunate. How can anyone get any sensible reading with that?  
Thank you so much for your work around suggestions. I will consider those or using another sensor/board solution with a detached temp sensor.

---

<div class="post-metadata">

**Author:** ![alphanumeric](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/alphanumeric/32/2729_2.png) [@alphanumeric](https://forums.pimoroni.com/u/alphanumeric)\
**Post date:** [March 3, 2019, 10:52pm UTC](https://forums.pimoroni.com/t/enviro-phat-temperature-way-off/10039/4 "2019-03-03T22:52:28Z")

</div>

Thats just how things go sometimes. Your trying to keep the cost down etc and things just don’t work out as planned. Moving the sensor off the board I suspect adds cost and complicates things in another way.  
I had the same issue with the Raspberry Pi Foundation Sense hat. I put a Proto hat in between my Pi A+ and Sense hat and it reads accurate. But thats with no case and it flipped 180 so its open on top. GPIO header is on the bottom with it standing up so you can read the Sense hat LED matrix.

 ![DSCF1437](https://us1.discourse-cdn.com/flex016/uploads/pimoroni/original/2X/8/82689d4fdd2830ce08d95ecde772ec9f05e90bce.jpeg)

---

<div class="post-metadata">

**Author:** ![gadgetoid](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/gadgetoid/32/13_2.png) [@gadgetoid](https://forums.pimoroni.com/u/gadgetoid)\
**Post date:** [March 4, 2019, 1:04pm UTC](https://forums.pimoroni.com/t/enviro-phat-temperature-way-off/10039/5 "2019-03-04T13:04:27Z")

</div>

Interestingly in many cases moving the sensor off the board doesn’t actually solve the problem- since the copper wires used to connect it are thermally conductive it’s still possible for the PCB to be heated from the Pi.

I think the 1-wire temperature sensors - particularly the ones with a wire and probe setup (look for DS18B20) - are a good solution to this problem and are supported by the Pi.

Other techniques involve using the Pi’s CPU die temperature to compensate the external temperature reading. See: [https://medium.com/@InitialState/tutorial-review-enviro-phat-for-raspberry-pi-4cd6d8c63441](https://medium.com/@InitialState/tutorial-review-enviro-phat-for-raspberry-pi-4cd6d8c63441)
