NTC temperature measurement
| |

NTC v/s PTC Difference And Applications

NTC and PTC are known as thermistors, which can be further known as temperature-controlled resistance. Now something is related to resistance but how it works and which type of circuits can be designed using these components. Let’s know the working concept and then we will use them practically.

thermistor.jpg

The value of these thermistors is not linearly change with the temperature. The manner in which the resistance of a thermistor decreases is related to a constant known in the thermistor industry as beta (β). Given by:

ice_screenshot_20220806-163726.png

Where: Rt1 = Resistance at Temperature 1 Rt2 = Resistance at Temperature 2 T1 = Temperature 1 (K) T2= Temperature 2 in (K)

NTC (Negative temperature Coefficient):

mini_20220806_102328.jpg

An NTC thermistor is a temperature sensor that uses the resistance properties of ceramic/metal composites to measure the temperature. Our full spectrum NTC sensors offer many advantages in temperature sensing including miniature size, excellent long-term stability, high accuracy and precision.

ice_screenshot_20220301-122600.png

This project is sponsored by JLCPCB, one of the leading PCB manufacturer form china. JLCPCB provides the good quality FR4 2layer PCB in just $2 for 5pcs. To know more about the services like PCBA, STENCIL making and 3D-printing then visit JLCPCB now. Sign-up using this link and get free coupons of worth $54 to place the order.

PTC (Positive Temperature Coefficient):

PTC thermistors are resistors with a positive temperature coefficient, which means that the resistance increases with increasing temperature. PTC thermistors are divided into two groups based on the materials used, their structure, and the manufacturing process. A PTC thermistor is a thermally sensitive resistor used in a circuit for its protection. A PTC fuse is used to protect electronic devices when heat or excessive current is produced.

Heating and cooling test of both thermistors:

My Video16.gif

Let’s now see how the resistance actually varies with increase/ decrease in temperature. We can directly put them on fire but keeping the safe side I am using my soldering iron and ICE for these two tests here.

My Video19.gif

For the NTC the value of resistance goes down as it comes in the contact of heated soldering iron and increase rapidly when tested with ICE.

My Video17.gif

The same thing should be featured by PTC but in reverse. But the particle approach is something different. The resistance increases on heating but remains constant when tested in colder region. That’s why the NTC is preferred to use a temperature monitoring device. We can use PTC as a reusable fuse. The proper demonstration about fuse action is given below.

My Video20.gif

Working of PTC:

As we know resistance increase on heating, and PTC got heated if the excessive current flow through it. Which cuts the power connection, here I connected an LED in series with PTC and after heating a little bit the resistance goes up and thus turn off the LED.

My Video18.gif

But after some time, the LED start glowing again, when temperature comes down. This is what makes PTC a reusable fuse. Other type of fuses is only one-time devices but in modern electronics systems PTCs are used in the place of fuses.

Working of NTC as a temperature monitoring device:

ice_screenshot_20220806-104925.png

The value of NTC is not linear with temperature, it gives a logarithmic curve as stated above. Which is modified in the Arduino code. Here we are using a 10k NTC in voltage divider configuration with a 10k resistor.

How to make Measure Temperature using Arduino and NTC Thermistor.png

Components required:

1) NTC 10K

2) 10K resistor

3) 16X2 LCD

4) Arduino

5) 10k potentiometer

6) LEDs, buzzer and connecting wires

7) Custom PCB.

Circuit diagram:

adf.png

In the circuit, when the temperature reaches high the red led glow with buzzer. Green led is the indication of normal temperature. Temperature values in celsius and fahrenheit are available on screen. 10K Potentiometer is used to adjust screen contrast.

PCB FILES:

Then I designed the designed the schematics according to the modified schematics in EasyEDA and made the PCB fabrication Gerber files from there.

ice_screenshot_20220806-212529.png

I am using JLCPCB pcb prototyping, SMT assembly and stencil service since 2020 for my projects. The quality is very high as compared to price, $2 for 5pcs 2layer PCB and SMT assembly starting from $8.

Code explanation:

Initialize all the libraries, and I/O pins with constants/variables.

#include <LiquidCrystal.h> //Libraries
LiquidCrystal lcd(2, 3, 4, 5, 6, 7); //Arduino pins to lcd

#define ThermistorPin A0 // for Arduino microcontroller
long ADC_Value;
float R1 = 10000; // value of R1 on board
float logR2, R2, T;

//steinhart-hart coeficients for thermistor
float c1 = 0.001129148, c2 = 0.000234125, c3 = 0.0000000876741;  
float temp_c, temp_f;

