KY-013 Analog Temperature Sensor Module For Arduino

2.35$

Description

Product description:

1. Module introduces

The module is based on the thermistor (resistance increases with the ambient temperature

changes) works, a sense of real-time to know the temperature of the surrounding environment changes, we send the data to the Arduino analog IO, then

come down as long as we go through simple programming will be able to convert the sensor output data Celsius temperature values and displayed, it is

still easy to use,It effectively, thereby widely used in gardening, home alarm systems and other devices.

2. Method of application

And the general temperature sensor is the same, are three-line package, when we use the power cord connected OK signal output into the end on the

line, because the module output is an analog signal, we want to signal output terminal connected to the Arduino analog IO on sampling, so as to

correctly read the temperature value.

Package included:
  •  1PCS x  KY – 013 KEYES Vc Temperature Sensor Module For The ARDUINO
#include <math.h>

int sensorPin = A5; // 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() {
  Serial.begin(9600);
}

void loop() {
  int readVal=analogRead(sensorPin);
  double temp =  Thermistor(readVal);

  Serial.println(temp);  // display tempature
  //Serial.println(readVal);  // display tempature
  delay(500);
}

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.