Experimenting with a thermistor using PIC16F1937

Summary of Experimenting with a thermistor using PIC16F1937


Summary: I received a batch of 10K thermistors and needed to determine whether they were NTC or PTC and map their resistance-versus-temperature characteristic. Using a PIC16F1937 microcontroller, a DS1621 temperature sensor, and a 10K reference resistor in a voltage divider, I logged ADC readings while exposing the thermistors to temperatures from about 0°C to 50°C using ambient air, a thermal gun, and a refrigerator. The collected measurements allowed plotting the thermistor resistance/temperature curve and identifying its type.

Parts used in the Thermistor Characterization Project:

  • PIC16F1937 microcontroller (or any PIC with ADC)
  • DS1621 temperature sensor
  • 10K fixed resistor (for voltage divider)
  • 10K thermistors (batch of sensors under test)
  • Breadboard and wiring
  • Power supply for the circuit
  • Thermal gun (heat source)
  • Refrigerator (for low temperature measurements)
  • Display to show readings

Recently i won a bid for a batch of 10K thermistors. The only thing that i knew when i got them in my hand, was that those things are 10K thermistors. As far as i know, the 10K nominal resistance is at room temperature (25�C). But i had to find out if these are PTC or NTC, and also i had to draw their resistance to temperature characteristic line, otherwise they would be useless to me. So i ran some experiments with them…

thermistor

A thermistor is actually a part that changes its resistance with the temperature change. There are namely 2 types of thermistors, the NTC and the PTC. The ‘T’ and ‘C’ stands for “Temperature” and “Coefficient”. The “P” stands for “Positive” and “N” for “Negative”. So, a NTC will decrease its resistance while the temperature rises, and a PTC will do the opposite.

Also, there are linear and non-linear thermistors. The old thermistors were uusually non-linear. This means that the resistance does not change linear to the temperature. That was a headache for taking measurements and the labs developed very linear sensors that are widely used nowadays. Every sensor should have a temperature to resistance characteristic diagram. But what i got was only a batch of sensors and nothing more.

What i had to find out was the type of the thermistors (PTC or NTC), and the resistance to temperature change characteristic.

The experiment

For this, i will use a PIC microcontroller. I chose the 16F1937 because… i had it already mounted on a breadboard. Actually, any other PIC with analog to digital conversion capability would do just fine. Then i connected a DS1621 temperature sensor. These sensors have an outstanding measuring accuracy.

Then i used a 10K resistor to create a voltage divider with the thermistor. According to the standard specifications of thermistors, when it is in room temperature (25�C) it should have its nominal resistance, which in my case it is 10K. So, the output of the voltage divider should be 2.5 Volts. The PIC will measure this analog value. It then will get a binary 8-bit number from 0 to 255, representing this voltage.

The idea is to get as much measurements as possible for different temperatures. The more the measurements, the higher the accuracy. But this is not all. To have an overall image of the characteristic of the thermistor, i need to have a wide range of temperatures. The wider the temperature range, the better the accuracy of the characteristic. This is not easy though. I had to find a way to measure from very low temperatures (as low as 0�C) to high temperatures up to 50 �C. I do not really have device to do this, so i had to find different ways.

First of all the external ambient temperature. Today we had temperatures from 17.5�C up to about 22�C. This is a nice way to start. Then i used a thermal gun to increase gradually the temperature up to 50�C. My thermal gun has an electronic adjustment. I hang it over the circuit at about half a meter away and let it run with different setting every time. With this way, i had a batch of nice stable measurement up to 50�C.

The hardest part was the lower temperatures. the only thing available in my house that could work was the refrigerator. And this is exactly what i did. I put the circuit in the refrigerator while in operation. Every one hour i opened the door and quickly note the readings on the display. Then i slightly changed the setting of the refrigerator and repeated this process. It did work!

 

For more detail: Experimenting with a thermistor using PIC16F1937

Quick Solutions to Questions related to Thermistor Characterization Project:

  • How did you determine whether the thermistors are PTC or NTC?
    By measuring resistance change with temperature using the PIC ADC and observing whether resistance increases or decreases as temperature rises.
  • What setup was used to measure the thermistor resistance versus temperature?
    A voltage divider with a 10K fixed resistor and the thermistor, measured by a PIC16F1937 ADC while monitoring temperature with a DS1621 sensor.
  • Can any PIC be used for this experiment?
    Yes, any PIC microcontroller with analog-to-digital conversion capability would work; PIC16F1937 was chosen because it was available.
  • What temperature range was covered in the measurements?
    Measurements were taken from about 0°C up to 50°C.
  • How were higher temperatures achieved for the test?
    Higher temperatures up to 50°C were produced using a thermal gun positioned above the circuit with adjustable settings.
  • How were lower temperatures achieved for the test?
    Lower temperatures were achieved by placing the powered circuit inside a refrigerator and periodically recording readings.
  • How is the nominal 10K resistance at 25°C used in the measurement?
    The thermistor nominal 10K at 25°C forms a voltage divider with the 10K fixed resistor, producing about 2.5 V expected at room temperature for ADC measurement.
  • How are ADC readings interpreted for resistance?
    The PIC reads the divider output as an 8-bit value from 0 to 255 representing the measured voltage, which is then used to compute resistance versus temperature.

About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter