How to Hookup Microchip MCP9808 Temperature Sensor to Arduino Board
The MCP9808 digital temperature sensor converts temperatures between -20°C and +100°C to a digital word with ±0.5°C (max.) accuracy. It is I2C compatible and supports up to 16 devices on the bus. We do not require pullup resistors on the data or clock signals as they are already installed on the breakout board.
The MCP9808 is available in a discrete component form but it is much easier to use it mounted on a breakout board. We used the Adafruit breakout board.
In this hookup we are only connecting one device to the Arduino. It reads the temperature and displays it on the console.
Hardware and Software Parts List
- Arduino Board
- Microchip MCP9808 Sensor. We used the Adafruit MCP9808 breakout board
- Breadboard hookup wires
- USB Cable to suite Arduino
- Sample Sketch ( ) Demonstrates MCP9808 breakout board connected to the Arduino.
- MCP9808 Library ( )
Wiring up Microchip MCP9808 Temperature Sensor
The MCP9808 requires 2 wires for the I2C bus plus power and ground. The power can be either 5V or 3.3V.
We connect the Data and clock wires to Analog ports A4 and A5 which is the I2C pins on the Arduino.
Hookup Diagram for connecting the MCP9808 breakout board to a Arduino Board
The hookup and Arduino Sketch is for connecting a single Adafruit MCP9808 breakout board.
You will need to download the cactus.io MCP9808 library to work with this sample sketch. The library supports reading the temperature from the sensor.Limitations
- The sketch Supports only one sensor connected to the I2C bus.
- Its blocking code.
Sketch Console Output