Summary of MCP9802 temperature sensor and Arduino
This article discusses interfacing the MCP9802 digital temperature sensor with an Arduino for temperature measurement between -55°C and +125°C. The MCP9802 offers ±1°C accuracy from -10°C to +85°C and configurable resolution from 9-bit to 12-bit via I2C communication, supporting up to eight devices on one bus. The author demonstrates connecting the sensor to Arduino Uno's I2C pins (A4 and A5) with pull-up resistors and provides an Arduino sketch to configure the sensor at 12-bit resolution and read temperature data displayed on a PC's serial monitor.
Parts used in the MCP9802 Temperature Sensing Project:
- MCP9802 digital temperature sensor
- Arduino Uno
- Pull-up resistors for I2C lines
- I2C EEPROM+Sensor breakout board (with onboard MCP9802)
- Connecting wires
- PC with serial monitor software
MCP9802 is a digital temperature sensor from Microchip that measures temperatures between -55°C and +125°C to a digital word. It provides an accuracy of ±1°C (maximum) from -10°C to +85°C. The MCP9802 sensor comes with user-programmable registers that provide flexibility for temperature sensing applications. The register settings also allow user-selectable 9-bit to 12-bit temperature measurement resolution. This sensor has an industry standard 2-wire I2C compatible serial interface, allowing up to eight devices to be controlled in a single serial bus. In this blog post I am going to write about an Arduino sketch to interface the MCP9802 sensor with an Arduino for temperature sensing application. For illustration, I am using the MCP9802 sensor onboard the I2C EEPROM+Sensor breakout board.

The hardware connections between MCP9802 and Arduino is straightforward. Two pull-up resistors are required on the I2C signal lines. On Arduino Uno, the I2C lines are multiplexed with analog pins A4 (SDA) and A5 (SCL).

The following Arduino sketch configures the MCP9802 sensor resolution to 12-bit. The Arduino receives the temperature bytes and sends them out to serial port. The values are received and displayed on the serial monitor window on PC. Note that the 7-bit slave addresses of the
MCP9802 sensor on board is 0×48.
Read More: MCP9802 temperature sensor and Arduino
