Wired network types for 100 temp sensors

Thread Starter

joshctaylor

Joined May 17, 2017
11
I've mostly designed systems with onboard sensors or used wireless.

How would I go about getting 100 temp sensors spread over 200 meters to talk to a host which polls them. The goal is minimum cost. Cheap cable and minimum amount. The sensors will outdoors.

Things I considered

RS485 - old and limited to 32 devices
CAN bus - didn't see a reason why not

Both these have 2 wires so I considered using twisted pair cable with data on 1 pair and power on the other.

Thoughts?
 

Jon Chandler

Joined Jun 12, 2008
1,029
Maxim/Dallas One-Wire DS18B20 temperature sensors or some improved variants. Power, ground and data are all that's needed and each sensor has a unique serial number/address.

Cable capacitance is a critical factor – I've tested a network with several hundred feet (can't recall exactly) of Cat-5 cable with good results. The network must be linear, from one sensor to the next; star configurations or long sensor stubs won't work.
 

Reloadron

Joined Jan 15, 2015
7,501
Maxim/Dallas One-Wire DS18B20 temperature sensors or some improved variants. Power, ground and data are all that's needed and each sensor has a unique serial number/address.

Cable capacitance is a critical factor – I've tested a network with several hundred feet (can't recall exactly) of Cat-5 cable with good results. The network must be linear, from one sensor to the next; star configurations or long sensor stubs won't work.
Based on your question that would be my choice too.

DS18B20 is 1-Wire digital temperature sensor from Maxim IC. Reports degrees in Celsius with 9 to 12-bit precision, from -55 to 125 (+/-0.5). Each sensor has a unique 64-Bit Serial number etched into it - allows for a huge number of sensors to be used on one data bus.

The data sheet and they run under $1.00 USD each.

Ron
 

WBahn

Joined Mar 31, 2012
29,976
I've mostly designed systems with onboard sensors or used wireless.

How would I go about getting 100 temp sensors spread over 200 meters to talk to a host which polls them. The goal is minimum cost. Cheap cable and minimum amount. The sensors will outdoors.

Things I considered

RS485 - old and limited to 32 devices
CAN bus - didn't see a reason why not

Both these have 2 wires so I considered using twisted pair cable with data on 1 pair and power on the other.

Thoughts?
A major factor to consider is how often you need each of the devices to be read out and how many bits of data has to be communicated per sensor to get one reading. That will determine what your minimum data rate on the bus will be and that will play a role is selecting a network topology that can meet that data rate over that distance.
 

Reloadron

Joined Jan 15, 2015
7,501
A major factor to consider is how often you need each of the devices to be read out and how many bits of data has to be communicated per sensor to get one reading. That will determine what your minimum data rate on the bus will be and that will play a role is selecting a network topology that can meet that data rate over that distance.
This is a good point. With the DS18B20 they claim 750 mSec response so figure roughly 100 sensors allow close to 100 seconds worst case scenario.

Ron
 

MrSalts

