Interfacing Analog Temperature Sensor Module KY-013 in Arduino

Learn Interfacing Analog Temperature Sensor Module KY-013 in Arduino. Analog Temperature module measures ambient temperature based on the resistance of the thermistor. Analog Temperature module consists of an NTC thermistor and a 10 kΩ resistor. The resistance of the thermistor varies with surrounding temperature, we’ll use the Steinhart–Hart equation to derive the precise temperature of the thermistor. So, let’s start.

Step 1: Required Components

Analog Temperature module x 1
Breadboard x 1
Arduino UNO Board x 1
Jumper Wires

Step 2: Circuit Time

Firstly, connect analog pin (s pin) of the module to analog pin A0 of Arduino. Then, connect VCC pin and GND pin of Knock sensor module to +5v and GND pin of Arduino.

Step 3: Code Time

The main part of the code is the implementation of Steinhart-Hart equation. This equation is implemented in ‘Steinhart’ function. Setup function will start the serial monitor as usual. Loop will be used to send analog values from the module to Steinhart function and appropriate temperature value will be calculated.

Step 4: Upload the code to Arduino

Set components as per the Circuit Diagram and upload the code to the Arduino UNO Board. As outside temperature changes, resistance will change and provide an analog output, which is the temperature.

For information about uploading code to Arduino UNO Click Here.

Leave a Reply