Ks0104 keyestudio EASY plug Analog Temperature Sensor: Difference between revisions

From Keyestudio Wiki
Jump to navigation Jump to search
Line 1: Line 1:
==EASY plug Analog Temperature Sensor ==
==EASY plug Analog Temperature Sensor ==
<br>[[File:ks0100-1.png|500px|frameless|thumb]]<br>


==Introduction==
==Introduction==

Revision as of 11:47, 23 November 2018

EASY plug Analog Temperature Sensor

Introduction

This module is based on the working principle of a thermistor (resistance varies with 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 to degrees Celsius temperature by simple programming and display it. It's both convenient and effective, and it’s widely applied in gardening, home alarm system and other devices.
Note: this module needs to be used together with EASY plug control board.


Specification

  • Interface: Easy plug
  • Sensor type: analog
  • Working voltage: 5V
  • Temperature range: -55℃~315℃
  • Size: 38*20mm
  • Weight: 5g


Connection Diagram


thumb


Sample Code

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

We 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 this 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(1))); // display Fahrenheit Serial.println("c");
delay(500);
}

Resources

PDF

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

Buy from

Official Website

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