Hey guys.
Short story, i have to connect 4 float switches with arduino that are on average 100 feet apart from the arduino.
I have to use common electric wire to connect the distance. I cant change the type of wire, i would've preferred cat-6 cable, but i cant get them now for various reasons. Anyways,
The wires are guided by a thick water pipe that is fairly far from power lines, but that doesn't eliminate the surge problem. I will include
"if input is high/low for 10 seconds, read active or inactive, otherwise disregard input." in code.( the switches are float switch, so 10 sec is not a problem)
Problems..
- How should i connect the long,long wires to arduino input? Directly connecting them to arduino pins is a circuit for disaster. I was thinking of something like
+12v -> float switch wire 1 -> float switch wire 2 -> optocoupler input 1 -> 12v ground.
I really cant tell the resistance of the wire before setting everything up, so resistors might be included so the opto Doesn't burn.
But what if? What if a surge happens and burns the optocouplers? I know they are cheap, but im looking for long time reliability, without changing stuff.
- What other option do i have to isolate the signal and have better reliability?
Some info on the project.
A system to control 2 water pumps based on the input of 6 float switches on 4 different tanks, based on a forum conversation i had, i have decided to go with adequately rated ssr( yes,heatsink). The arduino nano is going to be powered by 12v regulated to 5v ( lm317t).
I decided not to have a battery power for the arduino as i dont see any use of that because the motors are mains powered.
!!Load-shedding is quite common in my country. Does that harm the ssr's?!!


