Electronic – DS1822 1-Wire Sensor, Parasitic Power, and Strong Pull-Up Circuit

1-wiremicrocontrollermosfetshort-circuit

This question would be common to any parasitic 1-Wire devices from Maxim/Dallas Semiconductor. I have a functioning 1-Wire circuit to a DS1822. The 1-Wire protocol has been bit-banged on a 3.3v MCU (mbed lpc1768). I believe this question would be pertinent to any microcontroller used in the same manner.

As reference, I have used the DS1822 datasheet http://datasheets.maximintegrated.com/en/ds/DS1822.pdf.

My 1-Wire circuit uses a single digital pin on the MCU as an open drain pin connected to the 1-Wire bus and the DS1822's DQ pin. (Open drain is managed by setting the pin to output and setting it to low in order to pull the 1-Wire bus low, or setting the digital pin to an input in order to allow a 2.2k resistor to pull the bus high).

Up until now I have powered the DS1822. I would like to implement the 'Strong Pull-Up' circuit defined in the datasheet above as specified in the circuit in 'POWERING THE DS1822'. The strong pull up circuit calls for a MOSFET driven by a second digital pin (SPU) on the MCU that can pull the 1-wire bus straight to the 3.3v rail during operations that require additional current and a sustained voltage level.

The question I have specifically surrounds the possibility of a short circuit. If I implement the circuit as shown in the diagram, it would seem that as long as my digital pin (DQ) is set to an input while the second digital pin (SPU) enables the 'Strong Pull-Up', then a short circuit would not occur.

However, should my digital pin (DQ) be set to an output and driven low while the second digital pin (SPU) has enabled the 'Strong Pull-Up', it seems that this would create a short circuit through the DQ pin.

As I am only surface level versed in circuits, I'm seeking the expertise of this group to confirm that this is indeed a danger. Additionally, I'd like to understand what could be done to protect the input pin under this scenario. Would the addition of a resistor between the 3.3V rail and the MOSFET ensure that the level of current sunk by the digital pin stays within the MCUs' parameters enough?

Additionally, how would one determine the 'right' MOSFET for the job. What characteristics should I look for?

The circuit is driven by a 3.3v MCU and the 1-Wire bus uses a 2.2k pull-up resistor.

Thank you,
Karl

Best Answer

As shown here, there are two things that can be done.

enter image description here

The Strong Pullup through the Mosfet, should have a appropriately sized Current Limiting Resistor, allowing the tens of milliamps required. If those tens of milliamps are more than your ic's pin can sink, then a secondary in-line resistor (Rt) can be used on the line, for protection.

Best source of information regarding one-wire is of course, Maxim-Dallas's app notes.