MCP9802 temperature sensor and Arduino

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.

MCP9802 temperature sensor and Arduino

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).

Arduino_MCP9802

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


About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top