DS1820 Temp sensor: Difference between revisions

From LVL1
Jump to navigation Jump to search
Bpwagner (talk | contribs)
Bpwagner (talk | contribs)
No edit summary
Line 23: Line 23:
#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
#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
#This library does the heavy lifting so you do not have to!  This is why we create libraries!
#This library does the heavy lifting so you do not have to!  This is why we create libraries!
==Pictures==


==Schematic==
==Schematic==
Line 31: Line 28:


==Code==
==Code==
First begin by running the program sample.pde in the folder where the OneWire library is (under example).  You should see some messages when you turn on the serial monitor.  Make sure you set the correct pin for the sensor at the top of the program.
Next run the simple.pde program in the DallasTemperature library.  You should start seeing actual temperature readings!
Finally run the program below.  It displays the temp on the LCD!


<pre>
<pre>

Revision as of 00:11, 12 February 2011

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!

Schematic

Code

First begin by running the program sample.pde in the folder where the OneWire library is (under example). You should see some messages when you turn on the serial monitor. Make sure you set the correct pin for the sensor at the top of the program.

Next run the simple.pde program in the DallasTemperature library. You should start seeing actual temperature readings!

Finally run the program below. It displays the temp on the LCD!



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