Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

NTC thermistor interface to MCU

Status
Not open for further replies.

mshh

Full Member level 6
Joined
May 30, 2010
Messages
349
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,296
Location
usa
Activity points
3,871
I read temperature using NTC 10k ,beta 3950 and connect resistance 10k in series but it is n't accurate for more than 5 degrees, how to get accurate readings for wider range.
here is the conversion and co coefficient i used
Code:
int Vo;
float R1 = 10000;
float logR2, R2, T;
float c1 = 1.009249522e-03, c2 = 2.378405444e-04, c3 = 2.019202697e-07;

Vo = analogRead(ThermistorPin);
  R2 = R1 * (1023.0 / (float)Vo - 1.0);
  logR2 = log(R2);
  T = (1.0 / (c1 + c2*logR2 + c3*logR2*logR2*logR2));
  T = T - 273.15;
  T = (T * 9.0)/ 5.0 + 32.0;
 

Attachments

  • ntc.png
    ntc.png
    23.9 KB · Views: 349

Re: ntc thermistor interface to MCU

Hi,

for precise readings you first need to setup the hardware correctly.

* Use a 1uF ceramics capacitor from ADC0 to AGND, close to the uC.
* use VCC --> 10R --> AVCC
* and 10uF (best ceramics) from AVCC to AGND, close to the uC
* be sure VCC is stable, use a scope.

****
Then according I think it should be:

R2 = R1 * (1024 / Vo -1)

Where R1 = the externally used known resistor --> 9250 instead of 10000

****

I didn´t check the rest of your math.

Klaus
 

Re: ntc thermistor interface to MCU

Hi,


* use VCC --> 10R --> AVCC

Klaus
what do you mean by 10R?

- - - Updated - - -

I used external resistor 9250 which make the reading close to what expected. if i use 10000 MCU reads 44 C in stead of 40 ( deviation 4 degrees)
 

Re: ntc thermistor interface to MCU

Hi,

what do you mean by 10R?
A resistor with the value "10 Ohms".

See figure 96 of the datsheet.

Instead of the undamped LC (which causes a resonance at 160kHz)
I rather use the 10R / 10uF lowpass filter of 1600Hz ... without resonance.

Klaus
 

Re: ntc thermistor interface to MCU

but it is n't accurate for more than 5 degrees
Question: Is the problem really of acuracy or fluctuation of the measured value along time? If acuracy, the resolution of the problem would go through the fine adjustment of the calibration parameters c1, c2, c3. However, if the problem is of measured value not being steady, my bet is that you are probably not subjecting the sensor to an environment with a stable temperature; if that is the case, consider implementing some bulky mass apparatus, so that the specific heat capacity of the measured body (e.g., metal bar) tends to remain stable over time, filtering out small thermal oscillations.
 

Re: ntc thermistor interface to MCU

It's not actually clear if the original post is talking about limited accuracy of the NTC sensor or errors of the ADC and measurement circuit. You don't specify a NTC type, so we can only guess about the accuracy. Down to +/- 1 K initial accuracy is available for popular industrial NTC, e.g. from Vishay.
 

I did simulation in proteus, there is a display with the ntc which shows a temperaturre value and the lcd connected to the mcu displays another value. Connection As shown in the attched picture, it is 31 on ntc display but 32 on mcu lcd

- - - Updated - - -

Let me elaborate. What should i expect when i connect ntc 10k in series with 10k resistor.
Is this enough to linearize it. If so what is the linearized range?

- - - Updated - - -

What is the expected accuracy in temperature? All i know about my ntc is 10k and Koefficient B (25 C/50 C): 3950
Accuracy: ±1%
Temp. Range -40 C to 200 C
 

Attachments

  • ntc1.jpg
    ntc1.jpg
    75.1 KB · Views: 711
Last edited:

and connect resistance 10k in series but it is n't accurate for more than 5 degrees

Do you mean an inaccuracy of ±5°C or is it the total deviation ?
And more, is your volt meter calibrated, and if yes, at which tolerance?
Are you considering the device inacuracy on the above result?

What should i expect when i connect ntc 10k in series with 10k resistor

Once you are performing linearization by mathematical function, perhaps this will be not usefull, this would reduce the resolution of the measurement and inrease the noise/signal ratio.
 

I need accurate sensor, 0.2 degree is critical. could the NTC do this?
 

