MCP9808 Precision Thermometer

Read room temperature to ±0.25 °C accuracy over I²C — ten times better than the usual NTC voltage divider.

Difficulty: Breadboard. Estimated build time: about 25 minutes. Estimated parts cost: about US$3.50. 4-line bill of materials. Compare supplier offers when available. A digital thermometer built around the Microchip MCP9808, an 8-pin MSOP I²C temperature sensor that ships factory-calibrated to ±0.25 °C from –40 °C to +125 °C.

Wire I²C and ground the address pins

Place the breakout on the breadboard. V_DD to 3.3 V, GND to GND, SDA to A4, SCL to A5, with 10 kΩ pull-ups on both SDA and SCL. Tie A0, A1, A2 to GND so the chip lives at I²C address 0x18 (its default).

Install Adafruit_MCP9808 and read the temperature

Library Manager, search “Adafruit MCP9808”. Open File > Examples > Adafruit MCP9808 > mcp9808test. Upload, open Serial Monitor at 9600 baud. The sketch prints temperature in both Celsius and Fahrenheit every second.

Set a high-temperature alert

Read the same datasheet section on the T_UPPER register. Write a threshold (say 30 °C); the ALERT pin pulls low when the reading exceeds it. Wire ALERT to D2 and use attachInterrupt() to wake an LED on D13. You’ve just built a temperature-triggered alarm with no polling.

Compare against an NTC voltage divider

If you have an NTC project already running, leave both sensors next to each other for an hour. The NTC will drift by half a degree as your hand approaches the breadboard; the MCP9808 will hold steady within 0.25 °C of the actual room temperature. That’s the difference an internal voltage reference and factory calibration make.