#define G_led 8 
#define R_led 9 
#define buzzer 13

Define coefficients values for the NTC to be used in precisely in Kelvin scale range.

float c1 = 0.001129148, c2 = 0.000234125, c3 = 0.0000000876741;

After this the analog values on pin A0 from resistor divider network is converted into voltage.

ADC_Value=0;
for(int i=0; i< 50; i++) {
ADC_Value = ADC_Value+analogRead(ThermistorPin);
delay(1);
}

ADC_Value=ADC_Value/50;
R2 = R1 * (1023.0 / (float)ADC_Value - 1.0); //calculate resistance on thermistor

Then measure the temperature in kelvin using the formula(log calculations) given above.

temp_c = (1.0 / (c1 + c2*logR2 + c3*logR2*logR2*logR2)); // temperature in Kelvin

Convert the kelvin value in Celcius and in Fahrenheit

temp_c = temp_c - 273.15; //convert Kelvin to Celcius
temp_f = (temp_c * 9.0)/ 5.0 + 32.0; //convert Celcius to Fahrenheit

Display the value on screen(for Celcius):

lcd.setCursor(0,1);
lcd.print(temp_c, 1);
lcd.write(0xdf); // to display °
lcd.print("C  ");

Code:

/* The easy circuit:
 *                  Analog pin 0
 *                        |
 *    5V |-----/\/\/\-----+-----/\/\/\-----| GND
 *               ^                ^ 
 *        10K thermistor     10K resistor
 */

#include <LiquidCrystal.h> //Libraries
LiquidCrystal lcd(2, 3, 4, 5, 6, 7); //Arduino pins to lcd

#define ThermistorPin A0 // for Arduino microcontroller
long ADC_Value;
float R1 = 10000; // value of R1 on board
float logR2, R2, T;

//steinhart-hart coeficients for thermistor
float c1 = 0.001129148, c2 = 0.000234125, c3 = 0.0000000876741;  
float temp_c, temp_f;

#define G_led 8 
#define R_led 9 
#define buzzer 13
  
void setup(){
pinMode(ThermistorPin, INPUT);

pinMode(R_led,OUTPUT); // declare Red LED as output
pinMode(G_led,OUTPUT); // declare Green LED as output
pinMode(buzzer,OUTPUT); // declare Buzzer as output 

lcd.begin(16, 2); // Configura lcd numero columnas y filas
lcd.clear();
lcd.setCursor (0,0);
lcd.print("   Welcome To   ");
lcd.setCursor (0,1);
lcd.print("Temperature NTC"); 
delay(2000);
lcd.clear();
}
 
void loop(){
ADC_Value=0;
for(int i=0; i< 50; i++) {
ADC_Value = ADC_Value+analogRead(ThermistorPin);
delay(1);
}

ADC_Value=ADC_Value/50;
R2 = R1 * (1023.0 / (float)ADC_Value - 1.0); //calculate resistance on thermistor
logR2 = log(R2);
temp_c = (1.0 / (c1 + c2*logR2 + c3*logR2*logR2*logR2)); // temperature in Kelvin
temp_c = temp_c - 273.15; //convert Kelvin to Celcius
temp_f = (temp_c * 9.0)/ 5.0 + 32.0; //convert Celcius to Fahrenheit

lcd.setCursor(0,0);
lcd.print("  Temperature   ");
   
lcd.setCursor(0,1);
lcd.print(temp_c, 1);
lcd.write(0xdf); // to display °
lcd.print("C  ");

lcd.setCursor(9,1);
lcd.print(temp_f,1); 
lcd.write(0xdf);
lcd.print("F  ");

if(temp_f>100){ 
digitalWrite(buzzer, HIGH);
digitalWrite(G_led, LOW); // Turn LED off.   
digitalWrite(R_led, HIGH);  // Turn LED on.
delay(300);
}else{  
digitalWrite(G_led, HIGH); // Turn LED on.  
digitalWrite(R_led, LOW);  // Turn LED off.
}
  
digitalWrite(buzzer, LOW);
delay(500); 
}

JLCPCB PCB ordering process:

ice_screenshot_20220718-232619.png

Ordering process is quite simple with the auto PCB detection feature of the JLCPCB software. Download the Gerber file given the description of this project.

ice_screenshot_20220806-232222.png

Sign-up using this link and get your free coupons.

ice_screenshot_20220806-232317.png

Upload you Gerber file.

ice_screenshot_20220806-232327.png

Set all the parameters, quantity, color and finishing.

ice_screenshot_20220806-232333.png

ADD to cart and make payment. Get your PCBs at home just in 7 days.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *