Brick-Temperature-Thermistor

From ArduinoInfo
Jump to navigation Jump to search

Arduino Temperature Sensor-Thermistor.


This module can be used with Arduino Special Sensor Shield V4.0.。

Temperature sensing Brick

A temperature sensor based on thermistor. Can be used to detect environment temperature.
external image T10dxFXb8gXXXxFSja_121938_jpg_310x310.jpg

external image PhoXo6%2810%29.jpg




First , connect Arduino with Arduino Special Sensor Shield V4.0:


external image ArduinoSensorShieldConnected.jpg

Then connect light sensor with A5) analog input port of Arduino Sensor Shield through the analog sensor cables :

Then download the program below into Arduino through Arduino integrated development environment:

Test Code :
#include <math.h>
 
 double Thermister(int RawADC) {
  double Temp;
  Temp = log(((10240000/RawADC) - 10000));
  Temp = 1 / (0.001129148 + (0.000234125 * Temp) + (0.0000000876741 * Temp * Temp * Temp));
  Temp = Temp - 273.15;            // Convert Kelvin to Celcius
  Temp = (Temp * 9.0)/ 5.0 + 32.0; // Convert Celcius to Fahrenheit
  return Temp;
 }
 
 void setup() {
  Serial.begin(115200);
 }
 
 void loop() {
  Serial.println(int(Thermister(analogRead(0))));  // display Fahrenheit
  delay(100);
 }
 
 **Test Result :**