Reliable One-Wire for Long distances

Good day forum.

I am currently in a project that needs to read temperature values from sensors placed fairly far away.
Our initial test worked well with CAT5 cable less than 50meters, but any more and the circuit crashes and we cant detect the sensors.
The sensors use One-wire protocol to communicate and i am using the standard provided library and circuit(4k7 pull to 5V).

I believe we are gonna require the network driver that Maxim recommends for complex/long one-wire configurations, but there is no code example.
They do provide a flow diagram, but I was wondering if there wasnt a completed example/code for the driver already?
Surely im not the only person that requires this driver/code for long runs of CAT5 one-wire?

Any help or suggestions on Long one-wire busses would be appreciated!
**ps: I have read all of the app notes from Maxim

Have you tried using more than one wire in the CAT5? (ie join green and green/white wires together at each end and use that as 1 wire) This would lower the resistance.

XaroRSA:
...sensors placed fairly far away.
Any help or suggestions on Long one-wire busses would be appreciated!

So something like the distance between Jet Propulsion Laboratory and Cassini?

XaroRSA:
but any more and the circuit crashes and we cant detect the sensors.
The sensors use One-wire protocol to communicate and i am using the standard provided library and circuit(4k7 pull to 5V).

Surely im not the only person that requires this driver/code for long runs of CAT5 one-wire?

There has been previous discussion about using CAT5 successfully. I guess any decent shielded cable will suffice. I also understand reducing the value of the resistor will help over long distances.

I don't know about "One-Wire", but I have used other serial systems with some distance.
Can you reduce the "baud rate"? A slower baud rate will work over a longer distance.

Are you using parasite mode?

Have you tried reducing the pullup? 2k2 or 1k5 perhaps?

Pete

el_supremo:
Are you using parasite mode?

Have you tried reducing the pullup? 2k2 or 1k5 perhaps?

Pete

no im not using parasitic power, i have a external psu for vcc.
Ill try the lower resistor value, but would like to build and code the network driver that maxim recommends

I know it's not what you've asked for, but is there any reason to use 1 wire serial, instead of wireless?

The way I see it, you've got to pay for and roll-out 50 meters of Cat5 cable. The wireless alternative costs about $1 or $2 per end.
I.e You can buy NRF24L01+ modules on ebay for a dollar or two each. Two of them = a data-link.

A better (low cost, just good enough) option may be the A7105 - it allows for a slower data-rate and therefore can transmit further. 100m outdoor is the quoted range. I bought a pair of these modules for about $6, delivery inc from china (to aus)

That said, even a nrf24L01 module with a 1W output stage will only cost about $12. So, with RF, you could have a link cost as low as $4 or as high as $24, with many combinations between.

The cheapest I can buy 50m of Cat5 costs more money than 2 of these modules cost. They have a range of 1000 meters...
http://www.ebay.com/itm/2-4G-nRF24L01-1000m-RF-Wireless-Module-NRF24L01-PA-LNA-w-2DB-Antenna-EW24L01-/261219518108?pt=LH_DefaultDomain_0&hash=item3cd1e5869c

enhzflep:
I know it's not what you've asked for, but is there any reason to use 1 wire serial, instead of wireless?

The way I see it, you've got to pay for and roll-out 50 meters of Cat5 cable. The wireless alternative costs about $1 or $2 per end.
I.e You can buy NRF24L01+ modules on ebay for a dollar or two each. Two of them = a data-link.

A better (low cost, just good enough) option may be the A7105 - it allows for a slower data-rate and therefore can transmit further. 100m outdoor is the quoted range. I bought a pair of these modules for about $6, delivery inc from china (to aus)

That said, even a nrf24L01 module with a 1W output stage will only cost about $12. So, with RF, you could have a link cost as low as $4 or as high as $24, with many combinations between.

The cheapest I can buy 50m of Cat5 costs more money than 2 of these modules cost. They have a range of 1000 meters...
http://www.ebay.com/itm/2-4G-nRF24L01-1000m-RF-Wireless-Module-NRF24L01-PA-LNA-w-2DB-Antenna-EW24L01-/261219518108?pt=LH_DefaultDomain_0&hash=item3cd1e5869c

Thanks for the input. I don't have experience with these wireless modules, so wasnt thinking of using them.
I believe this will be the best option. I will build a "switch" board that have shorter CAT5 cable lenghts, and then wireless it back to the main control unit.
Subscribing to this forum!!

enhzflep:
The cheapest I can buy 50m of Cat5 costs more money than 2 of these modules cost. They have a range of 1000 meters...
http://www.ebay.com/itm/2-4G-nRF24L01-1000m-RF-Wireless-Module-NRF24L01-PA-LNA-w-2DB-Antenna-EW24L01-/261219518108?pt=LH_DefaultDomain_0&hash=item3cd1e5869c

Line of sight?

GoForSmoke:
Line of sight?

I presume so. That's the usual qualifier given when quoting distances for rf stuff.

