Wednesday, April 4, 2012

TMP36 Temperature Sensor


Lead Author: Steven Schultz

Goals

The goal of this test was to make sure the Arduino works well with the TMP36 temperature sensor.  To do this, the sensor needs to be connected properly to the Arduino and the code needs to convert the output voltage to the correct temperature in Celsius. 

Testing

First, we connected the TMP36 sensor to the Arduino.  This is a very simple sensor to use because it needs 2.7 – 5.5 VDC, a ground, and the Arduino to read the output voltage.  We are providing it with 5 V from the Arduino.  It is also has a simple conversion of 10 millivolts per degree Celsius.  Below is a picture of the TMP36 temperature sensor from sparkfun.com.


The Arduino code used for this sensor is shown below.

We are using two of these sensors in our payload.  One of them is located on the perf board with the rest of the circuit.  This will be put in the insulated side of the payload.  The other sensor will be wired to the same Arduino, but located in the cold side.  This is so we can get a more accurate temperature reading of the air outside of the payload. 

Results

When testing this, data was taken at a rate of 10 times per second.  As you can see from the test below, all data fits within the error of +/- one degree under normal conditions.  During extreme conditions (-40 degrees Celsius,) the error rate increases to +/- 2 degrees. 


The temperature sensor picks up on changes in temperature quickly.  When put into a cooler of dry ice, the readings drop within seconds.  The temperature data will also be used to calculate humidity and pressure. 

Recommendations

Now that the TMP36 is working, we need to use the temperature reading to calculate the humidity and pressure separately.  The data also needs to be logged to the SD card.  We will need a fit line because the data will jump around from time to time.  However, all data fits within the specified error of the sensor.  




1 comment:

  1. Great post...thanks for the reminder to blog about the everyday things that people want to read. As a real estate agent, I too struggle with what to blog about. Thanks!
    Temperature Sensors

    ReplyDelete