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.


  • 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

Figure 1: Arduino Connection with Temperature Sensor

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 (-).

Figure 1: KY-013 Temperature Sensor Module

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 Thermistor(int RawADC) {
  double Temp;
  Temp = log(10000.0*((1024.0/RawADC-1))); 
  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() {
void loop() {
 int readVal=analogRead(sensorPin);
 double temp =  Thermistor(readVal);
 Serial.println(temp);  // display tempature
 //Serial.println(readVal);  // display tempature

In case the code don’t give the right values, in a room that was kind of ok it gave a temperature of 10 C. That isn’t right so the calculation in the code should be checked.

You can calibrate the sensor by figuring out what voltages correspond with what temperatures. Just measure the temperature with a different thermometer and see what the corresponding voltage is. Do this at several different temperatures and graph the voltage vs the temperature measured.