I've got 4 of the modules with on-board antennae, but hardly used them on account of their breadboard-unfriendly pinout. Theres 2 rows of 4 pins right next to each other, necessitating the use of dupont cables or a 2 row socket and some extra wire. You can buy them (the 1mw modules) with layouts more suited to breadboards, but they're several times the price.

I prefer the A7105s since they have a longer range and bread-board friendly pinouts. They're also the radio modules used in Husban, FlySky and Turnigy branded r/c transmitters and receivers. For $10 I can make my own TX or RX that's compatible with them. A Turnigy 9X makes for a pretty decent $53 controller in my book. I've had over 150 meters line-of-sight range with the TX in bind-mode - a mode where channel hopping is disabled and the TX output power is reduced from 100mw to 1mw, though I'll admit that the tx has an antenna with a bit more gain than the onboard antennae the raw modules have.

There's more info here: DIY Electronics - RC Groups in the following threads:

  • DIY "Hubsan" RF module
  • build a diy flysky/turnigy rx from SCRATCH!
  • DIY "FlySky" RF module

XaroRSA:
Thanks for the input. I don't have experience with these wireless modules, so wasnt thinking of using them.
I believe this will be the best option.

You're welcome. They're really very easy to work with. You can get libraries for each. They're really no (not much?) more complicated than talking to anything else that uses I2C or SPI. I like wireless for versatility. In this case, there seems to be a distinct cost advantage.

Also note, you can get away with a single high-power unit as the base-station and a handful of lower power units for the satellites. There's a thread (and website) around somewhere that discusses an nrf24L01 WiFi solution for arduinos. Ah, here 'tis Cheap wifi via nRF24L01+ radios! - Networking, Protocols, and Devices - Arduino Forum There's mention of the high-power base and low power satellites on his website.

I've got 4 of the modules with on-board antennae, but hardly used them on account of their breadboard-unfriendly pinout. Theres 2 rows of 4 pins right next to each other, necessitating the use of dupont cables or a 2 row socket and some extra wire.

Dig through old PC cables, there's the old 2x5 10-wire ribbon mobo to back panel 9 pin serial cables and like. I've got a bag of crimp female connectors for the cut-off ends and snap-off header pins for menders. Goodwill usually has boxes of cables reasonably cheap but so far my boneyard (set of boxes and tubs full of "junk") has enough for me.

XaroRSA:
**ps: I have read all of the app notes from Maxim

Are you sure you have seen this one? Guidelines for Reliable Long Line 1-Wire® Networks

If the weighting you calculate doesn't add up then look for whatever it is you missed.

My understanding that with Two Wire and Single Wire, the protocols are not designed for 'long distance' communication, and I thought they were supposed to be limited to something like 10m. I've been doing a 100kHz I2C project where we have a 15ft cable, and we know we cannot make the cable any longer, as the cable capacitance would then reduce the rise time of the data and clock signals past a reliable point. You can reduce the frequency of the pulse, but you may be limited by your hardware if it only has fixed speeds.

I would consider the wireless module for better signal integrity.

GoForSmoke:

XaroRSA:
**ps: I have read all of the app notes from Maxim

Are you sure you have seen this one? Guidelines for Reliable Long Line 1-Wire® Networks
Guidelines for Reliable Long Line 1-Wire Networks | Analog Devices

If the weighting you calculate doesn't add up then look for whatever it is you missed.

I did read the application notes, and thus the reason I posted here, to find out if someone else has done the whole driver + code for arduino.
Im looking into some wireless alternatives right now, but seems the 50m run works with a lower resistor value and proper pcb mounting :smiley:

We are presently successfully doing this on Cat5 to 800m. Wire resistance is not a problem (we use only one wire per signal), and of course we use a separate power line but use the Arduino 5V rather than a separate PSU. We use the Embedded Data Systems RS485 to One-wire converter, but only because their One-wire drive circuit is so good. We had planned on using RS485 to cover the long distances, but it turned out we didn't need to, as the One-wire works fine at 800m. I don't know if anyone out there has run One-wire this far before, but we have done it multiple times without issue. Wireless is not an option for us. Unfortunately, the EDS board is no longer available, so eventually I am going to have to build my own drive circuit.

Not 1 wire but a good answer to RS232 limits is RS485. --- note that Dino got in while I was typing this.... 800m! Wow!

I have no part in this store except I've bought from there twice with no problems:
http://yourduino.com/sunshop2/index.php?l=product_detail&p=317

MAX485 RS485 Transceiver (Pkg of 10)
SKU: EC-110418
Your Price: $2.00
Stock: 401

The shipping is not cheap compared to the knock-down chip prices so I end up picking up extra chips usually 5 for 75 cents to a buck and a half. If you do order there, spend some time browsing the stock and bargain bins as it were. You might get ideas.

Another thought that might help or not is that if you're using CAT 5 then you have 4 pairs that could run 4 1-wire buses. With many devices adding to the 'weight', wouldn't distributing them be one way to increase the working length?