Shop OBEX P1 Docs P2 Docs Learn Events
DS2409 and longer 1-wire connections — Parallax Forums

DS2409 and longer 1-wire connections

FletchFletch Posts: 2
edited 2005-05-13 21:54 in BASIC Stamp
I want to connect about·two dozen 1-wire devices to a stamp over about 100' of length. Obviously, a single microcontroller pin cannot drive this much wire. Will buffering a 1-wire connection through a DS2409 MicroLan coupler allow a longer 1-wire connection than attaching all 1-wire connections directly to a single·i/o pin with a pull-up resistor? Or does it just switch a specific leg in and out of the circuit? My understanding is that a single i/o pin can only drive about 6 feet of wire. Do I have to use·a DS2480B Serial 1-Wire Line Driver to do this?

Fletch

Comments

  • allanlane5allanlane5 Posts: 3,815
    edited 2005-05-13 17:54
    I would recommend an RS-485 transciever per node for this. It can drive 4000' (yes, that's four thousand feet) of cable. I believe you'll need three wires -- A signal, B signal, and GND.

    I'm not familiar with the 'micro-LAN' product, though.
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-05-13 18:53
    allen, microLAN is another name for 1-wire (I didn't know either until I looked it up).

    fletch, an I/O pin can drive a very long line if the baud rate is set low enough. The main problem with long·distance wired·communications is the capacitance associated with the line, the longer the line, the higher the capacitance and·the lower the fastest achievable baud rate is. And if you have multiple lines·running from the same pin·you add the capacitance of each wire and therefore slow the maximum baud rate even further.·I know Gunther has used the I2C protocol on lines running greater than 100' by droping the baud rate. I breifly looked for maximum line lengths for 1-wire but I didn't see any listed in Dallas' documents I looked at. The DS2409 is a RS232 to 1-wire interface, the RS232 runs at 12V which means youd have to add another chip to the mix such as the MAX232. The DS2480 is a 5V interface chip which is better suited for you application. But since I cannot find any info on max line lengths, I cannot say whether it could support 100' and there are no buffer chips sold by dallas.

    Are you married to the idea of using 1-wire? The lowest baud rate for 1-wire is 9600, I know several people in the forums know what the maximum length you can expect for 5 Volt 9600 baud but I dont personally know it myself (but I am fairly certain it is less than 100'). The best solution would be to use RS-485 like allen suggested, or use I2C at a low baud rate as Gunther did.

    Post Edited (Paul Baker) : 5/13/2005 6:56:06 PM GMT
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-05-13 19:00
    Ok this is the info I found:

    attachment.php?attachmentid=73975

    Answer
    [font=Verdana,Arial,Helvetica size=2]The maximum length of a 1-wire cable is dependent on several issues such as the type of cabling. Thirty meters is possible with modular phone cabling, but much longer distances can be achieved with better cable selection. For a complete treatment of the subject, see the Dallas Semiconductor Application Note 108 "MicroLAN - In the Long Run" found at http://www.dalsemi.com/datasheets/pdfs/app108.pdf.[/font]

    So it appears that the answer is yes.


    Hahaha, of course the application note no longer exists (Ive deactivated the link and·struck through it), probably disappeared during the merger of Dallas and Maxim, here are relevent appnotes I did find though:

    http://www.maxim-ic.com/appnotes.cfm/appnote_number/570

    http://www.maxim-ic.com/appnotes.cfm/appnote_number/1796

    http://www.maxim-ic.com/appnotes.cfm/appnote_number/2966

    Post Edited (Paul Baker) : 5/13/2005 7:12:56 PM GMT
    493 x 32 - 1K
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-05-13 19:20
    Tada: http://diy-zoning.sourceforge.net/app108.pdf,·good ol' sourceforge has a copy of the original appnote.
  • FletchFletch Posts: 2
    edited 2005-05-13 21:54
    I found this app note: http://www.maxim-ic.com/appnotes.cfm/appnote_number/857

    It·says: "Simple microcontroller port pin interfaces are not capable of the drive currents necessary to support large- or even medium-sized networks. The pullup resistor value is often limited by the port pin pulldown capability to around 2,200, which precludes heavy networks (networks with high weight values). Port-pin-only interfaces should be limited to networks with a tabletop radius and weight, about 3m maximum."

    They go on to say that a DS2480B can drive up to 200m. I would think the DS2480B is no longer the 1-wire protocol on the microprocessor side (which is why I was just trying to stick a DS2409 in·the loop the keep everything else the same). So, I guess I would just watch the pins like any other 9600, n, 8 serial data?·Does Parallax have samples on using the DS2480B that are not specific to the Javelin Stamp?

    Another option, and probably the simplest to·do,·would be to use the FET circuit they show (Appendix B) to improve the slew rate. This uses separate input and output pins from the stamp. Is it just a matter of changing the pin numbers on the OWIN and OWOUT commands to recognize which pins are inputs and which are outputs?·They say this will drive 200m of wire/devices (or weight, as they call it).

    Fletch
Sign In or Register to comment.