HOME - - - - - Delphi Tutorials TOC - - - - - - Other material for programmers
INDEX TO MicroLan / 1-WIRE PROGRAMMING TUTORIALS Delicious Bookmark this on Delicious Recommend to StumbleUpon

Choosing your 1-Wire chip power mode

Many of the chips in the 1-Wire family from Dallas Semiconductor can be powered "parasitically"... that's Dallas's (apt) name for the system used.

The advantage of parasitic powering is that it means you can have a two wire MicroLan. ("MicroLan" is just Dallas's trademarked name for a bunch of 1-Wire chips "playing nicely" with each other and a "master" device, e.g. a PC or simple microcontroller, e.g. Arduino, in charge of the network of 1-Wire sensors, actuators, storage units, etc.) If you don't use parasitic powering, then you need to run three wires from chip to chip to chip. (An aside: You should be aware that MicroLans don't like star topographies. If you need a star, you need a hub to split it into separate, non- star, legs.)

I've often used parasitic powering entirely successfully. However, if you have a lot of chips on the MicroLan, or high poll rates, the time may come when supplying the chips which can be powered parasitically makes sense. It isn't difficult... especially if you provided for the possibility that you'd like to make the change when you first set up your MicroLan.

For example...

Just as an example, let's consider a MicroLan that is reading temperatures in various parts of a large greenhouse.

We'll assume you're using chips from the DS182x family, in a TO92 package, the little blob of plastic with three "legs".

To use those chips parasitically, you just connect two of the legs to one another, and that leaves you with two connections which go to the two wires of the basic MicroLan.

Now... and this is what I meant about giving yourself options for the future... rather than doing that the "obvious" way, using either a small PCB, or simple discrete wires, connect each of the three pins to a separate track or wire, and THEN make your connections to the MicroLan. If later, you want to use non parasitic power, then all you have to do is change a link, or disconnect one of the wires, and you can then supply the chip with its independent V,cc easily, without disturbing what would be fiddly connections to the package's pins.

Here are the details of which pin is which on the DS1820. The DS18B20 and DS1822 use the pins the same way...

DS1820 pinout diagram

The DS1820's middle leg goes to the 1-Wire data line.

The DS1820's leg marked "See text" should be attached to the 5v, or, for parasitic power, connect this pin to ground (zero volts))

And the DS1820's "1-Wire 0v" should be attached ground,i.e. to zero volts.

(If the above seems over-explained, please remember that this page may be accessed by people who want more than just an idea of what this "parasitic power" thing is all about.)

How does it work? What's the difference?

So... that's the "how to" of it. Now let's look a little deeper at what is going on.

Anything electronic needs a source of power. It must be "fed" with a voltage. All of the 1-Wire chips can "talk" with the master controlling the MicroLan, so there must be a "data" line between them.

When a 1-Wire chip is powered parasitically, here's what happens: For much of the time, the master controller keeps the voltage in the one wire between it and the 1-Wire chip at 5 volts. (That wire is called the data/power line.) During this time, a tiny capacitor inside the chip is charged up until it is "full". Think of it as a mini rechargeable battery. Once in a while, the master (or, if given permission, a moment earlier, one of the controlled chips on the MicroLan) will make the data/power line go to zero volts. Every chip on the MicroLan will "see" that change of voltage. The pattern of highs (5v) and lows (0v) is used as a "Morse code" with which the master sends commands out to the 1-Wire chips, and with which they "answer" back.

What's cool is that as long as the "talking" phase, when the data/power line is sometimes low, is isn't going on all the time, the capacitors in the chips act like little "UPS"es inside each 1-Wire chip, tiding it over the times when the power (and data) line is at zero volts. The idea is simple. I bet getting the design right was less than simple!

   Search this site or the web        powered by FreeFind
  Site search Web search
Site Map    What's New    Search   BEWARE: There is stuff at my other two sites that this search won't reveal. Go to either site (see links below) and use that site's FreeFind search button.
In addition to the tutorials for which this page serves as Table of Contents, I have other sites with material you might find useful.....

Sheepdog Software homepage.
My Arunet homepage.

... and some links to specific pages within them you might want....

Main index to 1-Wire / MicroLan stuff.
Some pages for programmers.
Using the parallel port with programs written in Delphi.

Click here if you're feeling kind! (Promotes my site via "Top100Borland")
Ad from page's editor: Yes.. I do enjoy compiling these things for you... hope they are helpful. However.. this doesn't pay my bills!!! If you find this stuff useful, (and you run an MS-DOS or Windows PC) please visit my freeware and shareware page, download something, and circulate it for me? Links on your page to this page would also be appreciated!
Click here to visit editor's freeware, shareware page.

Link to Tutorials main page
Here is how you can contact this page's author, Tom Boyd.

Valid HTML 4.01 Transitional Page WILL BE tested for compliance with INDUSTRY (not MS-only) standards, using the free, publicly accessible validator at validator.w3.org

If this page causes a script to run, why? Because of things like Google panels, and the code for the search button. Why do I mention scripts? Be sure you know all you need to about spyware.

....... P a g e . . . E n d s .....