Shop OBEX P1 Docs P2 Docs Learn Events
Is there a practical limit to how many 1-wire devices the Prop can handle on a — Parallax Forums

Is there a practical limit to how many 1-wire devices the Prop can handle on a

ElectricAyeElectricAye Posts: 4,561
edited 2009-10-23 05:54 in Propeller 1
Ladies and Gentlemen,

it is my sincere hope to obtain data from about 30 digital thermometers of the 1-wire variety, specifically the DS18B20 (data sheet attached). For a long time I've been using Micah Dowty's Spin version of the 1-wire protocol, obex.parallax.com/objects/342/ , which has worked well for up to 6 devices but I know Micah had some sort of limitation built into his code, not to take more than 8 devices, I think. So I'm now wondering if there are practical limits to how many devices one can, or should, use with 1-wire.

In the data sheet on page 8, I see that if I reduce the resolution of my DS18B20s down to 10 bits, then I get a conversion time of no more than 189 ms per device. So at first glance I would say that 30 devices could give me updated information within every 6 seconds or thereabouts. But I'm guessing it's not so simple as that. I'm guessing there are other forces at work in the universe of which I am not aware and that hanging more devices on a 1-wire line does not result in total conversion requirements that are linear and simple-minded. I'm guessing there's some kind of exponential equation lurking around here somewhere. Furthermore, I'm guessing there are current-sinking issues of some sort to contend with. But despite all my poking around on the Maxim website, etc. I've not been able to find anything that tells me what sort of limitations to be aware of.

Anybody know? Anybody have some sort of rules of thumb or direct experiences with using about 30 1-wire devices on a single line?

thanks for your insights,
Mark

Comments

  • Cluso99Cluso99 Posts: 18,069
    edited 2009-10-23 04:05
    The limit is to do with electrical issues like the length and type of line, the electrical drive and loadings of the ICs involved, interface used (we presume it is 3V3 logic here), and speed of the data and of the chips internals as well. There is no rule of thumb here.

    Perhaps you could describe how you connect to the DS18B20s (same pcb, on other pcbs, how long are the wires, etc). Then we may be able to give you a better estimate.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Links to other interesting threads:

    · Home of the MultiBladeProps: TriBlade,·RamBlade,·SixBlade, website
    · Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
    · Prop Tools under Development or Completed (Index)
    · Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) ZiCog (Z80) , MoCog (6809)
    · Search the Propeller forums·(uses advanced Google search)
    My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
  • pjvpjv Posts: 1,903
    edited 2009-10-23 04:17
    Hi Alectric;

    Here again the SX might be your answer. Depending on the precision and accuracy you need, you might be able to use simple thermistors or RTD's. Possibly even thermocouples. I believe an SX48 could probably measure 32 devices when using some unconventional approaches.

    One can make quite an effective software AD converter with only a single pin in an SX, or with a Propeller for that matter, although my experience is with the SX.

    As far as 1 wire temperature sensors are concerned, the limiting factor would likely be the current load when performing multiple conversions simultaneously. The communication overhead would be some 50 or so microsec per message, and those will need to be sequential.

    Cheers

    Peter (pjv)
  • Mike GreenMike Green Posts: 23,101
    edited 2009-10-23 04:18
    Maxim/Dallas has a number of white papers on 1-wire networks discussing sizes of networks, number of devices, lengths of segments, drive requirements, recommendations for types of cable, etc. They have driver chips that could be interfaced to a Prop that handle the various cases where specific slew rates, brief high current active pullups, etc. are important.

    30 DS18B20s is a relatively small network as these things go. You could have several times that if you follow the recommendations.
  • ElectricAyeElectricAye Posts: 4,561
    edited 2009-10-23 04:54
    Mike Green said...
    Maxim/Dallas has a number of white papers on 1-wire networks....

    I'm guessing you mean these: www.maxim-ic.com/appnotes10.cfm/ac_pk/1 I was skimming through them but so far nothing has jumped out at me. I guess I'll keep looking through them orrrrrr...
    Mike Green said...


    ....30 DS18B20s is a relatively small network as these things go. ...

    Maybe I'll just go on that comment and hope for the best. smilewinkgrin.gif
    Cluso99 said...
    ....Perhaps you could describe how you connect to the DS18B20s

    All 30 of the DS18B20s will be running along the edge of 2 separate PCBs, each 12 inches long, which are mounted end-to-end with their connections jump-wired to each other by very short pieces of wire. The Propeller master will most likely be mounted somewhere about 5 feet from those 2 PCBs. They all use the pull-up resistor method, not the parasitic version.
    pjv said...
    Here again the SX might be your answer...
    Well, you might be right. But everything I've done up to now has been Propeller-based and DS18B20s have been what all the proto-prototypes have been using, so this is supposed to "merely" expand upon some work I have done already. So I'm somewhat in the Prop groove right now and would shatter into a million arthritic pieces of glass if I had to start something new at this stage/my age. smile.gif

    thanks, you guys, I'll probably sleep on this tonight as it's getting late here...
    sweet dreams,
    Mark
    smurf.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Watching the world pass me by, one photon at a time.
  • Mike GreenMike Green Posts: 23,101
    edited 2009-10-23 05:54
    I'd at least glance through Appnote # 148, 187, 244, 3925, 4306, and 4255.
Sign In or Register to comment.