3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Temperature sensor / weatherstation

Step 3Testing the RS232 interface

Testing the RS232 interface
1)
Download and install digitemp.
On Debian and Ubuntu Linux, this is done by running `sudo apt-get install digitemp`.

2)
Connect a DS1820 to your circuit.
The middle leg goes in the DQ port, the other two legs go in GND

3)
Connect the circuit to a computers rs232 port.
I only cover doing this with Linux, but it is also possible to do this in windows..

4)
If the command `digitemp` doesnt work, it's because there are multiple versions of digitemp.
type digitemp, then press tab to see all of them.. digitemp_DS9097 is the right one for this 1wire busmaster.
Just for the sake of simplicity, we want the command to be `digitemp`, not `digitemp_DS9097`.
type `sudo ln -s /usr/bin/digitemp_DS9097 /usr/bin/digitemp`

5)
As root, or using sudo:
Run `digitemp -s /dev/ttyS0 -i`. This searches the 1wire network for sensors, and creates a config file for digitemp. If you are using COM2, use -s /dev/ttyS1.
Run `digitemp -a` to read the temperature of the connected tempsensor.
See the screenshot

6)
Do this for all the sensors you are going to use, and write down the addresses for each one.
When you have multiple sensors, it's nice to know which is which.
« Previous StepDownload PDFView All StepsNext Step »
3 comments
Aug 28, 2009. 8:19 PMtitan44 says:
Is it possible to make this work with a db25 instead of a db9?
Jan 27, 2011. 10:35 AMBrafferton says:
Db25:
Pin 2 Transmit
Pin 3 Receive
Pin 7 Ground
Pin 20 DTR (if using non-parasitic)
Apr 10, 2010. 5:21 PMeng_islam_h says:
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
great job
thanks 
Sep 22, 2007. 10:15 PMandrew.mac says:
what about a mac
Oct 26, 2007. 5:58 AMTomP says:
For a Mac you'd need to work through a USB-to-serial converter. Instead of VB you would use Obj-C (if you like C) or PyObjC (if you like Python) and Interface Builder. The open-source 'BitPim' program, which transfers data to and from LG cell phones, is a good example of how to do serial IO over USB with a Python app. (It has a GUI made with WxPython, on the other hand, which is cross-platform, but not pleasant to work with. A native Mac interface made with Interface Builder and PyObjC would be easier to create and prettier to look at).
Oct 26, 2007. 6:06 AMTomP says:
D'oh! I was still thinking about Dr_Acula's recent related article when I wrote those comments about VB and constructing a GUI.

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
652
Followers
7
Author:chr
I like microcontrollers and LEDs :D