pyupm_tmp006 module

class pyupm_tmp006.TMP006(bus, conv_rate=2, devAddr=65)[source]

Bases: object

API for the TMP006 IR-Thermopile Sensor.

ID: tmp006

Name: TMP006 IR-Thermopile Sensor

Category: temp

Manufacturer: ti

Link:http://www.ti.com/product/TMP006/datasheet/abstract#SBOS5183423

Connection: i2c Description in web-link above: The TMP006 and TMP006B are fully integrated MEMs thermopile sensors that measure the temperature of an object without having to be in direct contact. The thermopile absorbs passive infrared energy from an object at wavelengths between 4 um to 16 um within the end-user defined field of view. The corresponding change in voltage across the thermopile is digitized and reported with the on-chip die thermal sensor measurement through an I2C- and SMBus-compatible interface. With this data, the target object temperature can be calculated by an external processor. The Infrared thermopile sensor is specified to operate from -40 to +125 [degC]. It is possible to measure an object temperature beyond the device operating range as long as the device itself does not exceed the operating temperature range (-40 to +125 [degC]).

C++ includes: tmp006.hpp

checkID()[source]

int checkID(void)

Check device_id of sensor

0 on succes -1 on error

convert_data(rawv, rawt, tamb, tobj)[source]

void convert_data(int16_t rawv, int16_t rawt, float *tamb, float *tobj)

Convert raw sensor values to temperature.

rawv: Object voltage value

rawt: Raw die temperature value

tamb: Converted ambient temperature

tobj: Converted object temperature

getConfig()[source]

uint16_t getConfig(void)

Get value of configuration reg

getTemperature(bSampleData=0)[source]

float getTemperature(int bSampleData=0)

Get the calculated object temperature [degC]

bSampleData: Flag to read sensor

The object temp in degC on success and -273.2 on ‘conversation in progress’

resetSensor()[source]

void resetSensor(void)

Performs a soft reset of the TMP006 device to ensure it is in a known state.

sampleData()[source]

int sampleData(void)

Read out data of regs and call further function Also saves converted value to variable

setActive()[source]

void setActive(void)

Set active mode, this enables periodic measurements.

setStandby()[source]

void setStandby(void)

Set standby mode, this disables periodic measurements.