View Single Post
Old 10-03-16, 11:14 PM   #4
jeff5may
Supreme EcoRenovator
 
Join Date: Jan 2010
Location: elizabethtown, ky, USA
Posts: 2,428
Thanks: 431
Thanked 619 Times in 517 Posts
Send a message via Yahoo to jeff5may
Default

The 1wire interface is named that because it only needs one wire to interface with the microcomputer. It actually needs two wires connected to operate: the one wire, and ground. In parasitic mode, the sensors grab power from the one wire (named DQ) while there is no data traveling on the line. The easiest way to save cable is to wire a string of sensors on a twisted pair. The sensors all have unique addresses burnt into them during manufacturing, so telling them apart is easy for the microcomputer. All the DQ pins connect to the one wire, and the power and ground wires are all grounded.



When running lots of sensors on one line, a bit of care must be taken to make sure the sensors don't all draw power at the same time. The most common time this happens is when they take a temperature reading. Rather than tell them all to work at once, they are called out in sequence.

To avoid this redundant process and possibly time consuming situation, you can either run a separate power wire to feed the sensors or rig a hard pullup transistor to the DQ line. The sensors only draw around 1.5 milliamps each, so even if there are lots of sensors on the line, all drawing power at once, the raw power draw is not significant enough to stress the interconnect wiring.



These schematics are not completely accurate. The sensors can operate on as low as 3 VDC reliably. However, when running lots of sensors in parasitic power mode, it is desirable to have a little extra voltage "cushion" so the sensors don't starve the data line and corrupt it. Running a smaller pullup resistor or rigging a "hard pullup" transistor helps tremendously here.

When using the Dallas onewire library, it has different commands to use that correspond to parasite power or hard power modes. The parasite power mode commands use the PULLUP function built into the microcontroller to assist the hardwired pullup resistor on the data line pin. The hard power commands do not pull the line high by way of the microcontroller.

More in-depth info can be found here:
https://www.maximintegrated.com/en/a...dex.mvp/id/148

Last edited by jeff5may; 10-06-16 at 07:31 AM.. Reason: pics
jeff5may is offline   Reply With Quote