KY-013 Temperature sensor module is based on NTC thermistor and a 10 kΩ resistor.

### What Is An NTC (negative temperature coefficient) Thermistor ?

Thermistors are temperature-sensing elements made of semiconductor material that has been sintered in order to display large changes in resistance in proportion to small changes in temperature.

This resistance can be measured by using a small and measured direct current, or dc, passed through the thermistor in order to measure the voltage drop produced.

These solid state temperature sensors actually act like electrical resistors that are temperature sensitive. That is where the name, a clear combination of the words thermal and resistor, comes from.

Specifications

• The temperature sensor is a NTC thermistor
• Multi-point temperature measurement Measures temperatures: -55°C / +125°C
• Accuracy: + / – 0.5°C
• Material: mixed material
• Dimensions: 3 x 1.5 x 0.6cm
• Weight : 2g

### Arduino Connection with  KY-013 Temperature sensor

Arduino pin analoog A5 –> module S (Signal)
Arduino pin GND – module –
Arduino pin 5+ –> middel pin 5V

Note: Some KY-013 boards are labeled incorrectly, if you are getting inverted readings (temperature drops when sensor is heated) try swapping signal (S) and ground (-).

### Arduino Code for KY-013 Temperature sensor

The analog sensor acts as a variable resistor. As temperature increases, the sensor will decrease it’s
voltage output. Once we can measure the voltage output, we can calibrate the sensor and convert the
output in voltage to temperature.

```#include <math.h>

int sensorPin = A0; // select the input pin for the potentiometer

double Temp;
Temp = 1 / (0.001129148 + (0.000234125 + (0.0000000876741 * Temp * Temp ))* Temp );
Temp = Temp - 273.15;            // Convert Kelvin to Celcius
//Temp = (Temp * 9.0)/ 5.0 + 32.0; // Convert Celcius to Fahrenheit
return Temp;
}

void setup() {
Serial.begin(9600);
}

void loop() {