Make an Arduino Temperature Sensor (Thermistor Tutorial)

Sdílet
Vložit
  • čas přidán 17. 11. 2015
  • Make an Arduino Temperature Sensor (Thermistor Tutorial)
    In this video, we walk through the steps in setting up a thermistor temperature sensor on an Arduino Uno. First I show how to output the temperature readings to your serial monitor. Then I go over how to connect and output the temperature readings to a 16x2 LCD display.
    Get the thermistor here: www.amazon.com/gp/product/B01...
    More information about this project can be found in the tutorial at: www.circuitbasics.com/arduino...
    Check out the Circuit Basics blog for more articles and tutorials on the Raspberry Pi, Arduino and other DIY electronic projects! www.circuitbasics.com
    Facebook: / circuitbasic
    Twitter: / circuitbasics
    Instagram: / circuitbasics
  • Věda a technologie

Komentáře • 298

  • @chemicalvamp
    @chemicalvamp Před 6 lety +7

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

  • @DeaBroggn
    @DeaBroggn Před 6 lety +36

    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 Před 4 lety +1

      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.

  • @rikvdmark
    @rikvdmark Před 6 lety +15

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

  • @Popsickle950
    @Popsickle950 Před 7 lety

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

  • @elecnut8211
    @elecnut8211 Před 7 lety

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

  • @mahtvabhushan5793
    @mahtvabhushan5793 Před 3 lety

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

  • @JerryEricsson
    @JerryEricsson Před 4 lety +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!

  • @chfin7251
    @chfin7251 Před 6 lety

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

  • @joachim4660
    @joachim4660 Před 3 lety +2

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

    • @sciencesi5595
      @sciencesi5595 Před 3 lety

      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 Před 2 lety

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

  • @celtichongy
    @celtichongy Před 5 lety +6

    Short but sweet. Excellent intro project.

  • @vintyprod
    @vintyprod Před 4 lety

    this was a really good video. thanks a ton

  • @yekutielbenheshel354
    @yekutielbenheshel354 Před 7 lety +1

    Excellent! Thank you!

  • @nedimfejzic8811
    @nedimfejzic8811 Před 7 lety

    Great video 👍🏻

  • @FilamentFriday
    @FilamentFriday Před 5 lety +14

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

    • @thefunnyguy16
      @thefunnyguy16 Před rokem +1

      Your sensor maximum rezistente can be deferent

  • @singgihpanji
    @singgihpanji Před 4 lety

    great.
    will try.
    thanks.

  • @adelgiafadhli9590
    @adelgiafadhli9590 Před 6 lety

    It works!!, thankyouu.

  • @qzorn4440
    @qzorn4440 Před 2 lety

    great info.. thanks...:)

  • @umargul5644
    @umargul5644 Před 2 lety

    Well done

  • @TRONMAGNUM2099
    @TRONMAGNUM2099 Před 3 lety +2

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

  • @florianfuckinggames
    @florianfuckinggames Před 2 lety

    thank you man

  • @mustafakhalil007
    @mustafakhalil007 Před 5 lety

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

  • @MrBobWareham
    @MrBobWareham Před 6 lety

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

  • @varunatik632
    @varunatik632 Před 4 lety +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

  • @gerrymcerlean8432
    @gerrymcerlean8432 Před 3 lety +1

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

  • @BushCampingTools
    @BushCampingTools Před 5 lety

    Great thanks.

  • @mohammadmahdiabbasi4896

    excellent!!

  • @drtechtek2165
    @drtechtek2165 Před 4 lety +1

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

  • @orionsarc2976
    @orionsarc2976 Před 6 lety +14

    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 Před 2 lety

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

    • @Lyng77
      @Lyng77 Před 2 lety

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

  • @hosseinhossein5827
    @hosseinhossein5827 Před 5 lety

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

  • @practicalcircuits3640
    @practicalcircuits3640 Před 4 lety +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.

  • @TnInventor
    @TnInventor Před 4 lety

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

  • @christophertadeo6120
    @christophertadeo6120 Před rokem

    I love my arduino! ❤️😀👍

  • @sigmundojr
    @sigmundojr Před 7 lety +1

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

  • @placebo_yue
    @placebo_yue Před 4 lety

    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.

  • @0gkeepmy601
    @0gkeepmy601 Před 3 lety +2

    Which resistor did you use for the display??

  • @tzachus
    @tzachus Před 2 lety

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

  • @sshamshuddin6132
    @sshamshuddin6132 Před 5 lety +1

    Can we change into Celsius with the lcd display??

  • @shutdahellup69420
    @shutdahellup69420 Před 7 lety +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...

  • @peiwen4727
    @peiwen4727 Před 4 lety +1

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

  • @renanzuba6436
    @renanzuba6436 Před 6 lety

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

  • @hiteshpatel650
    @hiteshpatel650 Před 4 lety

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

  • @deadalpeca8099
    @deadalpeca8099 Před 6 lety

    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

  • @rogercrier
    @rogercrier Před 3 lety

    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

  • @hiba5140
    @hiba5140 Před 6 lety

    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?

  • @Jan.-
    @Jan.- Před 5 lety

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

  • @manofmesopotamia7602
    @manofmesopotamia7602 Před 5 lety

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

  • @adjiepratama778
    @adjiepratama778 Před 6 lety

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

  • @MuhammadUsman-dy4zm
    @MuhammadUsman-dy4zm Před 5 lety

    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 ?

  • @civicoulas15
    @civicoulas15 Před 3 lety

    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?

  • @user-ku9dk5dx8h
    @user-ku9dk5dx8h Před 5 lety

    Is there any programm in labview for this project?

  • @sto2779
    @sto2779 Před 3 lety

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

  • @lathabv5870
    @lathabv5870 Před 7 lety

    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

  • @kreatifteknik3179
    @kreatifteknik3179 Před 4 lety

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

  • @mohaamoha9272
    @mohaamoha9272 Před 4 lety

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

  • @MrDrekow
    @MrDrekow Před 7 lety

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

  • @poopdealer4207
    @poopdealer4207 Před 5 lety

    well, now I know what to do, thanks

    • @neekoooo6282
      @neekoooo6282 Před 5 lety

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

  • @Sean_XT
    @Sean_XT Před rokem

    would this work with a high temperature thermocouple as well?

  • @taganilelouisev.3267
    @taganilelouisev.3267 Před 3 lety

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

  • @srisubhash8421
    @srisubhash8421 Před 7 lety

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

  • @user-tr2dh4xx6u
    @user-tr2dh4xx6u Před 3 lety

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

  • @adamjensen6376
    @adamjensen6376 Před 7 lety

    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

  • @andrewlee1791
    @andrewlee1791 Před 3 lety

    Is this suitable to measure surrounding temperature?

  • @kuttiakhil3627
    @kuttiakhil3627 Před 6 lety +1

    can we do the same on arduino nano?

  • @arnabmondal3436
    @arnabmondal3436 Před 2 lety

    Can I do it with a NODEMCU module?

  • @zeemixvideos6485
    @zeemixvideos6485 Před 5 lety

    hello sir can i use ds18b20

  • @zx3215
    @zx3215 Před 4 lety

    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)

  • @panthLeoJTm
    @panthLeoJTm Před 3 lety

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

  • @nickdrivinby
    @nickdrivinby Před 7 lety

    Can the temperature be monitored online?

  • @kumudhadevang6107
    @kumudhadevang6107 Před 6 lety

    can I get same program used in this tutorial plz

  • @seanvarian6832
    @seanvarian6832 Před 3 lety

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

  • @Danny-cw9iw
    @Danny-cw9iw Před 4 lety

    How do u put the lcd display on the bread board

  • @yudirudiat6499
    @yudirudiat6499 Před 3 lety

    What kind of termistor do you use?

  • @aaronhernandez5965
    @aaronhernandez5965 Před 2 lety

    what materials did you use

  • @user-eq5qh2ub9w
    @user-eq5qh2ub9w Před 3 lety

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

  • @andrasparanici5491
    @andrasparanici5491 Před 4 lety +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 Před 3 lety

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

  • @ManiacJoe63
    @ManiacJoe63 Před 7 lety

    can it done on oled display ?

  • @madhavshanbhag7716
    @madhavshanbhag7716 Před 2 lety

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

  • @jaed9173
    @jaed9173 Před 4 lety

    need help sir. how can I add a 12v dc fan??

  • @educationsystemsuck1518

    Can u tell me the required thing in a list?

  • @asmaafouda4417
    @asmaafouda4417 Před 2 lety

    Can you make a distance measure curcit

  • @rideforfun1995
    @rideforfun1995 Před 5 lety

    can 10k thermistor be used?

  • @JTech_._
    @JTech_._ Před 8 lety

    when i change it to celsius it doesnt change numbers with both f and c it shows it as minus

  • @tylermates2857
    @tylermates2857 Před 3 lety +1

    keep up the good work

  • @ponciusz
    @ponciusz Před 5 lety +1

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

  • @mahirasef3940
    @mahirasef3940 Před 5 lety

    Can you give the diagram to connect to the LCD Display

  • @rideforfun1995
    @rideforfun1995 Před 5 lety +1

    can you code for 10k thermistor?

  • @iblesbosuok
    @iblesbosuok Před 5 lety +3

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

  • @porterlindsey235
    @porterlindsey235 Před 6 lety +2

    Why am I getting readings of -459.67 F repetitively?

  • @chrisscullynz
    @chrisscullynz Před 8 lety +30

    would be good if you explained what each component does

    • @djsnowman06
      @djsnowman06 Před 7 lety +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 Před 6 lety +3

      Chris Scully qtips clean wax out of your ears.

    • @dieselgeezer18
      @dieselgeezer18 Před 4 lety

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

    • @Wilson84KS
      @Wilson84KS Před 3 lety +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.

  • @sabagloveli5671
    @sabagloveli5671 Před 2 lety

    hello sir, can you make it for esp8266? i really need it, thanks in advance

  • @yudirudiat6499
    @yudirudiat6499 Před 3 lety

    Give the link for downloading math library please

  • @lohithsomasundaram2867

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

  • @dannyelpdyahoocombr
    @dannyelpdyahoocombr Před 4 lety

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

  • @piotrbielawski4569
    @piotrbielawski4569 Před rokem

    How to send this data to nextion display?

  • @mother-fng-bonswa3612
    @mother-fng-bonswa3612 Před 6 lety

    i don know why the 100 k divider.. i mean you can put the thermistor on the 5 v tough. and once its increase its value or decrease it change its output voltage. this can be converted to temperature in arduino.

  • @ednapahulaya3999
    @ednapahulaya3999 Před 7 lety

    kindly tell me what are the materials

  • @MinecraftMineturtle
    @MinecraftMineturtle Před 6 lety +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 Před 6 lety

      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 Před 4 lety

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

  • @lis610
    @lis610 Před 7 lety +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 Před 6 lety

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

    • @marcinwojcik9159
      @marcinwojcik9159 Před 6 lety +1

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

    • @Orionsarc12
      @Orionsarc12 Před 6 lety +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!

  • @kingblue588
    @kingblue588 Před 5 lety +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 Před rokem

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