Suggested circuit for driving DS1820 thermometers
Note:
Testing has found out that the DS1820 cannot work with parasitic power on 3.3V. An additional wire is needed to power DS1820 sensors during temperature conversion at 3.3V.
This is a 1-wire driver with minimal component count. Widely available components are used. One general purpose PNP transistor, three resistors and one DIL socket as connector and component holder. NO PCB is required. Resistors R2 and R3 are inserted for current limiting protection of the processor. Fuse F1 is to prevent possible short circuit. The circuit should work also without R2 and R3 leaving only R1 and Q1.
Despite the simplicity of the above 1-wire driver, one can run into troubles. The basic problem of this driver is that the LOW level is intrinsically near the specs of DS1820 and also processor RX pin. In other words; due to V_EB diode, the low output level will be approx 0.7V which is not so good.
A better circuit shown below should meet most 1-wire signal requirements (except transient). It has one transistor more and NMOS technology. The NMOS device is recommended because with a single PNP the LOW level is likely to fail.
When selecting NMOS transistor try to find one with low Gate-Source Threshold Voltage V_GS. For example 2N7002. Despite that I've had success with general purpose BS170 with V_GS=(min 1.0, typ 2, max 3.0) V. For this application integrated solution such as Fairchild NC7WZ07 is not the best solution for home-alone practitioner as suggested by Application Note 214: Using a UART to Implement a 1-Wire Bus Master
When running 1-wire bus on a long run (10m or more), add protection shotky diodes as suggested in various maxim-ic app notes.