KY-013 ANALOG TEMPERATURE SENSOR MODULE
$16.2
$25.6
The KY-013 Analog Temperature Sensor module can measure ambient temperature based on the resistance of the thermistor on the board.Compatible with popular electronics platforms like Arduino and ESP32.KY-013 SPECIFICATIONSThis module consist of a NTC thermistor, a 10 kΩ resistor, and 3 male header pins. The thermistor resistance varies according to its surrounding temperature. The value of resistance can be used to calculate the actual temperature.Operating Voltage5VTemperature measurement range-55°C to 125°C [-67°F to 257°F]Measurement Accuracy±0.5°CCONNECTION DIAGRAMConnect module power line (middle) and ground (-) to 5V and GND on the Arduino respectively. Connect the module signal pin (S) to pin A0 on the Arduino.Some KY-013 have a different pin arrangement. Please check your board before connecting.KY-013ArduinoSA0middle5V–GNDKY-013 ARDUINO CODEThe following Arduino Sketch will derive the temperature from the thermistor using the Steinhart-Hart equation. The code will return temperature in Celcius, uncomment line 17 to get temperature in farenheitArduino int ThermistorPin = A0; int Vo; float R1 = 10000; // value of R1 on board float logR2, R2, T; float c1 = 0.001129148, c2 = 0.000234125, c3 = 0.0000000876741; //steinhart-hart coeficients for thermistor void setup() { Serial.begin(9600); } void loop() { Vo = analogRead(ThermistorPin); R2 = R1 * (1023.0 / (float)Vo - 1.0); //calculate resistance on thermistor logR2 = log(R2); T = (1.0 / (c1 c2*logR2 c3*logR2*logR2*logR2)); // temperature in Kelvin T = T - 273.15; //convert Kelvin to Celcius // T = (T * 9.0)/ 5.0 32.0; //convert Celcius to Farenheit Serial.print("Temperature: "); Serial.print(T); Serial.println(" C"); delay(500);12345678910111213141516171819int ThermistorPin = A0;int Vo;float R1 = 10000; // value of R1 on boardfloat logR2, R2, T;float c1 = 0.001129148, c2 = 0.000234125, c3 = 0.0000000876741; //steinhart-hart coeficients for thermistorvoid setup() { Serial.begin(9600);}void loop() { Vo = analogRead(ThermistorPin); R2 = R1 * (1023.0 / (float)Vo - 1.0); //calculate resistance on thermistor logR2 = log(R2); T = (1.0 / (c1 c2*logR2 c3*logR2*logR2*logR2)); // temperature in Kelvin T = T - 273.15; //convert Kelvin to Celcius // T = (T * 9.0)/ 5.0 32.0; //convert Celcius to Farenheit Serial.print(“Temperature: ”); Serial.print(T); Serial.println(“ C”); delay(500); DOWNLOADSFritzing Part: KY-013 Analog temperature sensor module.Fritzing Official Site.
Temperature