Grove temperature sensor 1.2

Arduino, Seeeduino Serials and mutants. Share your problems and experence on arduino compatible board such as seeeduino/stalker, etc.

Moderators: lily.li, violet, salmanfarisvp

Post Reply
aslak.liaaen
Pre-kindergarten
Pre-kindergarten
Posts: 2
Joined: Tue Oct 09, 2018 3:16 pm

Grove temperature sensor 1.2

Post by aslak.liaaen » Fri Oct 26, 2018 7:49 pm

So I'm currently working on a project where i need to utilize body temperature to alter other variables. I have a v1.2 temperature sensor for grove, which seems to work fine, but i'm having some issues. I'm assuming the sensor has an analog output range of 0-1023, but looking at the thermistors temperature-to-resistance graph I'm noticing that it's not linear, which makes sense.
What i'm wondering is how I can calculate the temperature from the output value, as I'm assuming I can't just map it from 0 - 1023 to -40 - 125 and expect that to work. All help is appreciated :)

-Aslak

bill.yu
Elementary-5
Elementary-5
Posts: 566
Joined: Mon Apr 02, 2018 11:05 am

Re: Grove temperature sensor 1.2

Post by bill.yu » Fri Nov 02, 2018 5:11 pm

Hi Aslak

We base on below graph from datasheet. then we come out the formula as below. thanks.

temperature = 1.0/(log(R/R0)/B+1/298.15)-273.15; // convert to temperature via datasheet

Image

aslak.liaaen
Pre-kindergarten
Pre-kindergarten
Posts: 2
Joined: Tue Oct 09, 2018 3:16 pm

Re: Grove temperature sensor 1.2

Post by aslak.liaaen » Mon Nov 05, 2018 7:54 pm

Great! Thank you :)

Post Reply