ADT7410 Temperature Sensor

The Analog Devices ADT7410 [1] is an I2C temperature sensor with 16-bit 0.0078°C temperature resolution and 0.5°C temperature tolerance. It can operate from 2.7 V to 5.5 V.

It's available on a breakout board from Adafruit [2]. or you could mount the chip yourself on an SOIC-8 breakout board:

ADT7410.jpg

It provides two address inputs which can be connected to GND or Vcc, allowing you to have four I2C addresses. The default I2C address, with both lines connected to GND, is #x48 or 72.

Reading the temperature

The following routine reads the temperature and returns it as an integer, in 1/16ths of a degree Celsius:

(defun adt7410-temp ()
  (with-i2c (str #x48) 
    (write-byte 0 str)
    (restart-i2c str 2)
    (let* ((hi (read-byte str))
           (lo (read-byte str))
           (tmp (logior (ash hi 5) (ash lo -3))))
      (- (logand tmp #x0FFF) (logand tmp #x1000)))))

To return the temperature as an integer number of degrees, or a floating-point number on a 32-bit version of uLisp, do:

(/ (adt7410-temp) 16)

  1. ^ ADT7410 Datasheet on Analog devices.
  2. ^ ADT7410 High Accuracy I2C Temperature Sensor Breakout Board on Adafruit.