Difference between revisions of "Arduino Analog Temperature Sensor Module"
(→Usage) |
|||
Line 8: | Line 8: | ||
==Usage== | ==Usage== | ||
[[File:Thmistor module wiring1.jpg|500px]] | [[File:Thmistor module wiring1.jpg|500px]] | ||
+ | VCC - 5V | ||
+ | GND - GND | ||
+ | S - Analog pin 0 | ||
==Example code== | ==Example code== |
Revision as of 02:33, 11 May 2012
Introduction
Our analog Temperature Sensor Based on thermistor - a resistor that changes its resistance with temperature.This Temperature Sensor Module measures the environment temperature and input data to Arduino through the analog I/O port of Sensor Shield. Great tool for gardening projects, home alert system etc.
Building interactive work is as easy as piling bricks, just plug it to our Arduino Sensor Shield with a buckled cable, and make it looks professional and neat.A simple program below converts data from Temperature Sensor Module to Celcius and displays it in Serial Monitor. This function utilizes the Steinhart-Hart Thermistor Equation to convert "Thermistor Resistance" to "Temperature in Degrees Kelvin."
Usage
VCC - 5V GND - GND S - Analog pin 0
Example code
#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); }
How to buy it
Click here to buy Arduino Analog Temperature Sensor Module