To anyone getting negative values, measure the resistance of the thermistor and use a resistor with the same value! I had the same problem with the thermistor I got from a cheap Arduino starter pack. Turned out it was not as the seller described a 10k, but a 100k resistance thermistor. after I changed the resistor to a 100k one to match the thermistor, I got plausible values. Also thanks for putting together the formulas, Circuit Basics, I gave up after reading about it for 10mins.
Exactly, and if you want to be very accurate, measure both, and try to match, you may find that some 10 K's read high, others low, I tried six before I got an exact match.
Thanks a billion! I was digging through my component collection this morning and came across a bag of 40 thermistors, 20 rod and 20 glass bulb. I have no friggin idea why the hell I ever ordered them, but I must have had something in mind at the time, could have been a few years back but I am sure I never did anything with any of them. So I decided to do something with at least one of them today. I spend much of the morning looking at different projects done by others, many very complicated, others rather simple, some that appeared to have less of an understanding of these things then I do. Then I found yours. The instructions were simple, code readily at hand, and it worked right off first try, what a deal! Instead of using a breadboard, I have some screw terminals with plugs on the opposite side, this worked great for experimenting with these things. OH WOW It just came to me, my niece wanted me to build here some temp sensors for her ghost hunting outfit! I got these for that, and never got around to building it, as her mom passed on right after I got them, wow. Well now I have to figure out how to build the group of four sensors to tell if a cold or hot spot develops in her target location. Fun building for her ghost adventures, I am not really into ghosts, but I love building detectors of all sort for her outfit!
It should be log(10000./(1024./RawADC-1)) via the voltage divider equation. The sensor uses a thermistor, which changes resistance at varying temperatures. The Steinhart-Hart equation approximates the temperature at a given resistance of the thermistor via 1/T=A+BlnR+ClnRlnRlnR. Since the Arduino cannot measure resistance directly, a voltage divider is made by simply adding a resistor in series with the thermistor. Since current is the same in a series circuit, the total current I=E1/(R1+R2) and I=E2/R2. E1 is the 5V you apply to the + pin. R1 is the small resistor in the circuit, which you can measure with a multimeter to be about 10000 Ohms. R2 is the resistance of the thermistor. E2 is the voltage measured with the S pin in reference to - GND using analogRead(). Therefore, E1R2=E2R1+E2R2, then solving for R2=E2R1/(E1-E2), which can be rewritten as R2=R1/((E1-E2)/E2) and further as R2=R1/(E1/E2-1). So, the resistance of the thermistor R2= 10000/(1024/analogRead(A0) - 1) .
Add the termistor to Gnd side of V divider. Suppose if smthng goes wrong & thermistor shorts it would short 5v to the analog pin without resistance so 10K before thermistor is safe
Excellent Thankyou. I probably won't be using an Arduino but the info on Thermistors and converting from V to C is just what I was looking for. Hopefully going to control some fermentation with the info :)
I recommend to anyone trying this project to use a trimmer instead of a resistor so, that you can adjust the sensitivity of the temperature reading. Also, there are some temperature reading error. I found the solution within the comments, just change some values to c1=0.7904710802e-3, c2=2.251846924e-4, c3=0.87060700625e-7.
Great job, and a helpful circuit. I have made a temperature sensor circuit using NTC and without arduino, just in case if anyone want to understand how does it works.
Chris Scully the thermistor (thermal resistor) and the resistor create a basic voltage divider. the thermistor's resistance varies with temperature. The voltage divider takes that variation in resistance and turns it into a variable voltage signal. Using math and a little logic you can map that signal to what ever scale you like. Fahrenheit, Celsius, Kelvin etc.
Explaining the code and all those strange values coming from nowhere is a must, without that the video is pretty much worthless, can't understand how it works besides the voltage-divider, like if you need to connect the thermo-resistor to ground or use a ptc instead of ntc, then you can't do anything with the shown code, all you can do is just copy&paste blindly without any understanding of what is going on, this is not the way how one can learn anything, even if the global schooling system works like that, but no one of us goes there to learn anything, but we watch videos like this to learn things.
How did you come up with these numbers: Temp = log(10000.0*((1024.0/RawADC-1))); Temp = 1 / (0.001129148 + (0.000234125 + (0.0000000876741 * Temp * Temp ))* Temp
Marcin, I actually found out that the code was slightly wrong and should be log(10000./(1024./RawADC-1)) from the voltage divider equation and now the sensor works fine :) Nevertheless, thanks for the link, it helped me understand the formula better!
Thanks a lot. I recently did scavenge a thermistor from an old laptop battery and I was really thinking how could I use it and I just made a thermometer using it although I had a hard time to obtain its resistance value but I finally calculated it to be around 10 k ohms
how temperature readings may differ if we cover one side of thermistor with hand and the other left open to surroundings..??? will there any effects of environment temperature to it too or just the temperature from the hands are sufficient to drive the thermistor.?
I intend to build one but i want to measure very high temps(160-200 Celsius). Using a thermistor from my 3d printer as it can measure up to 250 Celsius.Do you think it will work?
Would that thermistor thingy survive if applied over a heat sink? i need to keep a metal at a stable temperature and it should be able to survive certain peaks.
sir i need clear connections of lcd and aduino as explained for thermistor and arduino will u plzzz made a video oevrall for lcd connections for temperature detection
Could the Arduino have 64 thermistors that it monitors in sequence, then repeats? Or have the Arduino work in unison with an STC1000 temp monitor, and connect the 64 thermistors across the terminals of the STC1000
nice video but i have some question.... i have a project like this video but in my project if the temp up to 50 C , i want red led is on if below 50 c the green led is on.... why make it work? thanks before....
Nice one...however i have a question.How to add a mosfet to the code to controll a fan when the temp reach a set point?i don't know how to program arduino that why i ask..thank you!
Doesn't a thermistor heat itself up when operating (there's current passing through)? (sorry, I don't have sound on my laptop here, maybe it was mentioned in the video)
Hi, I have been using a 10 ohm thermistor which heats up a lot when I use a 10 Ohm resistor. So, can you please tell me what should I do so that the resistor and thermistor don't not heat up so much because I just burned myself without realizing today. Any help will be appreciated
hey there I have a ntc thermistor 4k7 I think its blue with UEI 085 on it so not sure what kind is it how can I detect on what kind cause the reading it give me is 200 + F and 100+ C
Thanks, this is a really amazing project! I am having a slight issue where it's reading 194 degrees though... I'm pretty sure my room isn't on fire right now either. Any ideas?
Or you are not using a 100k ohm thermistor. This is a potential divider circuit. The output voltage you read all depends on your components ‘ resistance.
The snow glows white On the mountain tonight Not a footprint to be seen A kingdom of isolation And it looks like I’m the Queen The wind is howling Like this swirling storm inside Couldn’t keep it in Heaven knows I tried… Don’t let them in Don’t let them see Be the good girl you always have to be Conceal Don’t feel Don’t let them know… Well, now they know! Let it go, let it go Can’t hold it back anymore Let it go, let it go Turn away and slam the door! I don’t care what they’re going to say Let the storm rage on The cold never bothered me anyway It’s funny how some distance Makes everything seem small And the fears that once controlled me Can’t get to me at all! It’s time to see What I can do To test the limits and break through No right, no wrong No rules for me I’m free! Let it go! Let it go! I am one with the wind and sky! Let it go! Let it go! You’ll never see me cry! Here I stand and here I’ll stay Let the storm rage on… My power flurries through the air into the ground My soul is spiraling in frozen fractals all around And one thought crystallizes like an icy blast I’m never going back The past is in the past! Let it go! Let it go! And I’ll rise like the break of dawn! Let it go! Let it go! That perfect girl is gone! Here I stand in the light of day… Let the storm rage on!!! The cold never bothered me anyway
The epoxy style thermistors like this one usually only go down to around -55C at the most. If you need to monitor lower temperatures you could always use a dry ice TempTale
Is it possible to run the thermistor with 3,3v? The NodeMCU´s analogread pin only supports up to 3,3v :/ If yes, how? The analogpin outputs values of 0-1024 like the normal arduino but it doesn´t work properly...
I got this to work and would like to use it in my greenhouse. I can put the Arduino in a weather proof box, but how do I put the thermister/resistor on a long wire in the greenhouse? I am sure someone has done this. Perhaps you could show me how you did it.
Bill Grubbs if you are running a long distance you will have to take voltage drop into consideration. use some small gauge communications wire, something like shilded twisted three wire. solder the whole voltage divider setup on ther end and use heat shrink on all the leads and a larger piece to bundle them up
The display is not working and i set everything up properly. My resistors are not exacty as high as the ones in the video, the biggest one being 10k ohms rather than 100. does it matter?
I need little expert help. My AirConditioner outside has a heat sensor when outside temperature is above 35 C it cools alot below 35C everything is fine as per its compressors working . Is there any way i can fix the temperature of sensor no matter how hot outside it gives the inside system temperature of 34C fixed any way possible ?
great tutorial, thank you. i have an homework. the goal is to measure the temperatue and the moisture level of a fridge wirelessly. analyzing and saving the data gathered from the device. how can I do that?
To anyone getting negative values, measure the resistance of the thermistor and use a resistor with the same value! I had the same problem with the thermistor I got from a cheap Arduino starter pack. Turned out it was not as the seller described a 10k, but a 100k resistance thermistor. after I changed the resistor to a 100k one to match the thermistor, I got plausible values.
Also thanks for putting together the formulas, Circuit Basics, I gave up after reading about it for 10mins.
Exactly, and if you want to be very accurate, measure both, and try to match, you may find that some 10 K's read high, others low, I tried six before I got an exact match.
Thanks a billion! I was digging through my component collection this morning and came across a bag of 40 thermistors, 20 rod and 20 glass bulb. I have no friggin idea why the hell I ever ordered them, but I must have had something in mind at the time, could have been a few years back but I am sure I never did anything with any of them. So I decided to do something with at least one of them today. I spend much of the morning looking at different projects done by others, many very complicated, others rather simple, some that appeared to have less of an understanding of these things then I do. Then I found yours. The instructions were simple, code readily at hand, and it worked right off first try, what a deal! Instead of using a breadboard, I have some screw terminals with plugs on the opposite side, this worked great for experimenting with these things. OH WOW It just came to me, my niece wanted me to build here some temp sensors for her ghost hunting outfit! I got these for that, and never got around to building it, as her mom passed on right after I got them, wow. Well now I have to figure out how to build the group of four sensors to tell if a cold or hot spot develops in her target location. Fun building for her ghost adventures, I am not really into ghosts, but I love building detectors of all sort for her outfit!
The code shows R1 = 10000 but the fixed resistor in your circuit in 100k or 100000. Is the code wrong?
Your sensor maximum rezistente can be deferent
It should be log(10000./(1024./RawADC-1)) via the voltage divider equation.
The sensor uses a thermistor, which changes resistance at varying temperatures.
The Steinhart-Hart equation approximates the temperature at a given resistance of the thermistor via 1/T=A+BlnR+ClnRlnRlnR.
Since the Arduino cannot measure resistance directly, a voltage divider is made by simply adding a resistor in series with the thermistor.
Since current is the same in a series circuit, the total current I=E1/(R1+R2) and I=E2/R2.
E1 is the 5V you apply to the + pin.
R1 is the small resistor in the circuit, which you can measure with a multimeter to be about 10000 Ohms.
R2 is the resistance of the thermistor.
E2 is the voltage measured with the S pin in reference to - GND using analogRead().
Therefore, E1R2=E2R1+E2R2, then solving for R2=E2R1/(E1-E2), which can be rewritten as R2=R1/((E1-E2)/E2) and further as R2=R1/(E1/E2-1).
So, the resistance of the thermistor R2= 10000/(1024/analogRead(A0) - 1) .
Arduino ATmega 328 microcontroller has an inbuilt analog to digital converter,it can sample and quantize analog reading to digital.
Do we need to calculate the thermistor resistance manually... And how to enter the values in Arduino to change into temperature
This was very useful, thank you for the great explanation! Exactly what I need to finish a project I'm working on :)
instablaster...
Thanks for the how-to, I'll have to refer to this again when i get all the parts in.
Short but sweet. Excellent intro project.
that what she said
Yeah... The ads
SO COOL! SIMPLE AND EASY TO FOLLOW. YOU DESERVE MORE LIKES
This is just awsome! Simply explained and thus perfectly understandable.
Add the termistor to Gnd side of V divider. Suppose if smthng goes wrong & thermistor shorts it would short 5v to the analog pin without resistance so 10K before thermistor is safe
Excellent Thankyou. I probably won't be using an Arduino but the info on Thermistors and converting from V to C is just what I was looking for. Hopefully going to control some fermentation with the info :)
Which resistor did you use for the display??
Yes!!! Basic enough I can understand!!!
I recommend to anyone trying this project to use a trimmer instead of a resistor so, that you can adjust the sensitivity of the temperature reading. Also, there are some temperature reading error. I found the solution within the comments, just change some values to c1=0.7904710802e-3, c2=2.251846924e-4, c3=0.87060700625e-7.
lmao these are even worse, instead of 90° room temperature I now have 143° room temperature. Great.
Great job, and a helpful circuit.
I have made a temperature sensor circuit using NTC and without arduino, just in case if anyone want to understand how does it works.
yes i will like to understand please
Excellent video. I am new to Arduino world and this served as a great introduction to Arduino for me.
Looks cool! will try this when i'm home i like the simplicity you put into your vids
I almost always use LM35 for temperature tansducer. 10mV/°C, precisely 1.00 volt at 100°C.
Cheers from Indonesia
Wah ini
Wah ini
That is the best introduction to Arduino I have seen thank you!!
would be good if you explained what each component does
Chris Scully the thermistor (thermal resistor) and the resistor create a basic voltage divider. the thermistor's resistance varies with temperature. The voltage divider takes that variation in resistance and turns it into a variable voltage signal. Using math and a little logic you can map that signal to what ever scale you like. Fahrenheit, Celsius, Kelvin etc.
Chris Scully qtips clean wax out of your ears.
If you don't know anything about electronics you should close this video and learn basic things about them
Explaining the code and all those strange values coming from nowhere is a must, without that the video is pretty much worthless, can't understand how it works besides the voltage-divider, like if you need to connect the thermo-resistor to ground or use a ptc instead of ntc, then you can't do anything with the shown code, all you can do is just copy&paste blindly without any understanding of what is going on, this is not the way how one can learn anything, even if the global schooling system works like that, but no one of us goes there to learn anything, but we watch videos like this to learn things.
I love my arduino! ❤️😀👍
How did you come up with these numbers:
Temp = log(10000.0*((1024.0/RawADC-1)));
Temp = 1 / (0.001129148 + (0.000234125 + (0.0000000876741 * Temp * Temp ))* Temp
This equation comes from the thermistor data sheet. Check this before imputing the equation. Different thermistor have different coefficients.
this is a answer www.thinksrs.com/downloads/programs/Therm%20Calc/NTCCalibrator/NTCcalculator.htm
Marcin, I actually found out that the code was slightly wrong and should be log(10000./(1024./RawADC-1)) from the voltage divider equation and now the sensor works fine :) Nevertheless, thanks for the link, it helped me understand the formula better!
This was useful. Thank you. Does the thermistor need to be calibrated?
the video is fantasting.
can you share the link for LCD connection part.
Does the formula in the code change if I use a 10K thermistor and 10K resistor?
I just used one to control a relay, i used the same code and it worked just fine
Another excellent video. You did a great job !!!
Great Chanel great video. Can u upload how to conect the lcd to the androino and what is the resistants that need?
Thanks a lot. I recently did scavenge a thermistor from an old laptop battery and I was really thinking how could I use it and I just made a thermometer using it although I had a hard time to obtain its resistance value but I finally calculated it to be around 10 k ohms
What would be the simplest way to use the data collected and create a longterm graph? (weeks of data)
Use a sd reader and simply add your readings to a simple text file
i am looking to convert an old freezer into an arduino controlled air conditioner, how would you recommend i do this
is that a NTC or PTC thermistor? because the code you provided makes the temperature drop for the thermistor Im using while temperature increases...
how temperature readings may differ if we cover one side of thermistor with hand and the other left open to surroundings..???
will there any effects of environment temperature to it too or just the temperature from the hands are sufficient to drive the thermistor.?
this was a really good video. thanks a ton
If I used another thermistor instead of the resistor would this give me the difference? I want to monitor the cooling of my radiator.
Dude. How do you program a Thermal Checker during like the ones they're using to check your temperature.
Tanks for video😍😍😍
Plz help what can i change if i use 10ohm thermestor
I intend to build one but i want to measure very high temps(160-200 Celsius). Using a thermistor from my 3d printer as it can measure up to 250 Celsius.Do you think it will work?
Hello. Great Job!! Tks.
Look, is there any possibility to 'log' (save) this data into a database or TXT file for example?
Can we change into Celsius with the lcd display??
Thank you! Although, the page from the link to circuitbasics.com it's a bit different that the one in your video.
@Tatum Leonidas Hi there! I'm not sure how this would be related to my original comment. I commented the video, not about something else.
great info.. thanks...:)
nice video , can you help me and tell me where or how you found Steinhart-Hart equation variables?...
Would that thermistor thingy survive if applied over a heat sink? i need to keep a metal at a stable temperature and it should be able to survive certain peaks.
would this work with a high temperature thermocouple as well?
great.
will try.
thanks.
keep up the good work
Yes
No
Yes
Is this suitable to measure surrounding temperature?
sir i need clear connections of lcd and aduino as explained for thermistor and arduino will u plzzz made a video oevrall for lcd connections for temperature detection
Could the Arduino have 64 thermistors that it monitors in sequence, then repeats?
Or have the Arduino work in unison with an STC1000 temp monitor, and connect the 64 thermistors across the terminals of the STC1000
The output of a thermistor is nonlinear, in the calibration block of code how to account for it?
that was great , can you ask my question? how to read the pirani vacuum gauge using arduino?
nice video but i have some question.... i have a project like this video but in my project if the temp up to 50 C , i want red led is on if below 50 c the green led is on.... why make it work? thanks before....
Thnx :)
I needed to put the sensor to the 5V pin, if not it was showing me 10 degrees less.
Great video 👍🏻
Excellent! Thank you!
what are the resistance value for the second and third resistors?
Do you know the range from that thermistor?
I have a module of that thermistor. Will it work to module to?I
Nice one...however i have a question.How to add a mosfet to the code to controll a fan when the temp reach a set point?i don't know how to program arduino that why i ask..thank you!
use the code for led on mosfet works fine
Doesn't a thermistor heat itself up when operating (there's current passing through)?
(sorry, I don't have sound on my laptop here, maybe it was mentioned in the video)
Hi, thank you for this demo, Is that possible to mount 2 thermistor at the same time ? and the output data shows as curve ?
Can I do it with a NODEMCU module?
Well done
Hi, I have been using a 10 ohm thermistor which heats up a lot when I use a 10 Ohm resistor. So, can you please tell me what should I do so that the resistor and thermistor don't not heat up so much because I just burned myself without realizing today. Any help will be appreciated
will it work without contact and can we use 10 k resistor how will the code change
Can't copy the code...link is not working properly...can copy everything on page except the code itself???? No matter what browser i try...
hey there I have a ntc thermistor 4k7 I think its blue with UEI 085 on it so not sure what kind is it how can I detect on what kind cause the reading it give me is 200 + F
and 100+ C
Is it possible interfacing ultrasonic sensor HC-SR04 with Xcos? If yes, can you tell me how?
Thanks bro. But why is showing negative temperatures for me?
Thanks, this is a really amazing project! I am having a slight issue where it's reading 194 degrees though... I'm pretty sure my room isn't on fire right now either. Any ideas?
Or you are not using a 100k ohm thermistor. This is a potential divider circuit. The output voltage you read all depends on your components ‘ resistance.
you probably needed to subtract a value from it to bring it into correct range
excellent!!
What kind of termistor do you use?
what range of temperature we can use it? could we use to measure about 300c?
equation of R2 will be R1 / (1023.0 / (float)Vo - 1.0)
noob question. Why the resistor needs to be the same value as thermistor??
Omg u did the coding for me lol ur a G
If we use LM35 sensor can we add same code to that??
Would the code be the same for a 10k ohm thermistor?
if we want to connect to lcd screen how many resistors needed and with what resistance
The snow glows white
On the mountain tonight
Not a footprint to be seen
A kingdom of isolation
And it looks like I’m the Queen
The wind is howling
Like this swirling storm inside
Couldn’t keep it in
Heaven knows I tried…
Don’t let them in
Don’t let them see
Be the good girl you always have to be
Conceal
Don’t feel
Don’t let them know…
Well, now they know!
Let it go, let it go
Can’t hold it back anymore
Let it go, let it go
Turn away and slam the door!
I don’t care what they’re going to say
Let the storm rage on
The cold never bothered me anyway
It’s funny how some distance
Makes everything seem small
And the fears that once controlled me
Can’t get to me at all!
It’s time to see
What I can do
To test the limits and break through
No right, no wrong
No rules for me
I’m free!
Let it go! Let it go!
I am one with the wind and sky!
Let it go! Let it go!
You’ll never see me cry!
Here I stand and here I’ll stay
Let the storm rage on…
My power flurries through the air into the ground
My soul is spiraling in frozen fractals all around
And one thought crystallizes like an icy blast
I’m never going back
The past is in the past!
Let it go! Let it go!
And I’ll rise like the break of dawn!
Let it go! Let it go!
That perfect girl is gone!
Here I stand in the light of day…
Let the storm rage on!!!
The cold never bothered me anyway
Sick song make it into a rap
Can you make a distance measure curcit
Hello sir, can I use this to determine one's body temperature?
No only surrounding temperature
Is this sensor can detect ultra low temperature? Below -80 degree celcius? Your comment very much appreciated
The epoxy style thermistors like this one usually only go down to around -55C at the most. If you need to monitor lower temperatures you could always use a dry ice TempTale
Is it possible to run the thermistor with 3,3v? The NodeMCU´s analogread pin only supports up to 3,3v :/ If yes, how? The analogpin outputs values of 0-1024 like the normal arduino but it doesn´t work properly...
Why am I getting readings of -459.67 F repetitively?
Great thanks.
please master, how to combine three or more temperature sensors in an arduino and display on an LCD, I wanna making Thermal
Conductivity Meter
Hi what if I wanted to get a table containing each degree of temperature with its own resistance, what can I change in the coding program?
Hi sir, c'est une très bonne présentation
Give the link for downloading math library please
I got this to work and would like to use it in my greenhouse. I can put the Arduino in a weather proof box, but how do I put the thermister/resistor on a long wire in the greenhouse? I am sure someone has done this. Perhaps you could show me how you did it.
Bill Grubbs if you are running a long distance you will have to take voltage drop into consideration. use some small gauge communications wire, something like shilded twisted three wire. solder the whole voltage divider setup on ther end and use heat shrink on all the leads and a larger piece to bundle them up
Can you make this water proof?
The display is not working and i set everything up properly. My resistors are not exacty as high as the ones in the video, the biggest one being 10k ohms rather than 100. does it matter?
The "L" on the board is also orange
it worked on the version before the display
How do u put the lcd display on the bread board
I need little expert help.
My AirConditioner outside has a heat sensor when outside temperature is above 35 C it cools alot below 35C everything is fine as per its compressors working .
Is there any way i can fix the temperature of sensor no matter how hot outside it gives the inside system temperature of 34C fixed any way possible ?
well, now I know what to do, thanks
you probably dont remember posting this comment but did you end up using the code on the website? Or the one in the video?
I copy pasted the code and when I touch it it goes down instead of up and im pretty sure im warmer than my room. why is that happening?
can we do the same on arduino nano?
what materials did you use
Hi! Thanks for the help i would like to know how can I attache Bluetooth and take the reading on my phone
You have to dev an app. Then, you have to send the data by Bluetooth.
great tutorial, thank you. i have an homework. the goal is to measure the temperatue and the moisture level of a fridge wirelessly. analyzing and saving the data gathered from the device. how can I do that?
Yapabildin mi?
Can the temperature be monitored online?