# How to remove sensor drift?

**URL:** <https://discourse.processing.org/t/how-to-remove-sensor-drift/14733>\
**Category:** Electronics (Arduino, etc.)\
**Created:** [October 16, 2019, 4:47am UTC](https://discourse.processing.org/t/how-to-remove-sensor-drift/14733 "2019-10-16T04:47:15Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![KGS](https://avatars.discourse-cdn.com/v4/letter/k/90ced4/32.png) [@KGS](https://discourse.processing.org/u/KGS)\
**Post date:** [October 16, 2019, 4:47am UTC](https://discourse.processing.org/t/how-to-remove-sensor-drift/14733/1 "2019-10-16T04:47:16Z")

</div>

I have taken continuous readings of body temperature from the temperature sensor. I have observed that there is a drift of the temperature value during baseline reading. What are the methods that I could eliminate sensor drift??

---

<div class="post-metadata">

**Author:** ![zly1994411](https://avatars.discourse-cdn.com/v4/letter/z/c68b51/32.png) [@zly1994411](https://discourse.processing.org/u/zly1994411)\
**Post date:** [October 17, 2019, 8:03pm UTC](https://discourse.processing.org/t/how-to-remove-sensor-drift/14733/2 "2019-10-17T20:03:15Z")

</div>

I don’t know if I understand your question well, maybe your can try to use Linear Interpolation to smooth the data you read.

[![](https://img.youtube.com/vi/8uLVnM36XUc/maxresdefault.jpg "Processing / p5.js Tutorial: What is lerp? (Linear Interpolation)") ](https://www.youtube.com/watch?v=8uLVnM36XUc)

---

<div class="post-metadata">

**Author:** ![KGS](https://avatars.discourse-cdn.com/v4/letter/k/90ced4/32.png) [@KGS](https://discourse.processing.org/u/KGS)\
**Post date:** [November 11, 2019, 2:41am UTC](https://discourse.processing.org/t/how-to-remove-sensor-drift/14733/3 "2019-11-11T02:41:39Z")

</div>

Thank you for the information !!!

---

<div class="post-metadata">

**Author:** ![Lexyth](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/lexyth/32/7403_2.png) [@Lexyth](https://discourse.processing.org/u/Lexyth)\
**Post date:** [November 11, 2019, 10:21am UTC](https://discourse.processing.org/t/how-to-remove-sensor-drift/14733/4 "2019-11-11T10:21:20Z")

</div>

I had a similar problem with strain gauges, but in my case the cause was increased electric conductivity due to the sensor heating up over time due to body heat. In my case, i had to use a baseline sensor, that isn‘t fixed, so only got a change due to temperature. Then just subtract that value and you got the right value.

---

<div class="post-metadata">

**Author:** ![KGS](https://avatars.discourse-cdn.com/v4/letter/k/90ced4/32.png) [@KGS](https://discourse.processing.org/u/KGS)\
**Post date:** [November 11, 2019, 11:23am UTC](https://discourse.processing.org/t/how-to-remove-sensor-drift/14733/5 "2019-11-11T11:23:08Z")

</div>

That is a good idea. I also realized that to use a separate temperature sensor to measure ambient temperature. Therefore, subtracting values will give the change of the body temperature only.
