Asked
Viewed 23 times
1
I have a standard float switch in a remote water reservoir connected to a normal electric cable (100m+ long). I want to check with a raspberry pi if the float switch is on (i.e. water level is low) or off (i.e. water level is okay) and based on that control a relay switch. Is there an easy way to detect if the switch is on or off with a raspberry pi? I presume I cannot simply connect it to the GPIO pins as it is a float switch that is meant to automatically disconnect a mains circuit?
-
1Please show us what kind of switch you’re using. How is data transmitted, is it through the electric cable? – user96931 13 hours ago
-
1Do you have a way of measuring the resistance through the 100m of cable and the switch with the switch closed? – Bob Brown 12 hours ago
-
Ah, let me see. The float/flow switch that disconnects nearby AC mains is simple. If you want to control things far away, say 200m, then usually the industrial and or EE guys would recommend reed switch type devices. The reed switch usually connects to a low voltage, say 5V/12V/24V DC. And this DC high/low (0V, 5V) signal can transmit long distances. Of course long wiring acts like an antenna can pick up noises. EMI etc. But like transient switch bouncing etc, you just use software to filter them. You can double shield cable (or even differential/ twist pair) to reduce noises / to continue, – tlfong01 5 hours ago
-
So you can of course use Rpi GPIO to deal with DC 0V/5V/12V signals. An example of read switch is the following: References: (1) “Float Level Switches & Sensors with Magnetic Reed Switches – Sems Sensors”: gemssensors.com/level/single-point-level-switches/float. Cheers. – tlfong01 5 hours ago
-
And if wish to also detect/ control AC mains at the far side, then things might become a bit complicated. You might like to skim the follow Rpi flow meter project forum discussion to get an idea of the difficulties encountered: Ref (2) “Flow meter with 5V reed switch – rpi.stackExchange”: raspberrypi.org/forums/…. Cheers. – tlfong01 5 hours ago
Categories: Uncategorized