Home LCD Projects DS1624 temperature readings on LCD project

DS1624 temperature readings on LCD project

by shedboy71

This time we are going to look at hooking up a DS1624 sensor to an LCD Keypad shield. We will display the temperature on the LCD.

A reminder about the DS1624

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. Here is the module you can quite easily buy for this sensor

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)

Parts List

Description Product Link
Arduino Uno 1pcs UNO R3 CH340G+MEGA328P for Arduino UNO R3 (NO USB CABLE)
LCD keypad shield 1PCS SAMIORE ROBOT LCD Keypad Shield LCD1602 LCD 1602 Module Display
DS1624 CJMCU-1624 DS1624 temperature sensor with high precision with memory function
Connecting Wire 40pcs Dupont jumper wire cable 30cm male to male,female to female,male to female Dupont jump wire line 2.54mm breadboard cable

Connection

Module Arduino (LCD shield)
VDD 5v
Gnd Gnd
SDA SDA – A4
SCL SCL – A5

 

lcd keypad and ds1624

lcd keypad and ds1624

Code

This use the following library  – https://github.com/bluemurder/DS1624

[codesyntax lang=”cpp”]

#include <Wire.h>
#include <DS1624.h>
#include <LiquidCrystal.h>

//setup for the LCD keypad shield
LiquidCrystal lcd(8, 9, 4, 5, 6, 7);

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

void setup() 
{
  // put your setup code here, to run once:
  delay(1000);
  lcd.begin(16,2);
  //line 1 - temperature
  lcd.setCursor(0,0);
  lcd.print("Temp: ");
}

void loop() 
{
  // put your main code here, to run repeatedly:
  delay(1000);
  float temperature;
  bool valid;
  ds1624.GetTemperature(temperature, valid);
  lcd.setCursor(7,0);
  lcd.print(temperature);
  delay(1000);
}

[/codesyntax]

Links

 

You may also like

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