Temperature Sensor Module(KY-013)

아두위키 : Arduwiki

This module detects temperature and outputs it in analog form.

Specifications

  • Operating Voltage [V]: 5
  • Error Range [°C]: -5 ~ +5

Example Usage Hardware

  • Arduino board
  • Jumper cables
  • Analog Temperature Sensing Module

Connection

Arduino Uno KY-013
5V +
GND -
A0 S

Example Code

This example outputs the temperature.

const int ThermistorPin = A0;
const float R1 = 10000;
const float c1 = 0.001129148, c2 = 0.000234125, c3 = 0.0000000876741;
int Vo;
float logR2, R2, T;

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

void loop() {
  Vo = analogRead(ThermistorPin);
  R2 = R1 * (1023.0 / (float)Vo - 1.0);
  logR2 = log(R2);
  T = (1.0 / (c1 + c2*logR2 + c3*logR2*logR2*logR2));
  T = T - 273.15;
  Serial.print("Temperature: ");
  Serial.print(T);
  Serial.println(" C");
  delay(500);
}

Execution Result

When the temperature sensing part is covered with a hand, the change in temperature is displayed on the serial monitor.