I have been monitoring the temperature in my house using 1-wire sensors for some time. The easy way is to get a T-Sense and a LinkTH from iButtonLink. That would set you back $70 plus $15 per additional temperature sensor.
There is a cheaper option and that is to build the sensor adapter yourself and to base it on software that can send data on the 1-wire network with the require timings for the 1-wire protocol. Digitemp is a free application that can do this for Linux computers. This post is not about digitemp but rather about how to construct the hardware.
It only takes four diodes and a resistor and it is actually quite possible to make everything fit inside a D-Sub connector. The schematics is shown above. Note that only four of the nine pins on the connector are wired and to avoid any misunderstandings those four pins are 2 (RXD), 3 (TXD), 4 (DTR) and 5 (GND).
One note about how to connect the sensor. The ground and signal pins should of course be connected with the corresponding pins from the serial port according to the schematics above. In addition to that, Vdd must not be allowed to float so it should be connected to signal ground.
Here is a bill of materials for this construction. The article numbers are from Elfa, a Swedish distributor. The total cost for a sensor with a three meter cable runs at 137 SEK which amounts to roughly €12 (tax not included).
Item | Description | Article | Price |
D1 | 6.2V Zener diode 1N5234 | 70-054-08 | 1.34 |
D2 & D3 | Schottky diode 1N5818 | 70-102-67 | 3.47 |
D4 | 3.9V Zener diode 1N5228 | 70-053-58 | 1.37 |
R1 | Resistor 1.5kΩ | 60-724-66 | 3.89 |
Sensor DS18S20 | 73-775-00 | 62.50 | |
D-Sub 9 poles female soldered | 44-055-02 | 9.61 | |
D-Sub cover | 44-130-19 | 12.90 | |
Cable LiHCH 2×0.25mm2 | 55-780-00 | 10.40/m | |
Heat-shrinkable tubing 4.8mm | 55-058-23 | 7.61/m |
2 replies on “Serial temperature sensor hardware”
hi
can you help me to attache that Serial temperature sensor hardware with vb6 or vb2008
[…] a claim my NAS, which could be merely a machine working Debian, an USB to serial adapter and an serial-to-1-wire adapter. Thanks a total lot to Martin Bergek for the writeup as well as ELFA part numbers for […]