Getting Signal from Vertical Float Valve Switch 25-30 ft away to arduino

Greetings, I am new to Arduino, I want to set up a small setup for home use.
The basic Use case is
There is a Small Water Tank at ground level that get supply of water once during the day, and then there is a bigger water tank on the roof of the house (2 story house) that we use a motor to pump water up to when we get water supplied to the ground level tank.

What I want to do, is use 3 Float Valve Switches (something like this one) to control the motor using an arduino. Basically when there is water above a certain threshold in water tank on the ground level and water is below a certain level in the tank on the roof we turn on the motor. And if water corsses a certain level (fills the tank) on the tank above or drops below a certain level on the tank on ground floor ( ground floor tank is about to be empty) we turn off the motor.

Now from my research I know I need 3 Float valve Switches which send signals to the arduino (planning to use a nano for the project) based on the state of these switches (easy if else code ) I want to send a signal to a relay (like this one) to turn on the motor and then cut off the signal when the right condition is met.

From my research, I should connect the switches to input pins using a Pull Down resister or the Internal Pull up resistor (based on this article) but from what I have read this also results in problem if the wire is too long.

Considering the switches will be quite a distance from the arduino (specially the one on the roof water tank) we will end up with 25-30 ft of wire if not more. The noise on this will most probably cause a lot of issues.

What are good solutions here considering insulating the wire isnt an option.
What if I used two Arduino, one on the roof for the Float valve on the roof, and a relay so we send a 220v signal down that can then act as an input to the arduino on the ground (via a reverse relay ?).
Some one suggested using 2 arduino and suing Xbee for wireless communication but Xbee modules are expensive and I am looking for a cheap solution

I am completely blank here and any help

Thanks :smiley:

Twisted pair wiring should be OK for a switch (multi-strand telephone cable, for example). Be sure to connect one of the two wires in a pair to Arduino ground and to NO OTHER ground. Use a low value, say 470 Ohm, pullup resistor on the other.

Keep the signal wires far from any power wiring.

I'd add a 10nF or 100nF from the wire to ground at the Arduino end to kill any noise pickup. Something like a
2k2 or 4k7 pullup will be plenty. I'd consider using twisted pairs in a CAT5 cable as a cost-effective way to
wire it. Each switch return wire should be on its own twisted pair with ground. Switch the wires to ground at
the remote switches, do not connect the ground wires of the cable to anything but the switch.

2k2 pullup is quite a good value, thinking about it, as that means a couple of mA through the
switch contacts, which will help to self-clean them. See Wetting current - Wikipedia

The thing on the roof. Put a solar/battery powered MCU with WiFi on the roof. Wires not needed.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.