No video

NTC thermistor thermometer with STM32/Arduino

  Рет қаралды 17,759

Curious Scientist

Curious Scientist

Күн бұрын

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

Пікірлер: 41
@andpe161
@andpe161 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 3 жыл бұрын
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 Жыл бұрын
What do you mean? Everything can be found in the video, just follow it.
@mrdark250
@mrdark250 Жыл бұрын
​@@CuriousScientist oh hey no your video is perfect, I was asking the commentator about the averaging part
@CuriousScientist
@CuriousScientist Жыл бұрын
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.
@isidoromaich7226
@isidoromaich7226 3 жыл бұрын
What should I say? your videos are awesome, period :) thanks
@CuriousScientist
@CuriousScientist 3 жыл бұрын
Thank you very much! I try to provide quality content.
@Eng.AwsNafea
@Eng.AwsNafea 3 жыл бұрын
it was very helpful .. Thank youuu
@CuriousScientist
@CuriousScientist 3 жыл бұрын
Thank you, I am glad to hear it!
@alyaaahmed4462
@alyaaahmed4462 2 жыл бұрын
thank you sooooo much ":)
@CuriousScientist
@CuriousScientist 2 жыл бұрын
Glad to help!
@onurkaganyigit9619
@onurkaganyigit9619 8 ай бұрын
Great video. Can you publish the code for STM32?
@CuriousScientist
@CuriousScientist 8 ай бұрын
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 жыл бұрын
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.
@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 жыл бұрын
If you pay me, sure. Sorry, but I am not a free support service, I don't make videos on request.
@HBrsz
@HBrsz 2 жыл бұрын
@@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.
@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 Жыл бұрын
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: kzbin.infoagSo0DbPPpY?feature=share
@CuriousScientist
@CuriousScientist Жыл бұрын
Put a 10 nF ceramic capacitor between the thermocouple input terminals.
@stefantapavica5180
@stefantapavica5180 6 ай бұрын
Can it works with 2.9 power supply?
@CuriousScientist
@CuriousScientist 6 ай бұрын
2.9 what?
@stefantapavica5180
@stefantapavica5180 6 ай бұрын
@@CuriousScientist +2.9 V power supply for NTC
@CuriousScientist
@CuriousScientist 6 ай бұрын
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 Жыл бұрын
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
@CuriousScientist
@CuriousScientist Жыл бұрын
Go to the next video then. :)
4 channel temperature logger based on the DS18B20 sensors
36:41
Curious Scientist
Рет қаралды 12 М.
Fortunately, Ultraman protects me  #shorts #ultraman #ultramantiga #liveaction
00:10
Logo Matching Challenge with Alfredo Larin Family! 👍
00:36
BigSchool
Рет қаралды 19 МЛН
Electronics tutorial - Common Temperature sensors
15:30
FesZ Electronics
Рет қаралды 5 М.
Top Fifteen Mistakes People Make When Designing Prototype PCBs
12:26
Cosplay Light and Sound
Рет қаралды 145 М.
Fun with Transistors
24:33
HackMakeMod
Рет қаралды 191 М.
Power Supplies and Electronic Life-Hacks (ElectroBOOM101 - 009)
14:37
ElectroBOOM
Рет қаралды 1,5 МЛН
NTC resistor in ESP32 with ESPHome
13:51
La Choza Digital
Рет қаралды 2 М.