China sensor manufacturers

China Temperature Sensor & Thermistor manufacturer

Conventional method of collecting temperature using an NTC thermistor

This article provides a more conventional method of collecting temperature using an NTC thermistor. First, an NTC thermistor having a resistance value of Rn=10K and a thermal index of B=3950 is used when the rated temperature Tn=25°C. The method of collecting temperature using a thermistor is very simple, as shown in Figure 1. ADC_Temp enters the ADC6 port of the chip, using the AVR 8-bit chip Atmega48. The chip converts the thermistor resistance value by detecting the voltage of the voltage divider circuit to obtain the actual temperature value. As shown below:
Schematic diagram of NTC thermistor temperature acquisition circuit
Figure 1 Schematic diagram of NTC thermistor temperature acquisition circuit

The resistance and temperature of the thermistor are as follows:
Resistance and temperature calculation formula
Programmers can use Excel or other software to obtain the relationship between resistance and temperature by using the above relationship, or directly use the form provided by the seller with the thermistor. In fact, what we need is the relationship between AD value and temperature. From the chip data, it can be understood that the voltage corresponding to the 0-5V AD value is from 0-1023. To make a graph, you can get the following relationship curve:
AD value and temperature curve
Figure 2 Temperature and resistance curve     Figure 3 Temperature and AD worthy relationship curve
The above outlines an idea. Here is the post program.
First, the temperature and AD values should be posted.
Temperature and AD value table

In the above table, NTC_fdb represents the AD value corresponding to i degree. PROMEM defines the table data in the flash space.
The actual temperature value can be obtained by the position of the acquired AD value in the table.
Initialization is required before using the ADC.
ADC initialization procedure

The subfunctions that read the AD values are as follows:
AD value read subfunction

So how do you use the above subfunctions?
Very simple. Just use the following statement: temp_value=GetNTCTemperature(adc_read(ADC_TEMP));
PREV:Design of Protection Circuit Diagram for Temperature Measurement Microcontroller of SMD NTC Thermistor
NEXT:How to use NTC thermistor to limit surge current?

RELATED POSTS




Skype

WhatsApp

WangWang

QQ
Email me

Mail to us