Chipkit Uno and DS1624 sensor example

The DS1624 consists of two separate functional units: a 256-byte nonvolatile E2 memory and a direct-to-digital temperature sensor.

The nonvolatile memory is made up of 256 bytes of E2 memory. This memory can be used to store any type of information the user wishes. These memory locations are accessed through the 2-wire serial bus.

The direct-to-digital temperature sensor allows the DS1624 to measure the ambient temperature and report the temperature in a 12-bit word with 0.0625°C resolution. The temperature sensor and its related registers are accessed through the 2-wire serial interface. Figure 1 in the full data sheet shows a block diagram of the DS1624.

 

Features

Reduces Component Count with Integrated Temperature Sensor and Nonvolatile E2 Memory
Measures Temperatures from -55°C to +125°C in 0.0625°C Increments
±0.5°C Accuracy from 0°C to 70°C
256 Bytes of E2 Memory for Storing Information Such as Frequency Compensation Coefficients
No External Components
Easy-to-Use 2-Wire Serial Interface
Temperature is Read as a 12-Bit Value (2-Byte Transfer)
Available in 8-Pin SO and DIP Packages

 

Connection

Module Chipkit Uno
VDD 3v3
Gnd Gnd
SDA SDA – A4
SCL SCL – A5

Code

I downloaded and imported the following library – https://github.com/bluemurder/DS1624

[codesyntax lang="cpp"]
#include <DS1624.h>

// Sensor presents all address pins connected to ground
DS1624 ds1624(0x00);

void setup()
{ 
// Begin serial connection at 9600 baud
Serial.begin(9600);
}

void loop()
{
float temperature;
bool valid;

// Get current temperature
ds1624.GetTemperature(temperature, valid);

// Print it
Serial.println(temperature);

// Wait a while
delay(1000);
}
[/codesyntax]

 

Testing

Open the serial monitor and you should see the following

24.31
24.31
24.87
25.94
26.44
27.06
27.37
27.81

 

Link

https://datasheets.maximintegrated.com/en/ds/DS1624.pdf

CJMCU-1624 DS1624 temperature sensor, high precision digital thermometer with memory function

Related posts

Chipkit Max32 and ADXL335 accelerometer example

Chipkit Max32 and LSM303 Accelerometer example

Chipkit Max32 and LSM303 Magnetometer example

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Read More