Create a weatherstation or temperature monitor using the very cool digital temperature sensor DS1820.

I use this setup to monitor a server room, and as a weatherstation.

This project consists of:

  • A Dallas 1-Wire bus network
  • Interface between RS-232 and the Dallas 1-Wire system
  • Digital temperature sensors connected to the Dallas 1-Wire bus (DS1820/DS18s20)
  • Software setup to gather and graph temperatures

Updated 2007-11-18 to include automatic graphing scripts and pictures of real life implementations of this system.

Step 1: You Need

This is what you need to make a weather station or temperature logger:

  • Some linux skills
  • Basic electronics skills, soldering etc..

  • 1 6.2V Zener diode (1N5234)
  • 1 3.9V Zener diode (1N5228)
  • 2 Schottky diodes (1N5818)
  • 1 1.5 k resistor
  • 1 2pin screw terminal
  • 1 D-sub 9 female connector with solder points
  • 1 small piece of perfboard.
  • One or more Dallas Semiconductor DS1820 or DS18s20 digital temperature sensor
  • Cat5 cabling
  • Shrink tube
<p>What's the hell with tempsensor-0.1.tar.gz ??</p>
<p>does anybody have tempsensor-0.1.tar.gz???</p>
<p><a href="https://www.instructables.com/files/orig/FO7/E845/F9053Y6O/FO7E845F9053Y6O.null" rel="nofollow">tempsensor-0.1.tar.gz</a>:</p>403 Forbidden<p>Request forbidden by administrative rules.</p>
<p>Where can i find the trmpsensor-0.1.tar.gz file?</p>
Cool Stuff! I made the device and used a USB to serial adapter. changed tty0 to ttyUSB0 and all worked perfectly. Now the charts. I am unable to get the files to be able to complete the charts. can any one help? I am currently running a cron job with some scripts to change the data to CSV type file to be able to chart the data using other software.
Same here, just need the tempsensor tar file, can someone send it to me, thanks in advance.
hi, <br>anyone would be nice enough to send me the tempsensor-0.1.tar.gz file ? <br>it seems that the file is unavailable since Mar, 6... <br> <br>
Hi all, can anyone sent me the link of tempsensor-0.1.tar.gz ?
hello all <br> <br>where can i download this file tempsensor-0.1.tar.gz ???
Cool! Excellent instruction.
I just finished making one of these, but will not be able to test it out until I receive my sensors. In the meantime, I'm getting a voltage of 5.75V between GND and DQ. Would this be too high as I read that the DS18S20's operating voltage range is 3.3-5.5V?
Can i use 1N5819 instead of 1N5818?
I have little experience with soldering so I made a breadboard version of the circuit, see pdf file I added, I used Ubuntu for Digitemp and everything works fine, rrd-tool and web server setup. Tried to use Windows version of Digitemp, did not work. Thanks for making this instructable, it showed me how to use 1-wire bus.
This is EXACTLY what I am looking for, but unfortunately it uses DALLAS DS1820 sensors, I do not have handy at the moment.<br><br>Would this also work with a LM35DZ? If so, what would be the differences in the scheme?<br><br>BTW, great instructable.
Will this interface work with other 1-wire devices such as iButtons? And can it do bi-directional serial (read+write) or just simply reading from the device?
Great Instructable! Using a breadboard, everything worked out smoothly. I also used the <a href="http://martybugs.net/electronics/tempsensor/hardware.cgi">MartyBugs</a>' schematic to confirm the setup. Very nice and fun, thanks!
Is it possible to make this work with a db25 instead of a db9?
Db25: <br>Pin 2 Transmit<br>Pin 3 Receive<br>Pin 7 Ground<br>Pin 20 DTR (if using non-parasitic)<br>
I tried this on Linux (Ubuntu) and when I typed this into the terminal &quot;digitemp -s /dev/ttyS0 -i&quot; i get this <br/><br/>&quot;DigiTemp v3.5.0 Copyright 1996-2007 by Brian C. Lane<br/>GNU Public License v2.0 - <a rel="nofollow" href="http://www.digitemp.com">http://www.digitemp.com</a><br/>Turning off all DS2409 Couplers<br/><br/>Searching the 1-Wire LAN&quot;<br/><br/>Problem is it doesn't show any sensors....<br/>
It's not physically working. Check all the components are correctly polarised (My goof was wiring the D&quot;18S20 back to front)
<strong>Loving this</strong> I have wanted to do this ever since reading about it in the linux toys book. on question I have though what is the maximum number of sensors that the 1 wire network can handle? <br/>
Depends on whether it's in parasitic mode or non parasitic. From the number of components used, I'd say it in parasitic mode. Therefore, no more than 3.<br>In non-parasitic mode (2 more components required) 10 or 12 would be quite happy. With a separate 5 volt PSU, several thousand.
you have to work in weather forcast
thats really great,i've done it and it works really fine with the 1 wire driver from maxim, now i'm trying to read the data in LabView and i'm really close<br /> great job<br /> thanks&nbsp;
hi please write vb code for monitoring graph
I don't know if I have done it right, but when I try to run the logdata script manually I get a error. What do you suggest? beau@beau-desktop:~$ php /etc/tempsensor/graphdata.php ERROR: opening '/var/log/digitemp_rrd/0.rrd': No such file or directory ERROR: opening '/var/log/digitemp_rrd/0.rrd': No such file or directory ERROR: opening '/var/log/digitemp_rrd/0.rrd': No such file or directory ERROR: opening '/var/log/digitemp_rrd/0.rrd': No such file or directory ERROR: opening '/var/log/digitemp_rrd/0.rrd': No such file or directory ERROR: opening '/var/log/digitemp_rrd/0.rrd': No such file or directory ERROR: opening '/var/log/digitemp_rrd/0.rrd': No such file or directory ERROR: opening '/var/log/digitemp_rrd/0.rrd': No such file or directory Warning: fopen(/var/www/temperature/index.html): failed to open stream: Permission denied in /etc/tempsensor/graphdata.php on line 75 Warning: fwrite(): supplied argument is not a valid stream resource in /etc/tempsensor/graphdata.php on line 76 Warning: fclose(): supplied argument is not a valid stream resource in /etc/tempsensor/graphdata.php on line 77 Warning: fopen(/var/www/temperature/index_0.html): failed to open stream: Permission denied in /etc/tempsensor/graphdata.php on line 102 Warning: fwrite(): supplied argument is not a valid stream resource in /etc/tempsensor/graphdata.php on line 103 Warning: fclose(): supplied argument is not a valid stream resource in /etc/tempsensor/graphdata.php on line 104 Warning: fopen(/var/www/temperature/index_all.html): failed to open stream: Permission denied in /etc/tempsensor/graphdata.php on line 102 Warning: fwrite(): supplied argument is not a valid stream resource in /etc/tempsensor/graphdata.php on line 103 Warning: fclose(): supplied argument is not a valid stream resource in /etc/tempsensor/graphdata.php on line 104
I'm a little shy (actually lazy) when it comes to circuit boards and solder. I noticed a similar tutorial was using a <a rel="nofollow" href="http://www.maxim-ic.com/quick_view2.cfm/qv_pk/2982">http://www.maxim-ic.com/quick_view2.cfm/qv_pk/2982</a> to interface from serial to RJ-45.<br/><br/>Looking at the documentation it appears this would do the same as your diodes and soldering and give you a RJ-45 to boot. The site appears to spec the device for $21. Any idea how that would compare to soldering diodes in price and functionality?<br/>
After looking at the site a little longer I found a number of different adapters (USB, Serial, etc). Has anyone tried these?<br/><br/><a rel="nofollow" href="http://www.maxim-ic.com/products/ibutton/products/adapters.cfm#rs232">http://www.maxim-ic.com/products/ibutton/products/adapters.cfm#rs232</a><br/>
I built it, but having zero electronics experience, and not much software experience, I am not sure if it works. After downloading various programs to read it, including 1-WireViewer, Lampomittari, and I can't seem to get it to recognize my interface. I guess it is a hardware problem in how I constructed it. What can I do to troubleshoot this device with a multimeter? What is the proper voltage that should be coming out of my serial port on my Dell Latitude D620 notebook? I am getting 4.98 Volts now. If someone could get me started, I would be eternally grateful!
That was a quick reply! I have an iMac and a Gigaware USB-serial converter. I guess I'll try that, but now that will introduce its own issues with software.
Some notebooks don't output the full RS232 voltage of +/- 12-ish volts. Try the device on a desktop computer first to figure out if the voltage level is causing the problem.
Very neat! How many sensors can you hook up? (I apologize if this was asked and answered but I didn't see it when I read through.)
It will tell you how many sensors can be connected on the datasheet of the 1-wire sensor.
Wow, After attempting to make the interface, I can safely say that you are GREAT at using protoboards.<br/><br/>Do you know how I can use this on windows?<br/>I have tried what you said below but it doesn't work, What does the digitemp -aq <strong>&gt; c:\path\to\webserver\root\temperature.txt</strong> mean?<br/>
Thanks, -a means aquire, -q means quiet the "> file" means put the output into this file I don't know if this is the right syntax in windows. I don't know anything about windows, so I can't help you there...
Oh, Thanks anyway, I might just have to try the alternate install of Ubuntu (128mb RAM)
That is a definite thing i'm going to have to do since I can't get it to work in windows....
Scratch that :-)
By the way, Why do you reccommend using CAT5 cable over telephone cable?
I had some major issues when using telephone cable. I have an installation using cat5 with about 50 meters of cable, and that one works just fine.
Issues? What was happening with the telephone wire to cause major issues?
Hey, I'm back. I have been able to make it run on Windows but it can't dectect my interface, Is there a way to test what I have wired incorrectly?<br/><br/>BTW to get it to run on windows you need to<br/><ul class="curly"><li>download the current Windows digitemp</li><li>find the digitemp.exe file in the digitemp file</li><li>copy that to WINDOWS/system32</li><li>Go into command prompt and type &quot;digitemp&quot;, That will give you the syntax of the command</li><br/></ul>Hope I could help anyone that is trying to use it on Windows...<br/>
looks good, nice job. just wondering, because someone asked before, and I have the same question, but it wasnt answered: Can i use a DS18S20+ sensor? the DS1820 is discontinued, and I can get the DS18S20+ free, as a sample. :) plz respond, THANKS!
I think any DS18*20* would work. try googling the digitemp documentation..<br/>
Yes you can use the DS18S20+ (All the + indicates is the lead free status...)
hi chr this tutorial is very Useful. but i want to Setup software for WindowsXP . can you help me? (i know you are Professional)
Hehe I don't know if I'm professional. Most people who call them selves professional would probably have bought a ready made system for $5000 ;)<br/><br/>Anyways, I find doing these kind of things on windows to be kind of a pain.<br/>Although most of the software is available for windows.<br/><br/>Digitemp is available here: <a rel="nofollow" href="http://digitemp.com/software/windows/">http://digitemp.com/software/windows/</a><br/>I would think dtreg25.zip is the most current version.<br/>With digitemp the setup would be pretty much the same as in Linux.<br/>Make a batch file, i.e. readtemp.bat containing a line like this:<br/>&quot;digitemp -aq &gt; c:\path\to\webserver\root\temperature.txt&quot;<br/><br/>There are many other programs to run 1-wire sensors on windows. A google search brings up plenty.<br/>For example: <a rel="nofollow" href="http://www.henriksens.net/1-wire/">http://www.henriksens.net/1-wire/</a><br/><br/>Good luck making it work on Windows.<br/><br/>Maybe I'll give it a go myself, and post a step on win32, but now I'm in the middle of my final exams.<br/>
Have u had a go at making it run on windows?
Can I use a DS18S20+ (i think the plus indicates the RoHS status)
Or this? DS18S20+PAR

About This Instructable




Bio: I like microcontrollers and LEDs :D
More by chr:Reverse Engineering: RGB LED Bulb with IR remote Reverse engineering: USB controlled home automation hack LED Cube 8x8x8 
Add instructable to: