TMP36 temperature sensor circuit setup

For this exercise we need:

  • TMP36 sensor

    The TMP36 is temperature sensor created by a company named Analog Devices. It is easy to use and widely available. We get all the technical information about the TMP36 sensor in its datasheet. It is available at: http://www.analog.com/en/mems-sensors/digital-temperature-sensors/tmp36/products/product.html.

    TMP36 can measure temperature from -40°C to 125°C with a maximum ±2°C error. It is not good for checking human body temperature because the relative error is large enough to show bad health as good. But it is good in fire alarms, environment control systems, industrial process control systems, and so on. It needs 2.7V to 5.5V as input voltage to function. It gives output voltage 750mV at 25°C temperature. It has an output scale factor of 10mV/°C. So, it gives 0V at -50°C and increases with 10mV/°C. The voltage to Celsius temperature conversion equation for TMP36 is:

    Temperature = 100 * Voltage(measured) - 50

  • Male-to-male jumper wires

    We need jumper wires to connect BeagleBone and components through a breadboard

  • Half-size breadboard

    A breadboard is needed to create a solderless circuit

    Power off the board and attach components to BeagleBone as shown in the following diagram:

    TMP36 temperature sensor circuit setup

Circuit analysis

This circuit is a typical analog reading example. TMP36 has three leads. If you face the printed flat surface of the sensor, the left lead takes input voltage. We are providing 3.3V as input voltage to the left lead from P9_3 pin. The right lead is the ground pin. We connect it to P9_34, which is the analog ground pin. The middle lead is giving the analog output voltage. We connect it to the analog input pin P9_40. If you connect TMP36 incorrectly and power on BeagleBone, it becomes hot. Please make sure it is connected correctly.

TMP36 is an analog sensor that generates analog voltage directly proportional to the temperature it detects. BeagleBone reads that voltage on the P9_40 analog input pin. BeagleBone ADC converts that analog value to the nearest digital value. We can read this value in our program using the analogRead() function. Then we can put that value in the equation to get the temperature. Let's write a program to do so.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.135.247.181