TMP006 Infrared Temperature Sensor with Raspberry Pi: Python Library & Setup Guide
If you need a hassle‑free way to measure temperature without touching the object, the TMP006 infrared sensor is the solution. It reads the heat radiated by an object via its own IR sensor and communicates over a simple I2C bus. This guide walks you through wiring the sensor to a Raspberry Pi or BeagleBone Black and installing the official Python library so you can start measuring right away.
Hardware Requirements
The TMP006 only requires a 3.3V power supply, ground, and the I2C data (SDA) and clock (SCL) lines. Ensure your board’s I2C bus is enabled.
Raspberry Pi
- Pi 3.3 V → TMP006 VCC
- Pi GND → TMP006 GND
- Pi SDA → TMP006 SDA
- Pi SCL → TMP006 SCL
BeagleBone Black
- P9_1 DGND → TMP006 GND
- P9_3 3.3 V → TMP006 VCC
- P9_19 SCL → TMP006 SCL
- P9_20 SDA → TMP006 SDA
Software Preparation
Before proceeding, make sure your board is online (via Ethernet or Wi‑Fi) and you can SSH into it. On the Raspberry Pi, install the RPi.GPIO library; on the BeagleBone Black, install the Adafruit_BBIO library.
Install Common Dependencies
sudo apt-get update
sudo apt-get install build-essential python-dev python-pip python-smbus git
Warnings about already‑installed packages can be ignored.
Platform‑Specific Libraries
Raspberry Pi:
sudo pip install RPi.GPIO
BeagleBone Black:
sudo pip install Adafruit_BBIO
Install the TMP006 Python Library
Clone the library from its GitHub repository (replace URL with the actual link):
cd ~
git clone https://github.com/your-org/tmp006-python.git
cd tmp006-python
sudo python setup.py install
For detailed usage, refer to the TMP006 Temperature Sensor Python Library documentation.
Manufacturing process
- Build a Raspberry Pi Temperature Logger with a $5 I2C Sensor
- Accurate Raspberry Pi Temperature Profiling with Python, SQLite, and LabVIEW
- Build a Remote Temperature Sensor with Raspberry Pi and Python – Step‑by‑Step Guide
- How to Connect a DS1820 One‑Wire Temperature Sensor to a Raspberry Pi Using GPIO
- Control an LED with a PIR Motion Sensor on Raspberry Pi
- Build a ThingSpeak Temperature Monitor with Raspberry Pi & BrickPi
- Build a Multi‑Sensor Temperature & Light Monitoring System with Raspberry Pi & DS18B20
- Monitor Your Home Temperature with a Raspberry Pi Dashboard
- Build a Raspberry Pi Home Temperature Monitor with MCP9808, InfluxDB & Grafana
- Using an MCP3008 ADC to Read Analog Sensors with Raspberry Pi