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