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...
Tried on Arduino UNO, need some adjustment for precision but IT WORKS! Many thanks!
I'm glad to hear it works! Enjoy!
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.
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.
Hi um could you explain exactly how I can achieve this? My stm32 adc concepts are a bit weak
What do you mean? Everything can be found in the video, just follow it.
@@CuriousScientist oh hey no your video is perfect, I was asking the commentator about the averaging part
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.
it was very helpful .. Thank youuu
Thank you, I am glad to hear it!
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.
If you pay me, sure. Sorry, but I am not a free support service, I don't make videos on request.
@@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.
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.
What should I say? your videos are awesome, period :) thanks
Thank you very much! I try to provide quality content.
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.
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.
@@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
Put a 10 nF ceramic capacitor between the thermocouple input terminals.
Great video. Can you publish the code for STM32?
Thanks! Have you even watched the video? Or read the video description?
Show an error copy/paste the code:
exit status 1
'PA0' was not declared in this scope
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.
thank you sooooo much ":)
Glad to help!
Can it works with 2.9 power supply?
2.9 what?
@@CuriousScientist +2.9 V power supply for NTC
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.
Can I use this in Arduino Uno at mega 328?
Sure, just be careful with the definition of the pins.
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 😦
All information is in the video and I even provided the schematics on my webpage. Check everything carefully.
The schemetic is of other board sir 😶, so i am confused sir
The purpose of the pins doesn't change. Pick an analogue pin for the NTC and use the i2c pins for the display.
too long
Go to the next video then. :)