# TMP006 Infrared Sensor Breakout

## Overview

![](https://cdn-learn.adafruit.com/assets/assets/000/005/926/medium800/temperature_1296_MED.jpg?1396829869)

Unlike most temperature sensors, the TMP006 does not require contact with the object it is measuring. It uses a very sensitive thermopile to measure the infrared energy being emitted from the surface of the object.  
  
This sensor works best with objects that are good emitters of infrared radiation. The ideal emitter is a completely non-reflective surface or "[black body](http://en.wikipedia.org/wiki/Black-body_radiation)". Black anodized aluminum or cast iron are pretty good emitters. Polished metal surfaces are very poor emitters, but can usually be turned into a good emitter with a bit of flat-black paint.  
  
The TMP006 works with 3v to 5v, so it can be used with most microcontrollers without the need for a level shifter. It connects via the i2c bus and is addressable so you can have up to 8 TMP006 sensors on the same bus.

## What is a Thermopile?
A [thermopile](http://en.wikipedia.org/wiki/Thermopile)is essentially a whole lot of thermocouples aligned in parallel, but wired in series. Each thermocouple will generate a microvolt-level signal proportional to the temperature differential from the hot end to the cold end. And by wiring them in parallel, the output is the sum of all outputs of all of the thermocouples. By multiplying the output like this, very small temperature differences can be measured.  
# TMP006 Infrared Sensor Breakout

## Assembly and Wiring

# Assembling the TMP006
![](https://cdn-learn.adafruit.com/assets/assets/000/005/889/medium800/temperature_2013_03_14_IMG_1360-1024.jpg?1396829214)

The TMP006 Thermopile Breakout comes with all surface-mount components pre-soldered. For use on a breadboard you will want to solder in the supplied header.

## Position the Header
Cut the header to length and insert it in a breadboard with the long pins down.![temperature_2013_03_14_IMG_1372-1024.jpg](https://cdn-learn.adafruit.com/assets/assets/000/005/891/medium640/temperature_2013_03_14_IMG_1372-1024.jpg?1396829234)

## Position the Breakout
Place the breakout board over the short end of the header pins.![temperature_2013_03_14_IMG_1371-1024.jpg](https://cdn-learn.adafruit.com/assets/assets/000/005/892/medium640/temperature_2013_03_14_IMG_1371-1024.jpg?1396829243)

## And Solder!
Solder each pin for a solid electrical connection.![temperature_2013_03_14_IMG_1377-1024.jpg](https://cdn-learn.adafruit.com/assets/assets/000/005/894/medium640/temperature_2013_03_14_IMG_1377-1024.jpg?1396829255)

# Wiring the TMP006
TheTMP006 communicates over I2C, so you only need 4 wires to connect it to the Arduino. The SDA and SCL pins can be shared with other I2C devices.  
  

## Connections for R3 and Later Arduinos:

- VCC -\> 3.3v or 5v  
- GND -\> GND  
- SDA -\> SDA  
- SCL -\> SCL  

![](https://cdn-learn.adafruit.com/assets/assets/000/005/896/medium800/temperature_2013_03_14_IMG_1381-1024.jpg?1396829276)

## Connections for 'Classic" Arduinos:

- VCC -\> 3.3v or 5v  
- GND -\> GND  
- SDA -\> Analog 4 (20 on Mega)  
- SCL -\> Analog 5 (21 on Mega)

![](https://cdn-learn.adafruit.com/assets/assets/000/005/895/medium800/temperature_2013_03_14_IMG_1380-1024.jpg?1396829264)

## Addressing
To use multiple TMP006 breakouts on one i2c bus, you need to give each one a different i2c address. The chip uses a clever addressing scheme to allow up to 8 addresses using just 2 address pins.   
  
The default address of the TMP006 is 0x40. By connecting the address pins as in the following table, you can generate any address between 0x40 and 0x47  
## For extra credit:
The address lines are sampled continuously. By clever manipulation of the address lines, it is possible to dynamically re-address TMP006 breakouts to expand the total number of breakouts connected to the bus.# TMP006 Infrared Sensor Breakout

## Using the Thermopile Sensor

## Download the Library
First download and install the [TMP006 sensor library](https://github.com/adafruit/Adafruit_TMP006 "Link: https://github.com/adafruit/Adafruit\_TMP006"). For tips on installing libraries, see our [All About Arduino Libraries Guide](http://learn.adafruit.com/adafruit-all-about-arduino-libraries-install-use).## Compile the Example Code
Open the tmp006 example sketch in the Arduino IDE, compile and upload it. This will verify that you have the library installed correctly and let you start experimenting with basic sensor readings.  
  
Once you upload the example sketch, open the Serial Monitor and view the output. The sensor should display a new reading about every 4 seconds.![](https://cdn-learn.adafruit.com/assets/assets/000/005/927/medium800/temperature_Capture.jpg?1396829937)

# Sensor Applications
There are many advantages to contact-less temperature sensing. But there are a few important things to consider when using these sensors. We will cover a couple of the most important ones here. For more detail, you will want to read through the [TMP006 User's Guide](http://www.adafruit.com/datasheets/tmp006ug.pdf).## Angle of View
An important thing to consider for a contact-less sensor aplications is the angle of view. The TMP006 has a very wide angle of view. If you are not careful in positioning the sensor relative to the surface being measured, the readings will be influenced by other nearby surfaces.   
  
The following video from TI demonstrates the angle of view and how to control it.http://www.youtube.com/watch?v=GEGiEi6tcVo&amp;feature=player_embedded

## Surface to be Measured
As mentioned earlier, the sensor works best when measuring a surface that is a good emitter. In general, that means a dull, dark colored surface. You will not get good readings from shiny, reflective objects.   
  
There is a handy table of emmisivities of common objects here: [http://www.engineeringtoolbox.com/emissivity-coefficients-d\_447.html](http://www.engineeringtoolbox.com/emissivity-coefficients-d_447.html "Link: http://www.engineeringtoolbox.com/emissivity-coefficients-d\_447.html")# TMP006 Infrared Sensor Breakout

## Python & CircuitPython

It's easy to use the TMP006 sensor with Python and CircuitPython, and the [Adafruit CircuitPython TMP006](https://github.com/adafruit/Adafruit_CircuitPython_TMP006) module. This module allows you to easily write Python code that reads the temperature from the sensor.

You can use this sensor with any CircuitPython microcontroller board or with a computer that has GPIO and Python [thanks to Adafruit\_Blinka, our CircuitPython-for-Python compatibility library](https://learn.adafruit.com/circuitpython-on-raspberrypi-linux).

## CircuitPython Microcontroller Wiring

First, wire up a TMP006 to your board exactly as shown on the previous pages for Arduino.&nbsp; Here's an example of wiring a Feather M0 to the sensor with I2C:

- **Board 3V** &nbsp;to&nbsp; **sensor VCC**
- **Board GND** &nbsp;to&nbsp; **sensor GND**
- **Board SCL** &nbsp;to&nbsp; **sensor SCL**
- **Board SDA** &nbsp;to&nbsp; **sensor SDA**

![adafruit_products_TMP006_Feather_M0_I2C_bb.png](https://cdn-learn.adafruit.com/assets/assets/000/082/161/medium640/adafruit_products_TMP006_Feather_M0_I2C_bb.png?1570644043)

## Python Computer Wiring

Since there's _dozens_ of Linux computers/boards you can use, we will show wiring for Raspberry Pi. For other platforms, [please visit the guide for CircuitPython on Linux to see whether your platform is supported](https://learn.adafruit.com/circuitpython-on-raspberrypi-linux).&nbsp;

Here's the Raspberry Pi wired with I2C:

- **Pi 3V3** to **sensor VCC**  
- **Pi GND** to **sensor GND**
- **Pi SCL** to **sensor SCL**
- **Pi SDA** to **sensor SDA**

![adafruit_products_RasPi_TMP006_I2C_bb.png](https://cdn-learn.adafruit.com/assets/assets/000/082/162/medium640/adafruit_products_RasPi_TMP006_I2C_bb.png?1570645876)

## CircuitPython Installation of TMP006 Library

Next, you'll need to install the [Adafruit CircuitPython TMP006](https://github.com/adafruit/Adafruit_CircuitPython_TMP006)&nbsp;library on your CircuitPython board.&nbsp;&nbsp;

First make sure you are running the&nbsp;[latest version of Adafruit CircuitPython](https://learn.adafruit.com/welcome-to-circuitpython/installing-circuitpython)&nbsp;for your board.

Next, you'll need to install the necessary libraries to use the hardware. Carefully follow the steps to find and install these libraries from [Adafruit's CircuitPython library bundle](https://circuitpython.org/libraries).&nbsp; Our introduction guide has&nbsp;[a great page on how to install the library bundle](https://learn.adafruit.com/welcome-to-circuitpython/circuitpython-libraries) for both Express and non-Express boards.

You need to copy the following libraries out of the library bundle into the **lib** folder on your **CIRCUITPY** drive:

- **adafruit\_tmp006.mpy**
- **adafruit\_bus\_device**

Before continuing make sure your board's lib folder or root filesystem has the&nbsp; **adafruit\_tmp006.mpy,** and **&nbsp;adafruit\_bus\_device**** &nbsp; **files and folders** &nbsp;**copied over.

Next[&nbsp;connect to the board's serial REPL](https://learn.adafruit.com/welcome-to-circuitpython/the-repl) so you are at the CircuitPython&nbsp; **\>\>\>** &nbsp;prompt.

## Python Installation of TMP006 Library

You'll need to install the **Adafruit\_Blinka** library that provides the CircuitPython support in Python. This may also require enabling I2C on your platform and verifying you are running Python 3. [Since each platform is a little different, and Linux changes often, please visit the CircuitPython on Linux guide to get your computer ready](https://learn.adafruit.com/circuitpython-on-raspberrypi-linux)!

Once that's done, from your command line run the following command:

- `sudo pip3 install adafruit-circuitpython-tmp006`

If your default Python is version 3 you may need to run 'pip' instead. Just make sure you aren't trying to use CircuitPython on Python 2.x, it isn't supported!

## CircuitPython & Python Usage

To demonstrate the usage of the sensor, we'll initialize it and read the temperature from the board's Python REPL.

Run the following code to import the necessary modules and initialize the I2C connection with the sensor:

```python
import board
import busio
import adafruit_tmp006

i2c = busio.I2C(board.SCL, board.SDA)
sensor = adafruit_tmp006.TMP006(i2c)
```

Now you're ready to read values from the sensor using the following property:

- **temperature** - The object temperature in degrees Celsius.

```python
print(sensor.temperature)
```

![](https://cdn-learn.adafruit.com/assets/assets/000/082/159/medium800/adafruit_products_TMP006_REPL_output.png?1570641854)

That's all there is to reading object temperature with the TMP006 and CircuitPython!

## Full Example Code
https://github.com/adafruit/Adafruit_CircuitPython_TMP006/blob/main/examples/tmp006_simpletest.py

# TMP006 Infrared Sensor Breakout

## Python Docs

# TMP006 Infrared Sensor Breakout

## Downloads

Adafruit's [TMP006 Library for the Arduino.](https://github.com/adafruit/Adafruit_TMP006 "Link: https://github.com/adafruit/Adafruit\_TMP006")

# Files

- [TMP006 Data Sheet](http://www.adafruit.com/datasheets/tmp006.pdf "Link: http://www.adafruit.com/datasheets/tmp006.pdf") from TI
- [TMP006 User's Guide](http://www.adafruit.com/datasheets/tmp006ug.pdf "Link: http://www.adafruit.com/datasheets/tmp006ug.pdf") from TI
- [Fritzing object in Adafruit Fritzing Library](https://github.com/adafruit/Fritzing-Library)
- [EagleCAD PCB files](https://github.com/adafruit/Adafruit-TMP006-and-TMP007-PCB)

# Schematic
![](https://cdn-learn.adafruit.com/assets/assets/000/036/116/medium800/temperature_schem.png?1475188035)

# Fabrication Print
![](https://cdn-learn.adafruit.com/assets/assets/000/036/117/medium800/temperature_fbaprint.png?1475188094)


## Featured Products

### Contact-less Infrared Thermopile Sensor Breakout - TMP006

[Contact-less Infrared Thermopile Sensor Breakout - TMP006](https://www.adafruit.com/product/1296)
Unlike all the other temperature sensors we have, this breakout has a really cool IR sensor from TI that can measure the temperature of an object without touching it! Simply point the sensor towards what you want to measure and it will detect the temperature by absorbing IR waves emitted. The...

No Longer Stocked
[Buy Now](https://www.adafruit.com/product/1296)
[Related Guides to the Product](https://learn.adafruit.com/products/1296/guides)

## Related Guides

- [Calibrating Sensors](https://learn.adafruit.com/calibrating-sensors.md)
- [Adafruit SPI FLASH Breakouts](https://learn.adafruit.com/adafruit-spi-flash-breakouts.md)
- [Adafruit GA1A12S202 Log-scale Analog Light Sensor](https://learn.adafruit.com/adafruit-ga1a12s202-log-scale-analog-light-sensor.md)
- [Adafruit Circuit Playground Tri-Color E-Ink Gizmo](https://learn.adafruit.com/adafruit-circuit-playground-tri-color-e-ink-gizmo.md)
- [reef-pi Guide 7: Dosing Controller](https://learn.adafruit.com/reef-pi-guide-5-dosing-controller.md)
- [Pi Hole Ad Blocker with Pi Zero W](https://learn.adafruit.com/pi-hole-ad-blocker-with-pi-zero-w.md)
- [Adafruit Bluefruit LE Shield](https://learn.adafruit.com/adafruit-bluefruit-le-shield.md)
- [LSM6DSOX, ISM330DHC, & LSM6DSO32 6 DoF IMUs](https://learn.adafruit.com/lsm6dsox-and-ism330dhc-6-dof-imu.md)
- [Adafruit PDM Microphone Breakout](https://learn.adafruit.com/adafruit-pdm-microphone-breakout.md)
- [Monitor Your Home With the Raspberry Pi B+](https://learn.adafruit.com/monitor-your-home-with-the-raspberry-pi-b-plus.md)
- [Adafruit 1.3" and 1.54" 240x240 Wide Angle TFT LCD Displays](https://learn.adafruit.com/adafruit-1-3-and-1-54-240-x-240-wide-angle-tft-lcd-displays.md)
- [Adafruit OLED FeatherWing](https://learn.adafruit.com/adafruit-oled-featherwing.md)
- [Adafruit Terminal Block BFF](https://learn.adafruit.com/adafruit-terminal-block-bff.md)
- [Adafruit DS2484 I2C to 1-Wire Bus Adapter Breakout](https://learn.adafruit.com/adafruit-ds2484-i2c-to-1-wire-bus-adapter-breakout.md)
- [Adafruit 2.2" PiTFT HAT - 320x240 Display](https://learn.adafruit.com/adafruit-2-2-pitft-hat-320-240-primary-display-for-raspberry-pi.md)
