Module/TI TMP102

From PaparazziUAV
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
File:Tmp102.jpg
TI TMP102

Overview

The Texas Instruments TMP102 is a small and affordable temperature sensor.

Module name meteo/temp_tmp102
Sensor type temperature
Range -40°C .. +125°C
Resolution 0.0625°C
Refresh rate 8Hz
I2C address 0x90

TI product home page

Hardware

The TMP102 can be directly interfaced to the Paparazzi autpilot 3.3V I2C interfaces.

Supplier: Sparkfun

Wiring

Autopilot I2C pin Autopilot I2C TMP102
1 GND GND
2
3 +3.3V V+
4 SDA SDA
5 SCL SCL


Usage

To use the temperature sensor add the module to your airframe file.

File: conf/airframes/myplane.xml
  <modules>
    <load name="temp_tmp102.xml"/>
  </modules>


Result message

The raw data (itemp) and the converted result (temp) is written to the log file. The message is automatically sent when new data is received, it does not have to be added to the telemetry file.

File: conf/messages.xml
  <message name="TMP_STATUS" id="86">
    <field name="itemp" type="uint16"/>
    <field name="temp" type="float" unit="deg_celsius" format="%.2f"/>
  </message>


Sample log file lines

23.909 123 TMP_STATUS 338 21.12
23.909 123 TMP_STATUS 337 21.06
23.909 123 TMP_STATUS 336 21.
23.909 123 TMP_STATUS 334 20.88