Ks0033 keyestudio Analog Temperature Sensor: Difference between revisions

From Keyestudio Wiki
Jump to navigation Jump to search
Line 50: Line 50:
http://www.keyestudio.com/wp/2016/05/ks0033-keyestudio-analog-temperature-sensor/
http://www.keyestudio.com/wp/2016/05/ks0033-keyestudio-analog-temperature-sensor/


'''Datasheet'''
'''PDF'''


http://www.keyestudio.com/files/index/download/id/1463650241/
https://drive.google.com/open?id=1RLgiaOSsJxZ6TxaOc6YjAQALESPXhR9E


==Buy from ==
==Buy from ==

Revision as of 15:41, 14 November 2017

Introduction

This module is based on the working principle of a thermistor (resistance varies from temperature change in the environment). It can sense temperature change in its surrounding and send the data to the analog IO in the Arduino board. All we need to do is to convert the sensor output data into degrees Celsius temperature by simple programming, finally it will be displayed on the screen. It's both convenient and effective, and it’s widely applied in gardening, home alarm system and other devices. 
thumb

Specification

  • Interface Type: analog
  • Working Voltage: 5V
  • Temperature Range: -55℃~315℃
  • Size: 30*20mm
  • Weight: 3g

Connection Diagram


thumb

Sample Code

void setup() 
{Serial.begin(9600);
}
// the loop routine runs over and over again forever:
void loop() 
{int sensorValue = analogRead(A0);
Serial.println(sensorValue);
  delay(1); 
}

You can see that the analog value is changing according to the temperature change in the environment. But it’s not very obvious. Let’s solve it by using the following equation. The value read from the serial port is similar to normal temperature, eg. The temperature right now is 30C.

#include <math.h>
double Thermister(int RawADC) {
double Temp;
Temp = log(((10240000/RawADC) - 10000));
Temp = 1 / (0.001129148 + (0.000234125 + (0.0000000876741 * Temp * Temp ))* Temp );
Temp = Temp - 273.15; // Convert Kelvin to Celcius
return Temp;
}
void setup() 
{Serial.begin(9600);
} void loop() { Serial.print(Thermister(analogRead(0))); // display Fahrenheit Serial.println("c"); delay(500); 
}

Resources

Video

http://www.keyestudio.com/wp/2016/05/ks0033-keyestudio-analog-temperature-sensor/

PDF

https://drive.google.com/open?id=1RLgiaOSsJxZ6TxaOc6YjAQALESPXhR9E

Buy from

Official Website

http://www.keyestudio.com/keyestudio-analog-temperature-sensor-for-arduino.html

Amazon Store

https://www.amazon.com/Keyestudio-Analog-temperature-Arduino-raspberry/dp/B0172THUEU/ref=sr_1_2?ie=UTF8&qid=1479954319&sr=8-2&keywords=keyestudio+Analog+temperature+sensor+for+Arduino