]> git.pld-linux.org Git - packages/digitemp.git/blame - dthowto.txt
- pl cosmetics
[packages/digitemp.git] / dthowto.txt
CommitLineData
d8246c58 1
2 Howto build a Serial Adapter for Dallas DS1820 temperature sensors
3
4 Copyright (c) 2001 by Brian C. Lane <bcl@brianlane.com>
5 All Rights Reserved
6
7
8
9 The DigiTemp program for Linux, DOS and Windows 95 uses a simple serial
10port adapter to communicate with the Dallas DS1820 digital temperature
11sensors. These sensors use a protocol called One-Wire or Micro LAN
12(depending on which Dallas documentation you are reading). This protocol
13requires only a ground and a data wire to the device. All power is derived
14from the data line while it is idle.
15
16 The protocol is NOT RS232! The adapter converts the RS232 voltages into
17the +5v needed to communicate with the DS1820. Each byte sent to the serial
18port represents one data bit to the DS1820. See Dallas Semiconductor App
19Note #74 for more information, or the sourcecode for DigiTemp.
20
21 How To build an adapter
22 -----------------------
23
24 If you want a schematic diagram you need to look at page 20 of App.
25 Note #74 from Dallas Semiconductor ( )
26
27
28 Parts List
29 ----------
30
31 1 DB-25 connector or DB-9 connector
32 1 1.5k ohm resistor
33 2 1N5818 Schottky Diode
34 1 1N5228 3.9v Zener Diode
35 1 1N5234 6.2v Zener Diode
36 1 2 position terminal block (for connecting the sensors to adapter)
37
38 Wire cutters and a soldering iron.
39
40 In this document I will refer to the pin functions. The pin numbers for
41 DB-25 and DB-9 are as follows:
42
43 Name DB-25 DB-9
44 ---- ----- ----
45 DTR 20 4
46 RXD 3 2
47 TXD 2 3
48 GND 1,7 5
49
50 NOTE: I have not built a DB-9 version myself. Please let me know if you
51 successfully build one or have problems with it.
52
53 On the DB-25 pins 1 and 7 must BOTH be connected together.
54
55
56 Step Description
57 ------------------------------------------------------------------------
58 1. Solder the 1N5228 3.9v Zener between GND and DTR with the
59 Cathode(the stripe) towards DTR.
60
61 2. Solder the 1.5k ohm resistor between RXD and TXD.
62
63 3. Solder one of the 1N5818 diodes between RXD and TXD with the
64 Cathode(the stripe) towards RXD.
65
66 4. Solder the other 1N5818 diode between RXD and DTR with the
67 Cathode(the stripe) towsrds DTR.
68
69 5. Solder the 1N5234 6.2v Zener between RXD and DTR with the
70 Cathode(the stripe) towards DTR.
71
72 6. Solder RXD to one pin of the terminal block and paint it
73 black. This is the GND connection for the sensors.
74
75 7. Solder DTR to the other pin of the terminal block and paint
76 it red. This is the DATA connection for the sensors.
77
78
79 There! Now you have an adapter.
80
81 Connecting the sensors
82 ----------------------
83
84 You need to connect to wires to the sensor to attach to the terminal
85block. If you look at the sensor so that the label is towards you, with the
86pins facing down the pins are from left to right:
87
88 1. GND
89 2. DATA
90 3. +5v
91
92 Solder your wires to GND and DATA and connect them to the terminal block
93and you're done! Be careful not to overheat the sensor while soldering to
94it. My method is to tin the legs quickly and let them cool off (while
95tinning the others) and then to tin the wires, then attach them quickly with
96a minimum of heat applied.
97
98 One additional note: Because of the voltage(and current) drop across the
99resistor this adapter isn't capable of providing enough current to read
100temperatures above about +70C. This is a limitation of the design, not an
101error with the DS1820 or the software.
102
103 If you have any questions or comments, email me at bcl@brianlane.com or
104subscribe to the digitemp mailing list by sending a blank email to
105digitemp-subscribe@brianlane.com
106
107 Brian Lane
108 bcl@brianlane.com
109 http://www.brianlane.com
110
111 March 13, 2001
This page took 0.105072 seconds and 4 git commands to generate.