The SparkFun High Precision Temperature Sensor - TMP117 (Qwiic) is a high-accuracy digital temperature sensor that offers a high degree of precision at a low power consumption. It is designed to read temperatures with a minimal error margin, making it ideal for a wide range of applications including environmental monitoring, medical devices, and industrial control systems. The sensor communicates over the I2C interface, making it easy to use with microcontrollers such as the Arduino UNO.
Pin Name | Description |
---|---|
VCC | Power supply (1.8V to 3.3V) |
GND | Ground connection |
SDA | I2C Data Line |
SCL | I2C Clock Line |
ADD0 | Address pin to set I2C address |
ALERT | Alert/interrupt output |
#include <Wire.h>
#include <SparkFun_TMP117.h> // Include the SparkFun TMP117 library
// Create a TMP117 object
TMP117 tempSensor;
void setup() {
Wire.begin(); // Join I2C bus
Serial.begin(9600); // Start serial communication at 9600 baud
if (tempSensor.begin() == false) {
Serial.println("The TMP117 did not respond. Please check wiring.");
while (1); // Hang if there is a problem
}
}
void loop() {
Serial.print("Temperature: ");
Serial.print(tempSensor.readTempC()); // Read temperature in Celsius
Serial.println(" C");
delay(1000); // Wait 1 second before next reading
}
Q: Can the TMP117 sensor be used with a 5V system? A: The TMP117 is rated for 1.8V to 3.3V operation. Using it with a 5V system without proper level shifting could damage the sensor.
Q: How can I change the I2C address of the sensor? A: The I2C address can be changed by connecting the ADD0 pin to GND, VCC, SDA, or SCL, each giving a different address.
Q: Is it possible to use multiple TMP117 sensors on the same I2C bus? A: Yes, you can use multiple sensors by setting a unique I2C address for each one using the ADD0 pin.
Q: How do I calibrate the sensor? A: The TMP117 comes factory-calibrated. However, if recalibration is necessary, refer to the manufacturer's datasheet for detailed instructions.
For further assistance, consult the TMP117 datasheet or contact SparkFun's technical support.