NTC thermistor thermometer with STM32/Arduino

Поделиться
HTML-код
  • Опубликовано: 14 окт 2024
  • In this video I show you how to use a NTC thermistor as a thermometer. It is a very simple and relatively accurate way to measure the temperature. The temperature range is quite good for normal use, you can typically go between -50°C to 250°C, but this value can be different based on the exact unit you are using. All you need is a microcontroller, a 10 k resistor and a 10 k NTC thermistor to acquire values. The circuit and the code works both with Arduinos and STM32F103C8T6 (blue pill) circuits. STM32 is a better choice for this task because of its better ADC resolution. Nevertheless, the project works just fine using an Arduino.
    Please don't forget to subscribe to my channel!
    Source code and schematics: curiousscienti...
    If you want to support my work, please consider buying the parts using my affiliate links:
    curiousscienti...

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

  • @robertoklein6265
    @robertoklein6265 19 дней назад

    Tried on Arduino UNO, need some adjustment for precision but IT WORKS! Many thanks!

  • @andpe161
    @andpe161 4 года назад +3

    A circuit like this is easy to set up, but watch out for the inaccuracy of the thermistor specifications. Several factors will decrease the temperature accuracy for very low and very high temperatures. As you mentioned, an ice bath is a good way to get a fixpoint reading. Regarding STM32, its ADC has at least 2 bits of noise, so averaging multiple readings is a good idea to gain usable resolution.

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

      Great remarks, thanks! Yes, the accuracy is not as good around the extreme values. Also, I often see that people are just using a linear equation for the resistance vs. temperature relationship. Here, I tried to use the logarithmic formula to get better results. Averaging is also a great idea! STM32 is faster than the Arduino (72 MHz instead of 16 MHz), so for general tasks we could not even notice any drop in speed for averaging a lot of readings.

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

      Hi um could you explain exactly how I can achieve this? My stm32 adc concepts are a bit weak

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

      What do you mean? Everything can be found in the video, just follow it.

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

      ​@@CuriousScientist oh hey no your video is perfect, I was asking the commentator about the averaging part

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

      It is a basic averaging of the readings there's nothing special about it. Do let's say ten readings in a for() loop, in each iteration sum the readings and then after the for() loop is ended, divide the sum by the number of iterations. Simple.

  • @Eng.AwsNafea
    @Eng.AwsNafea 3 года назад +1

    it was very helpful .. Thank youuu

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

    Can you please make a video on how we can cutoff the voltage/current when a certain temperature is reached? This is useful when working with batteries. I can't find a lot of information on this.

    • @CuriousScientist
      @CuriousScientist  2 года назад +1

      If you pay me, sure. Sorry, but I am not a free support service, I don't make videos on request.

    • @HBrsz
      @HBrsz 2 года назад +1

      @@CuriousScientist You could've just said "Sorry, I don't make videos on request. Have a look into....". There's no need for derisive comments. Thanks for your video. Keep well.

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

      It was not my intention to make a derisive comment, sorry if it sounded like one. I get several requests on a daily basis for making videos or help people with their projects. Huge majority of them never mention that they would compensate me in any way, they just expect help from me. Therefore, I have to make it clear that I am willing to invest my time and resources to help and support but it comes with a price. My free time is valuable.

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

    What should I say? your videos are awesome, period :) thanks

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

      Thank you very much! I try to provide quality content.

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

    Hellos sir, can we use for ultra low temperature? I already try the max31855 as you suggest, but fail to get good result. I need to measure -100 degree celcius. Hope you can help to suggest.

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

      NTCs cannot go that low. However, the module you mentioned should be able to reach such low temperature even with a k-type thermocouple. I don't know why you cannot reach that temperature, I don't know anything about your setup.

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

      @@CuriousScientist thanks for your very quick response and advise sir. I already use the max31855 with ktype thermocouple. I would like to share the short video, hope you don't mind to give the suggestion/ idea what to improve. Currently waiting for max31865 module to test with rtd as what you share sir. Appreciate your comment very much.
      Link: ruclips.net/user/shortsagSo0DbPPpY?feature=share

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

      Put a 10 nF ceramic capacitor between the thermocouple input terminals.

  • @onurkaganyigit9619
    @onurkaganyigit9619 10 месяцев назад

    Great video. Can you publish the code for STM32?

    • @CuriousScientist
      @CuriousScientist  10 месяцев назад

      Thanks! Have you even watched the video? Or read the video description?

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

    Show an error copy/paste the code:
    exit status 1
    'PA0' was not declared in this scope

    • @CuriousScientist
      @CuriousScientist  2 года назад +1

      The error code is obvious, you need to declare PA0. You probably failed to copy a curly bracket or something. Do not only copy-paste, try to learn as well.

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

    thank you sooooo much ":)

  • @stefantapavica5180
    @stefantapavica5180 7 месяцев назад

    Can it works with 2.9 power supply?

    • @CuriousScientist
      @CuriousScientist  7 месяцев назад

      2.9 what?

    • @stefantapavica5180
      @stefantapavica5180 7 месяцев назад

      @@CuriousScientist +2.9 V power supply for NTC

    • @CuriousScientist
      @CuriousScientist  7 месяцев назад

      It should be OK. Nearly ideal if your ADC measures up to 3.3 V, and not so ideal if you ADC measures up to 5 V.

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

    Can I use this in Arduino Uno at mega 328?

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

      Sure, just be careful with the definition of the pins.

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

      Thank u sir , besides this i had a question abt the pinning, as u said to be careful , can you tell me like which pining is for thermistor ?, I got the lcd connection,if u you help me with the thermistor connection sir 😦

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

      All information is in the video and I even provided the schematics on my webpage. Check everything carefully.

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

      The schemetic is of other board sir 😶, so i am confused sir

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

      The purpose of the pins doesn't change. Pick an analogue pin for the NTC and use the i2c pins for the display.

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

    too long