rburton
Posts: 3
Joined: Sat Mar 02, 2019 11:20 pm

Sensors maximum length

Thu Apr 25, 2019 8:20 pm

Hello All,

I have a project, with multiple sensors, these are positioned all around the room with the pi being central.

What is the maximum length for the wiring and is there a way of working it out its round 4m I need?

Andyroo
Posts: 3336
Joined: Sat Jun 16, 2018 12:49 am
Location: Lincs U.K.

Re: Sensors maximum length

Thu Apr 25, 2019 8:46 pm

Depends on the protocol, sensors and their power needs.

More details needed.
Need Pi spray - these things are breeding in my house...

User avatar
B.Goode
Posts: 7868
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Sensors maximum length

Thu Apr 25, 2019 8:51 pm

rburton wrote:
Thu Apr 25, 2019 8:20 pm
Hello All,

I have a project, with multiple sensors, these are positioned all around the room with the pi being central.

What is the maximum length for the wiring and is there a way of working it out its round 4m I need?

There is no useful "one size fits all" answer to your question.

You will need to consult a datasheet for each individual type of sensor to check their characteristics and operational limits.

Some, like '1-wire' devices may have buses that allow cable runs of 10's of metres.

Others may be much more demanding and have power or timing constraints that limit them to a few millimetres.

You might need to rethink the topology and deploy a number of RPi nodes close to where the sensors need to be installed?



The summary from @andyroo as I was typing this is succinct, as usual...

Andyroo
Posts: 3336
Joined: Sat Jun 16, 2018 12:49 am
Location: Lincs U.K.

Re: Sensors maximum length

Thu Apr 25, 2019 9:11 pm

B.Goode wrote:
Thu Apr 25, 2019 8:51 pm
...
The summary from @andyroo as I was typing this is succinct, as usual...
:lol: saves electrons :roll:
Need Pi spray - these things are breeding in my house...

rburton
Posts: 3
Joined: Sat Mar 02, 2019 11:20 pm

Re: Sensors maximum length

Thu Apr 25, 2019 9:26 pm

So would I be better off keeping the raspberry pi as a master and running Arduino as slaves, I believe the maximum length USB cable I could use is 5m would that be right?
sensors running would be:

DS18B20
DHT22
Hall flow sensor
soil moisture sensor

scotty101
Posts: 3597
Joined: Fri Jun 08, 2012 6:03 pm

Re: Sensors maximum length

Fri Apr 26, 2019 9:10 am

Why not use Pi Zeros as slaves and communicate back to the master using MQTT (a protocol specifically designed for the internet of things)
Another option to consider are ESP8266/ESP32 devices, they are like Arduinos but they have build in WiFi. You can connect each sensor to one of these and have them send data back to the central hub using MQTT again. These devices can be put in to a sleep mode to wake up periodically, connect to Wifi, send the sensor data and then go back to sleep meaning that they can be battery powered.
Electronic and Computer Engineer
Pi Interests: Home Automation, IOT, Python and Tkinter

JohnsUPS
Posts: 99
Joined: Fri Jul 06, 2018 2:13 am
Location: USA

Re: Sensors maximum length

Thu May 02, 2019 1:51 pm

When it comes to the DS18B20 temperature sensors with regards to wiring length, you may want to check this thread:
viewtopic.php?t=36163

Return to “HATs and other add-ons”