Maximum cable length between Arduino board and a sensor

Hi! What's the maximum cable length between Arduino board and sensor, for example, HC-SR04 ultrasonic sensor?
What is the best cable type for this connection?

This depends on the particular sensor.

What length are you wondering about? With what sensor?

Sensors that need a "lot" of current will need a different cable than those needing little current.

If you want to run a long cable in Cat5e, with 5v to the sensor, you may have difficulty.

Weedpharma

Sorry for my delay to reply.
By the way, I'd like to use an ultrasonic sensor and a simple flowmeter.
I need 2 or 3 meter from sensor to Arduino board.

That length is unlikely to present a problem.

Weedpharma

Hi,
I have a similar question.
To avoid my Arduino to be located at the top of my water tank, I would prefer to only have the HC-SR04 sensor inside and a cable to connect it to the Arduino located in the garage 20 meters away.
Do you think it can work and what type of cable would be the best for this ?

thanks

JC

The cable of choice seems to be shielded CAT5. It is pretty cheap, and you can combine conductors to get the c.s.a up.

Nick_Pyner:
The cable of choice seems to be CAT5. It is pretty cheap, you can combine conductors to get the c.s.a up, and it is shielded

"And it is shielded" but only if you buy the STP version. The common cheap version is not shielded.

Weedpharma

ok, thanks.
I'll make a try with a CAT5 shielded cable.
Nick, what do you mean by "get the c.s.a up" ?

JC

I am not sure shielded cable is necessary. Burglar alarm cable may be sufficient (4-wire).

It may be important to add a capacitor to decouple the power to the sensor at its terminals.

The capacitance of any cable will affect the rise and fall times of the signals so could affect the measured duration of the pulse received from the sensor, so you may need to allow for this when working out the water level.

The 10μs trigger pulse is rather short but I think that is only a recommended minimum pulse duration. Considering your length of cable, I don't think you need to make it that short.

jc_lab:
ok, thanks.
I'll make a try with a CAT5 shielded cable.
Nick, what do you mean by "get the c.s.a up" ?

Cross sectional area.

Note that by "shielded" I only meant cable with all the conductors in one shield. I understand there is a cable with pairs in shields, which I bet is considerably more expensive.

1 Like

Nick_Pyner:
Cross sectional area.

Note that by "shielded" I only meant cable with all the conductors in one shield. I understand there is a cable with pairs in shields, which I bet is considerably more expensive.

The common cheap Cat5 cable does not have shield at all.

Weedpharma