Joined Apr 2, 2020
2,767
I would use wireless network of ESP32 modules and WiFi - 250+ devices possible.
They can all be connected as a mesh network and relay info back to you. All software is available as libraries. You can assign an IP address to each with code. Other than power cables, it should be pretty easy. If you know the MAC address of each device, you can get blazing fast connections to specific devices when a client device is pushing the value to the server device (as the data is relayed down to the main data collection device.

there is a nice online tutorial about how a farmer set up a mesh network for some irrigation equipment over a large area (I hope it is still up somewhere - it was good). You can do it all in html get and put commands and make readable pages (or not) for your phone to query specific devices.
 

Ian0

Joined Aug 7, 2020
9,667
I've mostly designed systems with onboard sensors or used wireless.

How would I go about getting 100 temp sensors spread over 200 meters to talk to a host which polls them. The goal is minimum cost. Cheap cable and minimum amount. The sensors will outdoors.

Things I considered

RS485 - old and limited to 32 devices
CAN bus - didn't see a reason why not

Both these have 2 wires so I considered using twisted pair cable with data on 1 pair and power on the other.

Thoughts?
Rs485 may be old, but it is very well supported with hardware, and still widely used. You can get quarter-load transceivers that would allow 128 on the bus, however CAN is limited to 32 nodes. Could you get more than one sensor per node? It will also reduce the number of microcontrollers.
In both cases you will need a microcontroller along with your temperature sensor, but most microcontrollers that have CAN have a built in temperature sensor, but their accuracy is not always that impressive.
For RS485 you will need some method of polling, or of collision avoidance. CAN will take care of all that in hardware.
CAN will generally require a crystal oscillator, and RS485 will manage without.
Another point- CAN transceivers are a lot more scarce in the current environment than RS485 transceivers.
Finally, as others have said, the Dallas 1-wire devices are worth a look.
 

Beau Schwabe

Joined Nov 7, 2019
155
@drjohnsmith "Out if interest, I've been asked this very same question at a job interview" - lol you were being tested.
I failed the same test with a similar question at a previous job interview only because I wasn't familiar with CAN bus. At my current employer we needed to connect 300 Nodes ... and because of the 32 node limit we had to create a custom variation of our own. In the simulator I took it up to 1000 nodes, but in realty we are only using just over 300 nodes. We went with CAN bus, because in my opinion it was easier to implement with discrete components than 485.... We have to consider supply chain issues also. The common RS485 IC's at the time were "0 in stock with +52 week lead times". On the other hand, CAN bus can be implemented with a simple Op Amp with a decent slew rate, a handful of resistors and a mosfet. So that was the main driving force for us.
 

bassbindevil

Joined Jan 23, 2014
824
Keep in mind that the DS18B20 sensors from eBay or Ali are counterfeits which vary in quality from "pretty good" to "noisy garbage", and you can't count on a vendor that sold you "pretty good" last month will be selling the same quality this month.
https://github.com/cpetrich/counterfeit_DS18B20

If you buy 100 of the real thing from Digikey.com, they're almost $5 each. But Maxim will send you a few samples for free...

Have a look at: https://www.mysensors.org/build/temp
 

Thread Starter

joshctaylor

Joined May 17, 2017
11
thanks for the input everyone - the 1-wire devices look ideal but i've read a lot of problems with large 1-wire networks. Did anynoe use them on scale like this? Some manufacturers of 1-wire recommend no more than 20 devices - there is no such restriction listed in the maxim 1-wire host data-sheets.
 

Thread Starter

joshctaylor

Joined May 17, 2017
11
@drjohnsmith "Out if interest, I've been asked this very same question at a job interview" - lol you were being tested.
I failed the same test with a similar question at a previous job interview only because I wasn't familiar with CAN bus. At my current employer we needed to connect 300 Nodes ... and because of the 32 node limit we had to create a custom variation of our own. In the simulator I took it up to 1000 nodes, but in realty we are only using just over 300 nodes. We went with CAN bus, because in my opinion it was easier to implement with discrete components than 485.... We have to consider supply chain issues also. The common RS485 IC's at the time were "0 in stock with +52 week lead times". On the other hand, CAN bus can be implemented with a simple Op Amp with a decent slew rate, a handful of resistors and a mosfet. So that was the main driving force for us.
Where does the 32 node limit come from?
i read that CANopen had a practical limit of 110 nodes.
https://www.axiomatic.com/whatiscan.pdf
 

Ian0

Joined Aug 7, 2020
9,667
Where does the 32 node limit come from?
i read that CANopen had a practical limit of 110 nodes.
https://www.axiomatic.com/whatiscan.pdf
I think it comes from the original RS485 transducers which were schottky-TTL based, and 32 was the maximum number of inputs of that type that could be driven, because of the input current. Then came half-load, quarter-load and eighth-load transceivers, which gets you to 128.
 

Jon Chandler

Joined Jun 12, 2008
1,029
Two limitations come into play with 1-wire networks:

1. Maximum cable length – when cable length gets too long, the reflected signal from the length of the cable interferes with the 1-wire device responses.

2. The total capacitance of the network and devices – too much capacitance distorts the waveforms too much.

Maxim AN148 provides a lot of detail.
 
I’m probably way off the mark here, but how about 10 by 10 matrix of cables with silicon diodes at each node, push 100uA down each of the 10 rows and sniff the voltage at the end of each column. Haven’t done the maths, and if you are measuring every 2m over a 200m line this won’t be easy, but if the line resistances vary with temperature this could be part of the overall calibration.
 

Beau Schwabe

Joined Nov 7, 2019
155
The limitation comes from capacitance as mentioned, but also the contributing impedance of each device on the line and whether or not the drive transistors on the chip are able to adequately drive the load. The mosfet drivers I chose in our design can handle 400mA but they never see more than 36mA with a full 300 node load. In simulation I took the load equivalent to 1000 nodes (120mA) ... in practice I pushed the load to 500 nodes (60ma) and the design had no issues. All in all we have about 240 feet of twisted pair wire that we are communicating over in a "tree" configuration with HVAC (240V 3 Phase) running around as well. Some of the "tree" uses RJ45 Ethernet, but most of it uses a "pig-tail" twisted pair from one unit to the next (see attached image) where the twisted pair consists of (+24V, CAN_H, CAN_L, GND)

Note: The PCB's also perform a wire twist from one end to the other

20221014_101008.jpg
 
Last edited:
Top