Before anything else, please define "wide temperature range". How wide?
0 to 100C?
-40 to 125C?
or what?

For 0.2 degree accuracy (I would assume it is Celsius, you have not specified), a simple NTC thermistor sensor simply will not make it.

A thermocouple will have an even worse error budget.

You'll require either a three or four wire PT100 or PT1000 sensor, with the proper front-end amplifier conditioning, like a MAX31865. Send the data your processor via SPI.

Adafruit has a breakout board for it: https://www.adafruit.com/product/3328

I know, I know, they are expensive. But is either that or you will have to relax your requirements. I.e., the 0.2 degree accuracy to be only available for a narrow range AND after calibration vs. a known reference, and relax the accuracy requirements for wider ranges.
 

Curiously you are adding more and more demanding specifications, first -40 to 200 °C temperature range, then something like 0.2° accuracy. Achieving similar performance with an off-the-shelf NTC is impossible, even the best Pt100 or Pt1000 accuracy class has difficulties. Similarly an ATmega ADC is far from providing sufficient accuracy.

My suggestion:
- fix your specification
- identify sensors with suitable accuracy
- design a measurement circuit that can support it
 

but thermistor is more accurate than pt100. i need to measure in range 35 to 39 with accuracy 0.2 like this one **broken link removed**
 

If you only require to measure a span of only 35 to 39 C, then you could in theory achieve the desired 0.2C by performing a two point calibration, in addition to the linearization equation.
But then you must have a pair of temperature sources that on their own are more accurate than 0.2C, to perform the two point calibration.

Also...the reference voltage to the microcontroller would have to be highly accurate and stable.

"but thermistor is more accurate than pt100." Who told you such a lie? Thermistors have hysteresis, whereas a PT100 does not. Granted, if your temperature span is only 4C, then the hysteresis could be neglected.
 

conclusion on omega said that Conclusion:.https://www.omega.co.uk/temperature/z/thermocouple-rtd.html

Below that temperature, thermistors are often preferred when accuracy is important. RTDs, on the other hand, are chosen when tolerance (i.e. resistance) is important. In short: thermistors are better for precision measurement and RTDs for temperature compensation

- - - Updated - - -

.

"but thermistor is more accurate than pt100." Who told you such a lie? Thermistors have hysteresis, whereas a PT100 does not. Granted, if your temperature span is only 4C, then the hysteresis could be neglected.

also this site said that thermistor is more accurate https://www.bapihvac.com/application-note/thermistor-vs-rtd-temperature-measurement-accuracy-application-note/
 

There's no need to argue. Please report if you have found an off-the-shelf thermistor with suitable accuracy for the -40-200 °C range. For the time being, I'm continuing to use RTD for similar applications.
 

ok , what is the accuracy of RTD you used and how did you assure it? do you have another calibrated reference?
 
Last edited:

hello,

RTD are used in industrial environment
and follow Datasheet rules
differents classes of RTD A,B,C .. differents prices and accuracy
read theses doccuments to be inform about it..

Sonde PT1000, Classe B, 10mm, 2 fils, Platine ~7€

CLASSE B ± 0,30ºC
CLASSE A ± 0.15ºC
1/3 DIN ± 0,10ºC
1/10 DIN ± 0.03ºC cost *100 !

But the sensor itself is not enough !
Transducer is an important device in the measurment chain.

Also length of cable to connect the RTD ..
RTD mode of connection 2 wires (worth case) 3 wires 4 wires ...

RTS is quite linear in a short range
calibrating resistors (Fer-constantant) are used to pre-calibrate the chain measure.
(very costly!)
or a specific calibrator ( out of scope for an hobyste)

you can choose also PT1000
to reduce the effect of wires resistance
in 2 wires mode..
and get delta about 38,5 ohms/100°C

CTN Thermistors are also used , to get a high resolution Temperature measure
but needs a calibration between 2 points ( the usual range to measure)
there are 2 families
CTN for hobyste : low cost, dispersion of caracteristics between sensors
CTN for Industries: high cost, datasheet , more interchangeable sensor
 

There's no need to argue. Please report if you have found an off-the-shelf thermistor with suitable accuracy for the -40-200 °C range. For the time being, I'm continuing to use RTD for similar applications.

You are correct. I will stop the argument.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top