Hello Everyone, I am working on a project and am pretty new to Arduino.
My project is pretty simple and is basically to read temperature from about -30°c to +50°c using a thermal couple. I am borrowing a pretty powerful 'Digital thermometer 343 by Test Products Intl' to use a reference/calibration.
My issue is that my current set up is not accurate or precise. Current outputs jumps around by 6°c, between 11°c and 17°c in a span of 1 second at room temp. The reading is also about 10c below what the thermometer is giving me, 24°c at room temp. Not sure if this is due to the code, noise, analog amplifier, or the thermal couple itself (would digital amplifier, like MAX31855 or MCP9601 be better?)
Does anyone know how I can get more precise readings, that do not jump from by 6°c. If possible I could I get readings of about +-0.1°c. Are there any amplifiers/thermal couple recommendations that can achieve this for Arduino?
#define TC_PIN A0;
float reading;
void loop()
{
reading = analogRead(TC_PIN);
Serial.println(((((reading*.0048)-1.25)/.005))+10); //+10c due to being to low
}
ANY electronic measuring device requires calibration against the readings of a standard. You are using the digital thermometer as a standard, so YOU need to make a calibration difference adjustment for as many points as you want from ice cold to boiling. Then code using those differences to adjust your thermocouple readings.
In my experience thermocouples (and related electronics) are finicky...
On the one hand, the voltage they put-out is determined by physics (infallible laws of nature). And they can withstand high temperatures so they are well suited for ovens, etc. And at higher temperatures you get more voltage and that means a better signal-to-noise ratio.
On the other hand, they put-out tiny voltages so you need a high-gain amplifier. And high-gain amplifiers will amplify any noise, as well as any noise generated by the amplifier itself, and noise that sneaks-in through the power supply. You can also get drift, which is essentially slow or low-frequency noise.
Your temperatures aren't that high so a solid state temperature sensor (analog or digital) may be a better solution.
I don't know if the Adafruit has any filtering built-in, but your digital thermometer certainly does.
Some low-pass filtering or software "smoothing" may help with the noise/instability.
I was just playing around with your formula and (if I did the math correctly) when I changed the raw reading by 1-count the temperature changed by nearly 1 degree. So that's as much precision as you're going to get. But go-ahead and double-check that.
I do not know much about solid state temperature sensors but from a quick google search seems it would still use tiny voltages, does that mean I would still get noise? Also would I be able to use the solid state temp sensor with a long wire similar to thermal couple wire or would I get more noise from that aswell?
Can you please post a copy of your circuit a picture of a hand drawn circuit in jpg, png?
Hand drawn and photographed is perfectly acceptable.
Please include ALL hardware, power supplies, component names and pin labels.
How have you got the gnds of all your peripherals connected.
Make sure the thermocouple amplifier gnd is connected directly to the controller and does not share a gnd circuit to the controller.
Can you please post some images of your project so we can see your component layout?
I would not use a thermocouple over this range - the output is tiny and bi directional ( hard to deal with ) and you have a big reliance on the accuracy of the cold junction compensation.
Have a look at a prt , or if you really don’t need -30 , a ds18b20.
With hobby stuff If you get +- 0.5C accuracy you are doing very well.
Be aware of calibration errors !! Your reference is only a cheap thermometer with +- 1.6C error over your range of interest , so you have no chance of calibrating to +- 0.1 C ( which is a hugely tight spec )
The link below is for and instrument which will hold its +- 0.05C accuracy for a year…..
I agree with Hammy, that is a tiny range for a thermocouple. They excel at high temperatures and wide ranges.
You know a silicon diode junction has a temperature response of about -2mV/C? Put about 1mA through it. Use the internal 1.1V reference, that gives you about 1mV per count which is roughly 2 counts per C. You can increase the resolution by using oversampling, then scale to degrees C.
You can calibrate with ice water and boiling water. Make sure you use steam distilled water.
Found my issue to be as @DVDdoug mentioned. I needed a better filter or "smoothing" to reduce noise. I already had a filter however i only took the avg value of about 10 readings. I got better results when increasing to about 100 readings.
I also noticed the values are worse (30c value at 20c temp) when adding more components like Servo motor but will have to worry about that later.
When you’ve sorted all that look at the spec of your reference :
3°F(±1.6°C) from:
-58°F to 32°F (-50°C to 0°C)±0.3% of rdg
+1.8°F (1°C) from:
32°F to 1,100°F (0°C to 600°C)
So you can always be upto a degree C either side of the true temperature .
You can’t get anywhere near 0.1 C with that or with hobby components used in your circuit .