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!
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:
tar -xzf digitemp-3.6.0.tar.gz
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:
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!)