Active Sensor Thermometer

Active Sensor Thermometer © GPL3+

How to build a simple and accurate thermometer using an active temperature sensor (MCP9071/A).

  • 1,757 views
  • 1 comment
  • 3 respects

Components and supplies

About this project

The Active Temperature Sensor

The project is based on the Microchip MCP9701 Active Temperature Sensor. This sensor is interfaced with the Arduino MEGA that supplies it and reads its output voltage. The MCP9701 sensor provides an output voltage that is proportional to the temperature. The sensor has a linear output characteristic defined by the formula:

vout = tc * ta + v0

Where v0 is the voltage at 0°C, while tc is the temperature coefficient.

The tc for the MCP 9071 / A is 19.5 mV / °C while for the MCP9700 / A the tc is 10 mV / °C.

The output voltage vout0, for the MCP9701 / A, is 400mV. The temperature ta measured by the sensor, note the voltage vout, is:

ta = (vout-vout0) / tc

The value of Vout is obtained by averaging 1024 values reading the voltage on pin A0 that is connected to the sensor output. The value of ta will be calculated by the formula and shown on the serial monitor.

Code

Arduino code for thermometer active sensor basedArduino
taking the application scheme as referencehow to connect the sensor to the Arduino board and loading this code in the arduino, it is possibile read the room temperature in the serial output interface. Every 1s the measure is done and printed
/*

   The value of Vout is obtained by averaging 1024 values reading the voltage on pin A0. whicch is connected to the sensor output. The value of temeprature ta, read by the sensor is shown on the serial monitor.

*/


// set pin numbers:

const int in = A0;            // input for reading the sensor output

// set constants:
const float vout0 = 400;   //  sensor output voltage in mV at 0°C
const float tc = 19.53;   // mV for °C temperature constant for the  MCP9701/A

// variables:

int i, f;
float vout, vout_avg, ta;


// MAIN PROGRAM

void setup() {
  Serial.begin(9600);
  pinMode(in, INPUT);            // set pin in as input
  pinMode(13, OUTPUT);            // set pin 13 as output
  digitalWrite(13, LOW);
  analogReference(DEFAULT);
 
}

void loop() {
  vout_avg = 0;
  for (i = 0; i < 1024; i++) {
    vout = analogRead(A0) * (4976.30 / 1023);
    //Serial.println(vout);
    vout_avg = vout_avg + vout;
  }
  vout = vout_avg / 1024;
  //Serial.println(vout);
  ta = (vout - vout0) / tc;
  Serial.print("temperature ( celcius degree)   = " );
  Serial.println(ta);
  delay (1000);
}

Schematics

SCHEMATIC
The hardware implementation is executed by using the Arduino MEGA 2560 card: just connect the active sensor as shown in the figure. Pin A0 is set as an analog input for converting the output voltage of the sensor to the AD.
Activetherm agsll6wv3i

Comments

Similar projects you might like

Touch Sensor and Sound Sensor Controlling AC/DC Lights

Project showcase by Anbumachi

  • 1,184 views
  • 2 comments
  • 5 respects

thermometer diode based

by microst

  • 3,633 views
  • 5 comments
  • 8 respects

DIY Art Deco Analog Thermometer

Project tutorial by Nick Koumaris

  • 5,916 views
  • 2 comments
  • 23 respects

PIR Sensor Tutorial - With Or Out Arduino

by Tarantula3

  • 3,436 views
  • 2 comments
  • 21 respects

Remote & Base Sensor Station - Now with IoT!

Project showcase by vapor83

  • 2,574 views
  • 2 comments
  • 10 respects

One Pixel Thermometer

Project tutorial by Ian Cumming

  • 1,825 views
  • 2 comments
  • 7 respects
Add projectSign up / Login