1672f9
1672f9
    Howto build a Serial Adapter for Dallas DS1820 temperature sensors
1672f9
1672f9
          Copyright (c) 2001 by Brian C. Lane <bcl@brianlane.com>
1672f9
                          All Rights Reserved
1672f9
1672f9
1672f9
1672f9
  The DigiTemp program for Linux, DOS and Windows 95 uses a simple serial
1672f9
port adapter to communicate with the Dallas DS1820 digital temperature
1672f9
sensors. These sensors use a protocol called One-Wire or Micro LAN
1672f9
(depending on which Dallas documentation you are reading). This protocol
1672f9
requires only a ground and a data wire to the device. All power is derived
1672f9
from the data line while it is idle.
1672f9
1672f9
  The protocol is NOT RS232! The adapter converts the RS232 voltages into
1672f9
the +5v needed to communicate with the DS1820. Each byte sent to the serial
1672f9
port represents one data bit to the DS1820. See Dallas Semiconductor App
1672f9
Note #74 for more information, or the sourcecode for DigiTemp.
1672f9
1672f9
  How To build an adapter
1672f9
  -----------------------
1672f9
1672f9
  If you want a schematic diagram you need to look at page 20 of App.
1672f9
  Note #74 from Dallas Semiconductor ( )
1672f9
1672f9
  
1672f9
  Parts List
1672f9
  ----------
1672f9
1672f9
  1   DB-25 connector or DB-9 connector
1672f9
  1   1.5k ohm resistor
1672f9
  2   1N5818 Schottky Diode
1672f9
  1   1N5228 3.9v Zener Diode
1672f9
  1   1N5234 6.2v Zener Diode
1672f9
  1   2 position terminal block (for connecting the sensors to adapter)
1672f9
1672f9
  Wire cutters and a soldering iron.
1672f9
1672f9
  In this document I will refer to the pin functions. The pin numbers for
1672f9
  DB-25 and DB-9 are as follows:
1672f9
1672f9
  Name    DB-25    DB-9
1672f9
  ----    -----    ----
1672f9
  DTR      20       4
1672f9
  RXD      3        2
1672f9
  TXD      2        3
1672f9
  GND      1,7      5
1672f9
1672f9
  NOTE: I have not built a DB-9 version myself. Please let me know if you
1672f9
        successfully build one or have problems with it.
1672f9
1672f9
	On the DB-25 pins 1 and 7 must BOTH be connected together.
1672f9
1672f9
1672f9
  Step          Description
1672f9
  ------------------------------------------------------------------------
1672f9
   1.           Solder the 1N5228 3.9v Zener between GND and DTR with the
1672f9
                Cathode(the stripe) towards DTR.
1672f9
1672f9
   2.           Solder the 1.5k ohm resistor between RXD and TXD.
1672f9
1672f9
   3.           Solder one of the 1N5818 diodes between RXD and TXD with the
1672f9
		Cathode(the stripe) towards RXD.
1672f9
1672f9
   4.           Solder the other 1N5818 diode between RXD and DTR with the
1672f9
		Cathode(the stripe) towsrds DTR.
1672f9
1672f9
   5.           Solder the 1N5234 6.2v Zener between RXD and DTR with the
1672f9
		Cathode(the stripe) towards DTR.
1672f9
1672f9
   6.           Solder RXD to one pin of the terminal block and paint it
1672f9
                black. This is the GND connection for the sensors.
1672f9
1672f9
   7.           Solder DTR to the other pin of the terminal block and paint
1672f9
                it red. This is the DATA connection for the sensors.
1672f9
1672f9
1672f9
   There! Now you have an adapter.
1672f9
1672f9
   Connecting the sensors
1672f9
   ----------------------
1672f9
1672f9
   You need to connect to wires to the sensor to attach to the terminal
1672f9
block. If you look at the sensor so that the label is towards you, with the
1672f9
pins facing down the pins are from left to right:
1672f9
1672f9
   1. GND
1672f9
   2. DATA
1672f9
   3. +5v
1672f9
1672f9
   Solder your wires to GND and DATA and connect them to the terminal block
1672f9
and you're done! Be careful not to overheat the sensor while soldering to
1672f9
it. My method is to tin the legs quickly and let them cool off (while
1672f9
tinning the others) and then to tin the wires, then attach them quickly with
1672f9
a minimum of heat applied.
1672f9
1672f9
  One additional note: Because of the voltage(and current) drop across the
1672f9
resistor this adapter isn't capable of providing enough current to read
1672f9
temperatures above about +70C. This is a limitation of the design, not an
1672f9
error with the DS1820 or the software.
1672f9
1672f9
  If you have any questions or comments, email me at bcl@brianlane.com or
1672f9
subscribe to the digitemp mailing list by sending a blank email to
1672f9
digitemp-subscribe@brianlane.com
1672f9
1672f9
   Brian Lane
1672f9
   bcl@brianlane.com
1672f9
   http://www.brianlane.com
1672f9
1672f9
   March 13, 2001