Austin R.J. Downey

DS1631 - Arduino Code and Temperature Validation

Basic information

The DS1631 is a low cost, I2C interface digital thermometer popular in the maker community. Capable of providing 12-bit temperature readings over a -55°C to +125°C range. I have a need for a digital thermometer in many of my projects and thought it would be nice to do a simple validation against a standard thermocouple. I have also provided an Arduino Script for use with the Arduino IDE. This code comes from the archived Arduino forums; I have updated it so it will work with a newer IDE (version 1.6.6) and Wire.h library.

The thermocouple is read using an NI 9214 thermocouple input module as shown below. The wiring schematic for the DS1631 as tested is also provided. All three address pins are pulled low, to give the chip an address of 0x90.

DS1631 Arduino code DS1631 Arduino code


DS1631 Arduino code


The figures below are a brief set of data collected during testing of the DS1631. Here the IC is tested against a type J thermocouple. Data in the first figure was collected using a heat gun to heat up both sensors. The heat gun was set to 100 C, and the data was collected at 500 Hz for both sensors. The difference in the recorded temperature may be a factor of how the DS1631 package holds heat, vs the bare tip of the thermocouple. The second set of data was collected over a few hours in my office. You can clearly see the temperature swing at the beginning when I leave my office. The temperature is higher when I am in the office (lights on and door open) and cooler when I leave (lights off and door closed). This second set was recorded at 0.5 Hz. The DS1631 seems to track the thermocouple temperature when the sensors are only measuring the ambient temperature.

DS1631 Arduino code DS1631 Arduino code


The updated DS1631 code for the Arduino controller with the I2C address set to 0x90 can be found here .