

The MCP9808 is a high-accuracy digital temperature sensor manufactured by Adafruit. It communicates via the I2C protocol and is equipped with STEMMA QT and Qwiic connectors for seamless integration into projects. This sensor is capable of measuring temperatures with a precision of ±0.25°C (typical) and supports a wide operating temperature range from -40°C to +125°C. Its low power consumption and ease of use make it ideal for applications such as environmental monitoring, industrial systems, and IoT devices.








Below are the key technical details of the MCP9808 sensor:
| Parameter | Value |
|---|---|
| Operating Voltage | 2.7V to 5.5V |
| Temperature Range | -40°C to +125°C |
| Accuracy | ±0.25°C (typical) |
| Communication Protocol | I2C |
| I2C Address (Default) | 0x18 (configurable: 0x18–0x1F) |
| Current Consumption | 200 µA (typical) |
| Resolution | Configurable: 0.5°C to 0.0625°C |
| Connector Type | STEMMA QT / Qwiic |
The MCP9808 sensor has the following pinout:
| Pin Name | Description |
|---|---|
| VIN | Power input (2.7V to 5.5V) |
| GND | Ground |
| SCL | I2C clock line |
| SDA | I2C data line |
| A0, A1, A2 | Address selection pins (for I2C address setting) |
Below is an example of how to use the MCP9808 sensor with an Arduino UNO. This code reads the temperature and prints it to the Serial Monitor.
#include <Wire.h>
#include "Adafruit_MCP9808.h"
// Create an MCP9808 object
Adafruit_MCP9808 tempsensor = Adafruit_MCP9808();
void setup() {
Serial.begin(9600); // Initialize serial communication at 9600 baud
Serial.println("MCP9808 Temperature Sensor Test");
// Initialize I2C communication and check sensor connection
if (!tempsensor.begin(0x18)) {
Serial.println("Couldn't find MCP9808! Check wiring.");
while (1); // Halt execution if sensor is not found
}
// Set temperature resolution (optional)
tempsensor.setResolution(3); // 0: 0.5°C, 1: 0.25°C, 2: 0.125°C, 3: 0.0625°C
}
void loop() {
// Read temperature in Celsius
float tempC = tempsensor.readTempC();
// Print temperature to Serial Monitor
Serial.print("Temperature: ");
Serial.print(tempC);
Serial.println(" °C");
delay(1000); // Wait 1 second before next reading
}
tempsensor.begin() function if the default address (0x18) is changed.Sensor Not Detected:
Incorrect Temperature Readings:
No Output on Serial Monitor:
Q: Can I use multiple MCP9808 sensors on the same I2C bus?
A: Yes, you can connect up to 8 MCP9808 sensors by configuring their I2C addresses using the A0, A1, and A2 pins.
Q: What is the default resolution of the MCP9808?
A: The default resolution is 0.25°C, but it can be adjusted to 0.5°C, 0.125°C, or 0.0625°C.
Q: Is the MCP9808 compatible with 3.3V microcontrollers?
A: Yes, the MCP9808 operates at 2.7V to 5.5V, making it compatible with both 3.3V and 5V systems.
Q: Do I need to solder the MCP9808 to use it?
A: No, the STEMMA QT and Qwiic connectors allow for solder-free connections.
By following this documentation, you can easily integrate the MCP9808 sensor into your projects for accurate and reliable temperature measurements.