lookass.ch > Projects > Computer > Serial Port Temperature Sensor
 
Hardware
I recently came across a guide on how to build a low-cost temperature sensor for your PC. It requires very few components and works in collaboration with the open source software Digitemp.
The digitemp software (v. digitemp-3.6.0.tar.gz as I write this page) contains an image, which shows the required components:

So basically, go to an electronic store and buy:
- 2x Schottky Diode (1N5819 or "5819 9636")
- 1x 3.9 V Zener Diode (BZV40C)
- 1x 6.2 V Zener Diode (1N5341B and "0434")
- 1x 1.5 kOhm Resistor
You can take an old mouse and cut the serial cable, because we need a serial connector too!
Now, you only need the Sensor itself, a MAXIM DS18S20. You can try to knock at theyr door and ask for free samples, they are normally happy to send you some samples!

Software
Now that our sensor is built, we need to measure the temperature. The following is an example on how to do this under Linux:
1) Download digitemp (v. 3.6 currently) and compile DS9097:
wget http://www.digitemp.com/software/linux/digitemp-3.6.0.tar.gz
tar -xzf digitemp-3.6.0.tar.gz
cd digitemp-3.6.0
make ds9097
cd ..

There are multiple digitemp applications, but we need DS9097, which we just compiled.
2) Plug your sensor to the COM-Port of your computer.
3) Query the COM-Port (/dev/ttyS0 in the example) for sensors:
./digitemp-3.6.0/digitemp_DS9097 -s /dev/ttyS0 -i
This will write a file containing the specs of the sensor.
4) Query the sensor for the temperature:
./digitemp-3.6.0/digitemp_DS9097 -a
This should output the current temperature in Celsius and Fahrenheit.

DB-9 connector information
DTR: pin 4
RXD: pin 2
TXD: pin 3
GND: pin 5

You saw that this was a very short instruction. Please read through the following sources for more information:
- http://martybugs.net/electronics/tempsensor/ (my main source, the most important page!)
- http://www.digitemp.com/documentation.shtml
 
Files
 
digitemp-3.6.0.tar.gz: Digitemp Source Package
 
soldering_plan_visio.vsd: Breadbord Plan Source File
 
soldering_plan.png: Breadbord Plan
 
my_sensor.jpg: My soldering for testing purposes.
 
dthowto.txt: Digitemp how-to on how to build a COM-Port adapter for Temp. Sensors.
 
 
Images
   
 
 
Login: 
Pass: 
 
 
     
     
2004 - 2017 / lookass.ch
makememad@lookass.ch