Hi!
I'm making a DIY temperature sensor just for a school project. I'm trying to figure out how to make the sensor as accurate as possible. I'm using the little black 10 k thermistor connected in voltage divider formation with a 10k resistors. My code just uses the steinhart equation and averaging, but it's super 1-2 degrees off. I would like to be 0.3-0.1 degrees off. Does anyone have any suggestions to improve accuracy?
It is very easy with a normal calculation to be 1 or 2 degrees off in a certain range. Every good quality NTC comes with a datasheet and the numbers for the calculation.
Do you know the numbers that belong to that NTC thermistor ?
Can you measure the 10k resistor ? So you can use its value in the calculation.
You could specify a temperature range (which is not too big) and do some measurements within that range. There are websites that can do a curve fitting for a NTC.
Are you using a breadboard ? They have often bad contacts.
How many samples do you use for the average ?
This is how I take the average average of many samples.
Do you use 1024 and also the half-a-bit ?
How is it connected ? When the reference of the Arduino is set to 5V (default) then the 10k resistor should be connected also to that same 5V.
When for example you have a GND wire to a breadboard, and there is something else on that breadboard (for example a led), then it is impossible to get a accurate value.
Are you using a basic Arduino board with a AVR microcontroller (accurate) or a ESP processor (not accurate) ?
Are those Fahrenheit or Celsius degrees ?
The common DS18B20 is ±0.5°C accurate.
A number of manufacturers make very accurate sensors. You can find some of them at tindie.com : https://www.tindie.com/products/closedcube/max30205-01degc-human-body-temperature-sensor/.
Can you show your sketch and a photo of your project (a photo that also shows the wiring) ?
Maybe your NTC even has a table of resistance for each degree C. Linear interpolation between those points will give very good results as well.
The answer to your accuracy requirements is probably a DS18B20, not a thermistor. At room temperature you can expect 0.1C or so, the 0.5C figure is across a large temperature range. I've tested a dozen of them and seem about 0.1C standard deviation between the units which is very good.
Don’t forget there will be errors in how you determine that 1-2C error , you need to work out what those errors are . What is the error of your measurement reference ?
Don’t forget water boils at a temperature dependant on its purity and altitude .
Koepel:
It is very easy with a normal calculation to be 1 or 2 degrees off in a certain range. Every good quality NTC comes with a datasheet and the numbers for the calculation.
Do you know the numbers that belong to that NTC thermistor ?
I do not know have the data sheet
Koepel:
Can you measure the 10k resistor ? So you can use its value in the calculation.
I measured the resistor and got 9.6. I inputted this value into my code.
Koepel:
You could specify a temperature range (which is not too big) and do some measurements within that range. There are websites that can do a curve fitting for a NTC.
The temperature range is 0-75 C, which is smaller than the thermistor's range
Koepel:
Are you using a breadboard ? They have often bad contacts.
I am using a breadboard, but it's required
Koepel:
How many samples do you use for the average ?
This is how I take the average average of many samples.
Do you use 1024 and also the half-a-bit ?
I take about 20.
Koepel:
How is it connected ? When the reference of the Arduino is set to 5V (default) then the 10k resistor should be connected also to that same 5V.
When for example you have a GND wire to a breadboard, and there is something else on that breadboard (for example a led), then it is impossible to get a accurate value.Are you using a basic Arduino board with a AVR microcontroller (accurate) or a ESP processor (not accurate) ?
Are those Fahrenheit or Celsius degrees ?
That point is good to keep in mind. I will change my circuit. I do not know what type of microcontroller is it, but it's an official arduino uno.
Koepel:
The common DS18B20 is ±0.5°C accurate.
A number of manufacturers make very accurate sensors. You can find some of them at tindie.com : https://www.tindie.com/products/closedcube/max30205-01degc-human-body-temperature-sensor/.Can you show your sketch and a photo of your project (a photo that also shows the wiring) ?
digital sensors aren't allowed.
The Arduino Uno has a ATmega328P microcontroller from the AVR family of microcontrollers. It's ADC (Analog to Digital Converter) is pretty good. It is only 10 bits, but it is accurate.
You can take more samples for the average. With more samples and the help of some noise it is possible to get beyond the 10 bits and get a little more accuracy.
The 0 ... 75 °C range is large. With such a large range, it might be the formula that is causing the problem. For such a large range, everything has to be exactly spot on for the formula. Can you get a better thermistor that comes with a datasheet ? Do you live at sea level ? Then you can make boiling water and water with melting ice for 0 °C and 100 °C. Use demineralized water. Or if you have a accurate temperature meter, then you can take, for example, 20 samples in that range.
For a NTC thermistor and such a large range, it is normal to have a lot of difficulty to make it accurate. I think that all of us would have the same problem.
I do not have a 10k resistor that is so far off. Are you sure it is 9.6k ? A metal film resistor is more accurate and has a lower temperature coefficient than a carbon film resistor.