Shop OBEX P1 Docs P2 Docs Learn Events
1-wire Device - Distance Question — Parallax Forums

1-wire Device - Distance Question

ArchiverArchiver Posts: 46,084
edited 2003-02-21 02:00 in General Discussion
I am attempting to connect a Maxim DS18B20 1-wire temperature sensor to my
BS2P24. Using me BS2p Demo Board I don't have a problem communication with
the sensor. Then I placed a sensor at the ends of separate 25ft and 50ft
runs of CAT5 Twisted Pair computer network wire. 3 wires were all that were
needed. +5v, GND, and the 1-wire communication line. I cannot get a
response. I measured the wire and there is very little resistance and the
connections appear correct. If I plug the sensor to the Demo board and
attach my extension without a device on the end, I get the same result as
with the device connected to the end of the cable. What am I missing?

PS. of interesting note, I used the code from the Basic Stamp Manual to
retrieve the devices serial number. It runs fine with the device connected
locally. When the sensor is remote it doesn't error out due to no 1-wire
device detected, nor does it return the address. If I remove the device from
the cable, it errors out.

Thank you,

Phillip Kocmoud

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2003-02-21 01:09
    Have you tried placing the pull-up resistor on the sensor end..? I have a
    long run with this exact sensor, and it worked 100% once I moved the
    pull-up resistor to the sensor.

    Regards,

    -Bruce
    tech@r...
    http://www.rentron.com

    Original Message
    From: "Phillip Kocmoud" <pkocmoud@h...>
    To: <basicstamps@yahoogroups.com>
    Sent: Thursday, February 20, 2003 5:41 PM
    Subject: [noparse][[/noparse]basicstamps] 1-wire Device - Distance Question


    > I am attempting to connect a Maxim DS18B20 1-wire temperature sensor to my
    > BS2P24. Using me BS2p Demo Board I don't have a problem communication with
    > the sensor. Then I placed a sensor at the ends of separate 25ft and 50ft
    > runs of CAT5 Twisted Pair computer network wire. 3 wires were all that were
    > needed. +5v, GND, and the 1-wire communication line. I cannot get a
    > response. I measured the wire and there is very little resistance and the
    > connections appear correct. If I plug the sensor to the Demo board and
    > attach my extension without a device on the end, I get the same result as
    > with the device connected to the end of the cable. What am I missing?
    >
    > PS. of interesting note, I used the code from the Basic Stamp Manual to
    > retrieve the devices serial number. It runs fine with the device connected
    > locally. When the sensor is remote it doesn't error out due to no 1-wire
    > device detected, nor does it return the address. If I remove the device from
    > the cable, it errors out.
    >
    > Thank you,
    >
    > Phillip Kocmoud
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the Subject and Body
    of the message will be ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2003-02-21 01:10
    Try a lower resistance pullup on the data line, say 1000 or 820 ohms.
    The pullup resistor has to charge up the capacitance of the cable, so
    a lower value there makes the transitions from low to high level
    faster, enough to meet the demanding 1-wire specs.

    One-wire hardware was not originally designed to drive long cables.
    It is an open drain logic that operates single ended at the
    equivalent of about 10000 baud. Ouch! It is a side benefit that
    people make it work on long cables at all.

    -- Tracy


    >I am attempting to connect a Maxim DS18B20 1-wire temperature sensor to my
    >BS2P24. Using me BS2p Demo Board I don't have a problem communication with
    >the sensor. Then I placed a sensor at the ends of separate 25ft and 50ft
    >runs of CAT5 Twisted Pair computer network wire. 3 wires were all that were
    >needed. +5v, GND, and the 1-wire communication line. I cannot get a
    >response. I measured the wire and there is very little resistance and the
    >connections appear correct. If I plug the sensor to the Demo board and
    >attach my extension without a device on the end, I get the same result as
    >with the device connected to the end of the cable. What am I missing?
    >
    >PS. of interesting note, I used the code from the Basic Stamp Manual to
    >retrieve the devices serial number. It runs fine with the device connected
    >locally. When the sensor is remote it doesn't error out due to no 1-wire
    >device detected, nor does it return the address. If I remove the device from
    >the cable, it errors out.
    >
    >Thank you,
    >
    >Phillip Kocmoud
  • ArchiverArchiver Posts: 46,084
    edited 2003-02-21 01:35
    That fixed it, Thank you!!!

    Original Message
    From: Tracy Allen [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=nIHJIcVVgPQsY3t3Q3Y-1uhwap_c9heJs9XGd453vi4Ycv0ciOu7ThE-2L8vL14VasHnntOcTOIG-wc]tracy@e...[/url
    Sent: Thursday, February 20, 2003 7:11 PM
    To: basicstamps@yahoogroups.com
    Subject: Re: [noparse][[/noparse]basicstamps] 1-wire Device - Distance Question


    Try a lower resistance pullup on the data line, say 1000 or 820 ohms.
    The pullup resistor has to charge up the capacitance of the cable, so
    a lower value there makes the transitions from low to high level
    faster, enough to meet the demanding 1-wire specs.

    One-wire hardware was not originally designed to drive long cables.
    It is an open drain logic that operates single ended at the
    equivalent of about 10000 baud. Ouch! It is a side benefit that
    people make it work on long cables at all.

    -- Tracy


    >I am attempting to connect a Maxim DS18B20 1-wire temperature sensor to my
    >BS2P24. Using me BS2p Demo Board I don't have a problem communication with
    >the sensor. Then I placed a sensor at the ends of separate 25ft and 50ft
    >runs of CAT5 Twisted Pair computer network wire. 3 wires were all that were
    >needed. +5v, GND, and the 1-wire communication line. I cannot get a
    >response. I measured the wire and there is very little resistance and the
    >connections appear correct. If I plug the sensor to the Demo board and
    >attach my extension without a device on the end, I get the same result as
    >with the device connected to the end of the cable. What am I missing?
    >
    >PS. of interesting note, I used the code from the Basic Stamp Manual to
    >retrieve the devices serial number. It runs fine with the device connected
    >locally. When the sensor is remote it doesn't error out due to no 1-wire
    >device detected, nor does it return the address. If I remove the device
    from
    >the cable, it errors out.
    >
    >Thank you,
    >
    >Phillip Kocmoud

    To UNSUBSCRIBE, just send mail to:
    basicstamps-unsubscribe@yahoogroups.com
    from the same email address that you subscribed. Text in the Subject and
    Body of the message will be ignored.


    Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
  • ArchiverArchiver Posts: 46,084
    edited 2003-02-21 01:35
    Your CAT 5 cable uses solid conductors. A shielded, stranded, multi
    conductor cable would be better as it would have lower inductance. 50
    ft is quite far for this technology and if you have any noisy
    equipment nearby expect erratic errors.

    Jason

    --- In basicstamps@yahoogroups.com, Tracy Allen <tracy@e...> wrote:
    > Try a lower resistance pullup on the data line, say 1000 or 820
    ohms.
    > The pullup resistor has to charge up the capacitance of the cable,
    so
    > a lower value there makes the transitions from low to high level
    > faster, enough to meet the demanding 1-wire specs.
    >
    > One-wire hardware was not originally designed to drive long cables.
    > It is an open drain logic that operates single ended at the
    > equivalent of about 10000 baud. Ouch! It is a side benefit that
    > people make it work on long cables at all.
    >
    > -- Tracy
    >
    >
    > >I am attempting to connect a Maxim DS18B20 1-wire temperature
    sensor to my
    > >BS2P24. Using me BS2p Demo Board I don't have a problem
    communication with
    > >the sensor. Then I placed a sensor at the ends of separate 25ft
    and 50ft
    > >runs of CAT5 Twisted Pair computer network wire. 3 wires were all
    that were
    > >needed. +5v, GND, and the 1-wire communication line. I cannot get a
    > >response. I measured the wire and there is very little resistance
    and the
    > >connections appear correct. If I plug the sensor to the Demo board
    and
    > >attach my extension without a device on the end, I get the same
    result as
    > >with the device connected to the end of the cable. What am I
    missing?
    > >
    > >PS. of interesting note, I used the code from the Basic Stamp
    Manual to
    > >retrieve the devices serial number. It runs fine with the device
    connected
    > >locally. When the sensor is remote it doesn't error out due to no
    1-wire
    > >device detected, nor does it return the address. If I remove the
    device from
    > >the cable, it errors out.
    > >
    > >Thank you,
    > >
    > >Phillip Kocmoud
  • ArchiverArchiver Posts: 46,084
    edited 2003-02-21 01:52
    Yes, I'm a computer geek and I have tons of solid CAT5e cable. I thought the
    purpose of twisted pair was to cancel noise. What is the best method of
    wiring it up? Just use 3 wires, leave the rest open. or Use 1 wire form each
    pair and ground the other at both ends. or something else?

    Original Message
    From: jbirnsch <jbirnsch@v...> [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=4pHR9XnZkFxgeQyd8-ItsG2zr1VxjyQ8zbLfQvhP9D8Vhb7cB3fD8a8omErOPWz5AyM-YwK7YO82zn8]jbirnsch@v...[/url
    Sent: Thursday, February 20, 2003 7:36 PM
    To: basicstamps@yahoogroups.com
    Subject: [noparse][[/noparse]basicstamps] Re: 1-wire Device - Distance Question



    Your CAT 5 cable uses solid conductors. A shielded, stranded, multi
    conductor cable would be better as it would have lower inductance. 50
    ft is quite far for this technology and if you have any noisy
    equipment nearby expect erratic errors.

    Jason

    --- In basicstamps@yahoogroups.com, Tracy Allen <tracy@e...> wrote:
    > Try a lower resistance pullup on the data line, say 1000 or 820
    ohms.
    > The pullup resistor has to charge up the capacitance of the cable,
    so
    > a lower value there makes the transitions from low to high level
    > faster, enough to meet the demanding 1-wire specs.
    >
    > One-wire hardware was not originally designed to drive long cables.
    > It is an open drain logic that operates single ended at the
    > equivalent of about 10000 baud. Ouch! It is a side benefit that
    > people make it work on long cables at all.
    >
    > -- Tracy
    >
    >
    > >I am attempting to connect a Maxim DS18B20 1-wire temperature
    sensor to my
    > >BS2P24. Using me BS2p Demo Board I don't have a problem
    communication with
    > >the sensor. Then I placed a sensor at the ends of separate 25ft
    and 50ft
    > >runs of CAT5 Twisted Pair computer network wire. 3 wires were all
    that were
    > >needed. +5v, GND, and the 1-wire communication line. I cannot get a
    > >response. I measured the wire and there is very little resistance
    and the
    > >connections appear correct. If I plug the sensor to the Demo board
    and
    > >attach my extension without a device on the end, I get the same
    result as
    > >with the device connected to the end of the cable. What am I
    missing?
    > >
    > >PS. of interesting note, I used the code from the Basic Stamp
    Manual to
    > >retrieve the devices serial number. It runs fine with the device
    connected
    > >locally. When the sensor is remote it doesn't error out due to no
    1-wire
    > >device detected, nor does it return the address. If I remove the
    device from
    > >the cable, it errors out.
    > >
    > >Thank you,
    > >
    > >Phillip Kocmoud


    To UNSUBSCRIBE, just send mail to:
    basicstamps-unsubscribe@yahoogroups.com
    from the same email address that you subscribed. Text in the Subject and
    Body of the message will be ignored.


    Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
  • ArchiverArchiver Posts: 46,084
    edited 2003-02-21 01:54
    What value resistor?

    Original Message
    From: tech@r... [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=iT1r251lThRmqBfxEG44hh5cujBpzOYxL9I_E_tpXFHg2VdU_bknAEprNzZXsnjK4-pkpBemgH9zrvs]tech@r...[/url
    Sent: Thursday, February 20, 2003 7:10 PM
    To: basicstamps@yahoogroups.com
    Subject: Re: [noparse][[/noparse]basicstamps] 1-wire Device - Distance Question


    Have you tried placing the pull-up resistor on the sensor end..? I have a
    long run with this exact sensor, and it worked 100% once I moved the
    pull-up resistor to the sensor.

    Regards,

    -Bruce
    tech@r...
    http://www.rentron.com

    Original Message
    From: "Phillip Kocmoud" <pkocmoud@h...>
    To: <basicstamps@yahoogroups.com>
    Sent: Thursday, February 20, 2003 5:41 PM
    Subject: [noparse][[/noparse]basicstamps] 1-wire Device - Distance Question


    > I am attempting to connect a Maxim DS18B20 1-wire temperature sensor to my
    > BS2P24. Using me BS2p Demo Board I don't have a problem communication with
    > the sensor. Then I placed a sensor at the ends of separate 25ft and 50ft
    > runs of CAT5 Twisted Pair computer network wire. 3 wires were all that
    were
    > needed. +5v, GND, and the 1-wire communication line. I cannot get a
    > response. I measured the wire and there is very little resistance and the
    > connections appear correct. If I plug the sensor to the Demo board and
    > attach my extension without a device on the end, I get the same result as
    > with the device connected to the end of the cable. What am I missing?
    >
    > PS. of interesting note, I used the code from the Basic Stamp Manual to
    > retrieve the devices serial number. It runs fine with the device connected
    > locally. When the sensor is remote it doesn't error out due to no 1-wire
    > device detected, nor does it return the address. If I remove the device
    from
    > the cable, it errors out.
    >
    > Thank you,
    >
    > Phillip Kocmoud
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the Subject and
    Body of the message will be ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    >
    >

    To UNSUBSCRIBE, just send mail to:
    basicstamps-unsubscribe@yahoogroups.com
    from the same email address that you subscribed. Text in the Subject and
    Body of the message will be ignored.


    Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
  • ArchiverArchiver Posts: 46,084
    edited 2003-02-21 02:00
    I use a 1K on all 1-wire sensors.

    Regards,

    -Bruce
    tech@r...
    http://www.rentron.com

    Original Message
    From: "Phillip Kocmoud" <pkocmoud@h...>
    To: <basicstamps@yahoogroups.com>
    Sent: Thursday, February 20, 2003 6:54 PM
    Subject: RE: [noparse][[/noparse]basicstamps] 1-wire Device - Distance Question


    > What value resistor?
    >
    >
    Original Message
    > From: tech@r... [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=Xxmqy5RS9xhcZVA1mx8JT13TfAQaYWwZx6azNClCqYjBFcQvV5SqpAL0XxnCiyOILMpva9wurA]tech@r...[/url
    > Sent: Thursday, February 20, 2003 7:10 PM
    > To: basicstamps@yahoogroups.com
    > Subject: Re: [noparse][[/noparse]basicstamps] 1-wire Device - Distance Question
    >
    >
    > Have you tried placing the pull-up resistor on the sensor end..? I have a
    > long run with this exact sensor, and it worked 100% once I moved the
    > pull-up resistor to the sensor.
    >
    > Regards,
    >
    > -Bruce
    > tech@r...
    > http://www.rentron.com
    >
    >
    Original Message
    > From: "Phillip Kocmoud" <pkocmoud@h...>
    > To: <basicstamps@yahoogroups.com>
    > Sent: Thursday, February 20, 2003 5:41 PM
    > Subject: [noparse][[/noparse]basicstamps] 1-wire Device - Distance Question
    >
    >
    > > I am attempting to connect a Maxim DS18B20 1-wire temperature sensor to my
    > > BS2P24. Using me BS2p Demo Board I don't have a problem communication with
    > > the sensor. Then I placed a sensor at the ends of separate 25ft and 50ft
    > > runs of CAT5 Twisted Pair computer network wire. 3 wires were all that
    > were
    > > needed. +5v, GND, and the 1-wire communication line. I cannot get a
    > > response. I measured the wire and there is very little resistance and the
    > > connections appear correct. If I plug the sensor to the Demo board and
    > > attach my extension without a device on the end, I get the same result as
    > > with the device connected to the end of the cable. What am I missing?
    > >
    > > PS. of interesting note, I used the code from the Basic Stamp Manual to
    > > retrieve the devices serial number. It runs fine with the device connected
    > > locally. When the sensor is remote it doesn't error out due to no 1-wire
    > > device detected, nor does it return the address. If I remove the device
    > from
    > > the cable, it errors out.
    > >
    > > Thank you,
    > >
    > > Phillip Kocmoud
    > >
    > >
    > > To UNSUBSCRIBE, just send mail to:
    > > basicstamps-unsubscribe@yahoogroups.com
    > > from the same email address that you subscribed. Text in the Subject and
    > Body of the message will be ignored.
    > >
    > >
    > > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    > >
    > >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the Subject and
    > Body of the message will be ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    >
    >
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the Subject and Body
    of the message will be ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    >
    >
Sign In or Register to comment.