# Soil Sensor 2.2 TMP112 precision

**URL:** <https://bbs.aprbrother.com/t/soil-sensor-2-2-tmp112-precision/1271>\
**Category:** BLE Gateway\
**Created:** [June 23, 2018, 9:33am UTC](https://bbs.aprbrother.com/t/soil-sensor-2-2-tmp112-precision/1271 "2018-06-23T09:33:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![cputoaster](https://bbs.aprbrother.com/user_avatar/bbs.aprbrother.com/cputoaster/32/313_2.png) [@cputoaster](https://bbs.aprbrother.com/u/cputoaster)\
**Post date:** [June 23, 2018, 9:33am UTC](https://bbs.aprbrother.com/t/soil-sensor-2-2-tmp112-precision/1271/1 "2018-06-23T09:33:51Z")

</div>

I just started to code Tasmota support, starting with the temperature sensor. I don’t understand why its so much off though. From what I can tell, its around 4.5 °C off (compared to a calibrated high-precision thermometer). In the docs it says it should be ±0.5°C when not calibrated. Any ideas? I would rather not need to add some calibration parameters…

> <https://github.com/arendst/Tasmota/pull/3044>

Cheers,  
Andres

---

<div class="post-metadata">

**Author:** ![aprilpea](https://bbs.aprbrother.com/user_avatar/bbs.aprbrother.com/aprilpea/32/9_2.png) [@aprilpea](https://bbs.aprbrother.com/u/aprilpea)\
**Post date:** [June 25, 2018, 3:12am UTC](https://bbs.aprbrother.com/t/soil-sensor-2-2-tmp112-precision/1271/2 "2018-06-25T03:12:37Z")

</div>

Have you also tested with our [source code](https://github.com/AprilBrother/esp-soil-moisture-sensor/blob/master/src/esp-soil-moisture-sensor-v2.1/esp-soil-moisture-sensor-v2.1.ino)? Is the temperature value ok with it?

---

<div class="post-metadata">

**Author:** ![cputoaster](https://bbs.aprbrother.com/user_avatar/bbs.aprbrother.com/cputoaster/32/313_2.png) [@cputoaster](https://bbs.aprbrother.com/u/cputoaster)\
**Post date:** [June 25, 2018, 8:23am UTC](https://bbs.aprbrother.com/t/soil-sensor-2-2-tmp112-precision/1271/3 "2018-06-25T08:23:35Z")

</div>

That is basically where I copied the algorithm from… But no, they (I bought two) show:

Sensor 1:

```
Requesting Temperature...
871.00
872.00
871.00
Soil Humidity:871.33
Temperature:27.62
WiFi Client connected

```

Sensor 2:

```
Requesting Temperature...
873.00
873.00
874.00
Soil Humidity:873.33
Temperature:24.94
WiFi Client connected

```

Whereas the real temperature is 23.1°C

---

<div class="post-metadata">

**Author:** ![aprilpea](https://bbs.aprbrother.com/user_avatar/bbs.aprbrother.com/aprilpea/32/9_2.png) [@aprilpea](https://bbs.aprbrother.com/u/aprilpea)\
**Post date:** [June 26, 2018, 1:52am UTC](https://bbs.aprbrother.com/t/soil-sensor-2-2-tmp112-precision/1271/4 "2018-06-26T01:52:48Z")

</div>

Please also test [the sketch TMP112.ino](https://github.com/ControlEverythingCommunity/TMP112/blob/master/Arduino/TMP112.ino). I just tested the sketch and it works fine

---

<div class="post-metadata">

**Author:** ![cputoaster](https://bbs.aprbrother.com/user_avatar/bbs.aprbrother.com/cputoaster/32/313_2.png) [@cputoaster](https://bbs.aprbrother.com/u/cputoaster)\
**Post date:** [June 26, 2018, 8:35am UTC](https://bbs.aprbrother.com/t/soil-sensor-2-2-tmp112-precision/1271/5 "2018-06-26T08:35:01Z")

</div>

hmm, it seems like the temperature is just going up from the correct value until to around +4.5°C during operation. I think it could be the heat radiation from the flasher. Sorry for the noise.

Cheers,  
Andres

Calibrated: 24.2

Sensor 1:  
Temperature in Farhenheit: 79.93 F  
Temperature in Celsius: 26.62 C

Sensor 2:  
Temperature in Celsius: 26.75 C  
Temperature in Farhenheit: 80.15 F
