Rainbow HAT temperature issues

Hi there!

Am loving the Rainbow HAT that was gifted to me and I want to use it as a baby monitor to monitor temperature. However, the readings are quite off and I’ve seen that the Pi CPU is close to the sensor so it doesn’t give an accurate reading. I’ve looked online for formulas offsetting the temperature using:

corrected temp. = measured temp. - (CPU temp. - measured temp.) / 2

from the product page


Ta = (Tm -C * Tc) / (1 -C) 
Ta - actual temp
Tm - measured temp
Tc - CPU temp

from https://hackernoon.com/trying-out-the-android-things-weatherstation-codelab-d3f260b59c2f

but if there’s a spike load on CPU, it’s not accurate. Any suggestions? Am using the python library.

I’ve also come across Paul Blundell’s Android Things post, does the python library use the same compensation formula outlined there? https://github.com/blundell/androidthings-i2c-input/blob/72ab4826b1ce02789ec4a1ed50f7815312fd42b8/app/src/main/java/com/blundell/tut/Bmp280DataSheet.java#L38

I had a similar issue with my Sense Hat. What I did was put a Proto Hat with a stacking header between my Pi and sense hat. I also have it situated so the boards are vertical and the heat can get out easier. The Proto Hat also has a RTC mounted to it.

https://1drv.ms/f/s!AjOYwiwlwDtpgsVjmVWs1FIAUyshQQ << Build pictures

1 Like

That’s a great suggestion. Saw a similar thing with the mini Black HAT. I might do that. Just seems like a design flaw that the sensor is close to the CPU by default.

That will work too. I have a second sense hat mounted in a case as a portable weather clock. Even with vent holes in the case, and two Proto hats stacked on top of each other, the temps read high. I ended up mounting a BME680 to the exterior of the case. Thats just the way things go sometimes.
Compromises get made from time to time. To keep costs down, etc. Sometimes you just have to get creative and adapt your setup.

If you get the solder yourself min black hat, that opens up more options. You can for example swap out one or more of the normal headers for stacking headers. Then plug your Pi into the backside (bottom) and skip having to use a ribbon cable.
I used one in a rover project. I used a 90 male at the end and plugged a Pi zero in with a female header on it.


1 Like