Make an Arduino Temperature Sensor (Thermistor Tutorial)

Поделиться
HTML-код
  • Опубликовано: 2 фев 2025

Комментарии • 298

  • @DeaBroggn
    @DeaBroggn 6 лет назад +41

    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.

    • @JerryEricsson
      @JerryEricsson 4 года назад +2

      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.

  • @JerryEricsson
    @JerryEricsson 4 года назад +8

    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!

  • @FilamentFriday
    @FilamentFriday 6 лет назад +15

    The code shows R1 = 10000 but the fixed resistor in your circuit in 100k or 100000. Is the code wrong?

    • @thefunnyguy16
      @thefunnyguy16 Год назад +1

      Your sensor maximum rezistente can be deferent

  • @orionsarc2976
    @orionsarc2976 6 лет назад +19

    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) .

    • @abhijitkumarmanna2031
      @abhijitkumarmanna2031 3 года назад

      Arduino ATmega 328 microcontroller has an inbuilt analog to digital converter,it can sample and quantize analog reading to digital.

    • @Lyng77
      @Lyng77 2 года назад

      Do we need to calculate the thermistor resistance manually... And how to enter the values in Arduino to change into temperature

  • @rikvdmark
    @rikvdmark 6 лет назад +15

    This was very useful, thank you for the great explanation! Exactly what I need to finish a project I'm working on :)

  • @chemicalvamp
    @chemicalvamp 7 лет назад +7

    Thanks for the how-to, I'll have to refer to this again when i get all the parts in.

  • @celtichongy
    @celtichongy 5 лет назад +6

    Short but sweet. Excellent intro project.

  • @mahtvabhushan5793
    @mahtvabhushan5793 3 года назад

    SO COOL! SIMPLE AND EASY TO FOLLOW. YOU DESERVE MORE LIKES

  • @joachim4660
    @joachim4660 4 года назад +2

    This is just awsome! Simply explained and thus perfectly understandable.

    • @sciencesi5595
      @sciencesi5595 3 года назад

      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

  • @walterblanc9708
    @walterblanc9708 3 года назад

    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 :)

  • @0gkeepmy601
    @0gkeepmy601 3 года назад +3

    Which resistor did you use for the display??

  • @TRONMAGNUM2099
    @TRONMAGNUM2099 4 года назад +2

    Yes!!! Basic enough I can understand!!!

  • @kingblue588
    @kingblue588 5 лет назад +8

    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.

    • @littlefrank90
      @littlefrank90 Год назад

      lmao these are even worse, instead of 90° room temperature I now have 143° room temperature. Great.

  • @practicalcircuits3640
    @practicalcircuits3640 4 года назад +2

    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.

  • @chfin7251
    @chfin7251 6 лет назад

    Excellent video. I am new to Arduino world and this served as a great introduction to Arduino for me.

  • @Popsickle950
    @Popsickle950 8 лет назад

    Looks cool! will try this when i'm home i like the simplicity you put into your vids

  • @iblesbosuok
    @iblesbosuok 5 лет назад +3

    I almost always use LM35 for temperature tansducer. 10mV/°C, precisely 1.00 volt at 100°C.
    Cheers from Indonesia

  • @MrBobWareham
    @MrBobWareham 7 лет назад

    That is the best introduction to Arduino I have seen thank you!!

  • @chrisscullynz
    @chrisscullynz 9 лет назад +30

    would be good if you explained what each component does

    • @djsnowman06
      @djsnowman06 8 лет назад +11

      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.

    • @noahwolfe1304
      @noahwolfe1304 7 лет назад +3

      Chris Scully qtips clean wax out of your ears.

    • @dieselgeezer18
      @dieselgeezer18 5 лет назад +1

      If you don't know anything about electronics you should close this video and learn basic things about them

    • @Wilson84KS
      @Wilson84KS 4 года назад +2

      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.

  • @christophertadeo6120
    @christophertadeo6120 Год назад

    I love my arduino! ❤️😀👍

  • @lis610
    @lis610 8 лет назад +15

    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

    • @manla8397
      @manla8397 7 лет назад

      This equation comes from the thermistor data sheet. Check this before imputing the equation. Different thermistor have different coefficients.

    • @marcinwojcik9159
      @marcinwojcik9159 6 лет назад +1

      this is a answer www.thinksrs.com/downloads/programs/Therm%20Calc/NTCCalibrator/NTCcalculator.htm

    • @Orionsarc12
      @Orionsarc12 6 лет назад +1

      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!

  • @gerrymcerlean8432
    @gerrymcerlean8432 4 года назад +1

    This was useful. Thank you. Does the thermistor need to be calibrated?

  • @AravindKumar-go4vp
    @AravindKumar-go4vp 4 месяца назад

    the video is fantasting.
    can you share the link for LCD connection part.

  • @garystafford6570
    @garystafford6570 6 лет назад +2

    Does the formula in the code change if I use a 10K thermistor and 10K resistor?

    • @user-pj1er1vc5j
      @user-pj1er1vc5j 6 лет назад

      I just used one to control a relay, i used the same code and it worked just fine

  • @elecnut8211
    @elecnut8211 7 лет назад

    Another excellent video. You did a great job !!!

  • @tzachus
    @tzachus 2 года назад

    Great Chanel great video. Can u upload how to conect the lcd to the androino and what is the resistants that need?

  • @varunatik632
    @varunatik632 4 года назад +1

    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

  • @kevinlu9859
    @kevinlu9859 5 лет назад +1

    What would be the simplest way to use the data collected and create a longterm graph? (weeks of data)

    • @alochle9566
      @alochle9566 5 лет назад +1

      Use a sd reader and simply add your readings to a simple text file

  • @user-tr2dh4xx6u
    @user-tr2dh4xx6u 4 года назад

    i am looking to convert an old freezer into an arduino controlled air conditioner, how would you recommend i do this

  • @sto2779
    @sto2779 4 года назад

    is that a NTC or PTC thermistor? because the code you provided makes the temperature drop for the thermistor Im using while temperature increases...

  • @hiteshpatel650
    @hiteshpatel650 4 года назад

    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.?

  • @vintyprod
    @vintyprod 5 лет назад

    this was a really good video. thanks a ton

  • @MrDrekow
    @MrDrekow 8 лет назад

    If I used another thermistor instead of the resistor would this give me the difference? I want to monitor the cooling of my radiator.

  • @taganilelouisev.3267
    @taganilelouisev.3267 3 года назад

    Dude. How do you program a Thermal Checker during like the ones they're using to check your temperature.

  • @mohaamoha9272
    @mohaamoha9272 5 лет назад

    Tanks for video😍😍😍
    Plz help what can i change if i use 10ohm thermestor

  • @civicoulas15
    @civicoulas15 4 года назад

    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?

  • @sigmundojr
    @sigmundojr 8 лет назад +1

    Hello. Great Job!! Tks.
    Look, is there any possibility to 'log' (save) this data into a database or TXT file for example?

  • @sshamshuddin6132
    @sshamshuddin6132 6 лет назад +1

    Can we change into Celsius with the lcd display??

  • @andrasparanici5491
    @andrasparanici5491 4 года назад +4

    Thank you! Although, the page from the link to circuitbasics.com it's a bit different that the one in your video.

    • @andrasparanici5491
      @andrasparanici5491 3 года назад

      @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.

  • @qzorn4440
    @qzorn4440 3 года назад

    great info.. thanks...:)

  • @TnInventor
    @TnInventor 4 года назад

    nice video , can you help me and tell me where or how you found Steinhart-Hart equation variables?...

  • @placebo_yue
    @placebo_yue 5 лет назад

    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.

  • @Sean_XT
    @Sean_XT 2 года назад

    would this work with a high temperature thermocouple as well?

  • @singgihpanji
    @singgihpanji 4 года назад

    great.
    will try.
    thanks.

  • @tylermates2857
    @tylermates2857 3 года назад +1

    keep up the good work

  • @andrewlee1791
    @andrewlee1791 3 года назад

    Is this suitable to measure surrounding temperature?

  • @lathabv5870
    @lathabv5870 8 лет назад

    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

  • @rogercrier
    @rogercrier 4 года назад

    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

  • @朔风-u9y
    @朔风-u9y 3 года назад

    The output of a thermistor is nonlinear, in the calibration block of code how to account for it?

  • @hosseinhossein5827
    @hosseinhossein5827 6 лет назад

    that was great , can you ask my question? how to read the pirani vacuum gauge using arduino?

  • @adjiepratama778
    @adjiepratama778 7 лет назад

    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....

  • @drtechtek2165
    @drtechtek2165 5 лет назад +1

    Thnx :)
    I needed to put the sensor to the 5V pin, if not it was showing me 10 degrees less.

  • @nedimfejzic8811
    @nedimfejzic8811 8 лет назад

    Great video 👍🏻

  • @yekutielbenheshel354
    @yekutielbenheshel354 7 лет назад +1

    Excellent! Thank you!

  • @peiwen4727
    @peiwen4727 5 лет назад +1

    what are the resistance value for the second and third resistors?

  • @ilmaannafia1262
    @ilmaannafia1262 4 года назад +1

    Do you know the range from that thermistor?

    • @ilmaannafia1262
      @ilmaannafia1262 4 года назад

      I have a module of that thermistor. Will it work to module to?I

  • @alinioanmoroi1370
    @alinioanmoroi1370 6 лет назад

    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!

  • @zx3215
    @zx3215 5 лет назад

    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)

  • @mustafakhalil007
    @mustafakhalil007 6 лет назад

    Hi, thank you for this demo, Is that possible to mount 2 thermistor at the same time ? and the output data shows as curve ?

  • @arnabmondal3436
    @arnabmondal3436 3 года назад

    Can I do it with a NODEMCU module?

  • @umargul5644
    @umargul5644 2 года назад

    Well done

  • @deadalpeca8099
    @deadalpeca8099 6 лет назад

    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

  • @lohithsomasundaram2867
    @lohithsomasundaram2867 4 года назад

    will it work without contact and can we use 10 k resistor how will the code change

  • @shutdahellup69420
    @shutdahellup69420 7 лет назад +3

    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...

  • @adamjensen6376
    @adamjensen6376 8 лет назад

    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

  • @renanzuba6436
    @renanzuba6436 7 лет назад

    Is it possible interfacing ultrasonic sensor HC-SR04 with Xcos? If yes, can you tell me how?

  • @dannyelpdyahoocombr
    @dannyelpdyahoocombr 5 лет назад

    Thanks bro. But why is showing negative temperatures for me?

  • @MinecraftMineturtle
    @MinecraftMineturtle 7 лет назад +1

    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?

    • @manla8397
      @manla8397 7 лет назад

      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.

    • @TheVideoVolcano
      @TheVideoVolcano 4 года назад

      you probably needed to subtract a value from it to bring it into correct range

  • @mohammadmahdiabbasi4896
    @mohammadmahdiabbasi4896 3 года назад

    excellent!!

  • @yudirudiat6499
    @yudirudiat6499 3 года назад

    What kind of termistor do you use?

  • @manofmesopotamia7602
    @manofmesopotamia7602 5 лет назад

    what range of temperature we can use it? could we use to measure about 300c?

  • @habibulahsan9859
    @habibulahsan9859 2 года назад

    equation of R2 will be R1 / (1023.0 / (float)Vo - 1.0)

  • @ponciusz
    @ponciusz 5 лет назад +1

    noob question. Why the resistor needs to be the same value as thermistor??

  • @kateanne5163
    @kateanne5163 4 года назад +1

    Omg u did the coding for me lol ur a G

  • @madhavshanbhag7716
    @madhavshanbhag7716 3 года назад

    If we use LM35 sensor can we add same code to that??

  • @seanvarian6832
    @seanvarian6832 4 года назад

    Would the code be the same for a 10k ohm thermistor?

  • @srisubhash8421
    @srisubhash8421 8 лет назад

    if we want to connect to lcd screen how many resistors needed and with what resistance

  • @tylermates2857
    @tylermates2857 3 года назад +3

    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

    • @Polishboi820
      @Polishboi820 3 года назад

      Sick song make it into a rap

  • @asmaafouda4417
    @asmaafouda4417 3 года назад

    Can you make a distance measure curcit

  • @ivana.porneso4695
    @ivana.porneso4695 3 года назад

    Hello sir, can I use this to determine one's body temperature?

    • @StudioSix9
      @StudioSix9 2 года назад

      No only surrounding temperature

  • @syaduinotech3681
    @syaduinotech3681 2 года назад

    Is this sensor can detect ultra low temperature? Below -80 degree celcius? Your comment very much appreciated

    • @Circuitbasics
      @Circuitbasics  Год назад

      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

  • @Jan.-
    @Jan.- 6 лет назад

    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...

  • @porterlindsey235
    @porterlindsey235 7 лет назад +2

    Why am I getting readings of -459.67 F repetitively?

  • @BushCampingTools
    @BushCampingTools 6 лет назад

    Great thanks.

  • @kreatifteknik3179
    @kreatifteknik3179 5 лет назад

    please master, how to combine three or more temperature sensors in an arduino and display on an LCD, I wanna making Thermal
    Conductivity Meter

  • @hiba5140
    @hiba5140 6 лет назад

    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?

  • @panthLeoJTm
    @panthLeoJTm 3 года назад

    Hi sir, c'est une très bonne présentation

  • @yudirudiat6499
    @yudirudiat6499 3 года назад

    Give the link for downloading math library please

  • @billgrubbs1
    @billgrubbs1 8 лет назад

    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.

    • @djsnowman06
      @djsnowman06 8 лет назад

      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

  • @AFE948
    @AFE948 9 месяцев назад

    Can you make this water proof?

  • @skittles_gy82
    @skittles_gy82 11 месяцев назад

    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?

    • @skittles_gy82
      @skittles_gy82 11 месяцев назад

      The "L" on the board is also orange

    • @skittles_gy82
      @skittles_gy82 11 месяцев назад

      it worked on the version before the display

  • @Danny-cw9iw
    @Danny-cw9iw 5 лет назад

    How do u put the lcd display on the bread board

  • @MuhammadUsman-dy4zm
    @MuhammadUsman-dy4zm 5 лет назад

    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 ?

  • @poopdealer4207
    @poopdealer4207 6 лет назад

    well, now I know what to do, thanks

    • @neekoooo6282
      @neekoooo6282 5 лет назад

      you probably dont remember posting this comment but did you end up using the code on the website? Or the one in the video?

  • @nicospok
    @nicospok 4 года назад

    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?

  • @kuttiakhil3627
    @kuttiakhil3627 6 лет назад +1

    can we do the same on arduino nano?

  • @aaronhernandez5965
    @aaronhernandez5965 2 года назад

    what materials did you use

  • @humaidalvi00786
    @humaidalvi00786 7 лет назад

    Hi! Thanks for the help i would like to know how can I attache Bluetooth and take the reading on my phone

    • @bryanDaMazo16
      @bryanDaMazo16 7 лет назад

      You have to dev an app. Then, you have to send the data by Bluetooth.

  • @Hibcon
    @Hibcon 6 лет назад

    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?

    • @emreT_T
      @emreT_T 3 года назад

      Yapabildin mi?

  • @nickdrivinby
    @nickdrivinby 8 лет назад

    Can the temperature be monitored online?