DS1820 Temp sensor

From LVL1
Revision as of 23:59, 11 February 2011 by Bpwagner (talk | contribs) (→‎How to)
Jump to navigation Jump to search

Introduction

DS1820 digital temp sensor In this experiment we will connect the DS1820 temperature sensor to the arduino, read the temperature and display it on the LCD.

This is a complex little chip. Please check out the resources at the bottom of this page for lots of information!


Components Needed

  • Freeduino or Arduino or clone
  • USB cable for Freeduino
  • Freeduino development software - download here!
  • Solderless Breadboard
  • Hookup wire 22gauge solid
  • DS1820 digital sensor
  • 4.7K resistor (Yellow Violet Red)
  • LCD Display

How to

  1. Use the breadboard and hook up the circuit as seen below. You have to use the 4.7K resistor. The device is set up in parasitic power mode. Hook the digital pin to any of the digital pins that are open. I used digital pin 3.
  2. Download and install the library TCL 3.6.0 from http://milesburton.com/wiki/index.php?title=Dallas_Temperature_Control_Library#Code.2FLibrary. This zip file contains both the OneWire library and the DallasTemperature libraries.
  3. Copy the folders in the zip file to the 'libraries' folder in your arduino install or into the mydocuments/arduino/libraries folder. You might have to make that folder. You will know if your libraries are correctly installed if you see them listed under Sketch->Import Library in the Arduino IDE
  4. This library does the heavy lifting so you do not have to! This is why we create libraries!

Pictures

Schematic

Onewire.gif

Code


Troubleshooting

Are power and ground set up correctly?

Double check the schematic.

Resources

http://www.arduino.cc/playground/Learning/OneWire

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1199313338

http://www.phanderson.com/arduino/ds18b20_1.html

http://www.arunet.co.uk/tkboyd/e1didx.htm

http://milesburton.com/wiki/index.php?title=Dallas_Temperature_Control_Library

http://www.pjrc.com/teensy/td_libs_OneWire.html