Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

How to Use SparkFun High Precision Temperature Sensor - TMP117 (Qwiic): Examples, Pinouts, and Specs

Image of SparkFun High Precision Temperature Sensor - TMP117 (Qwiic)Design with SparkFun High Precision Temperature Sensor - TMP117 (Qwiic) in Cirkit Designer

Introduction

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.

Explore Projects Built with SparkFun High Precision Temperature Sensor - TMP117 (Qwiic)

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of Adafruit MPU6050 and VL6180X Sensor Interface with Servo Control: A project utilizing SparkFun High Precision Temperature Sensor - TMP117 (Qwiic) in a practical application
Adafruit MPU6050 and VL6180X Sensor Interface with Servo Control

This circuit features an Adafruit QT Py microcontroller interfaced with an Adafruit MPU6050 6-axis accelerometer/gyroscope and an Adafruit VL6180X Time of Flight (ToF) distance sensor, both connected via I2C communication. The QT Py also controls a Servomotor SG90, likely for physical actuation based on sensor inputs. The embedded code initializes the sensors, reads their data, and outputs the readings to a serial monitor, with the potential for motion control based on the sensor feedback.

Open Project in Cirkit Designer

Technical Specifications

Key Features

Pin Configuration and Descriptions

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

Usage Instructions

Connecting the Sensor

  1. Connect the VCC pin to a 1.8V to 3.3V power source.
  2. Connect the GND pin to the ground of your system.
  3. Connect the SDA and SCL pins to the I2C data and clock lines on your microcontroller.
  4. The ADD0 pin can be used to change the I2C address if multiple devices are connected to the same I2C bus.
  5. The ALERT pin can be used to trigger an interrupt when a temperature threshold is reached.

Best Practices

Example Code for Arduino UNO

#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
}

Troubleshooting and FAQs

Common Issues

FAQs

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.