My pool salt chlorinator uses a flow switch (https://harwil.com/product/flow-switch-model-q-12/) to detect when the pool water is circulating, which is one of the conditions to allow the production of chlorine by the chlorinator. I'm building a pool controller-based of raspberry pi, and I'd like to be able to detect when the sensor is closed so I can calculate for how long the chlorine is being produced. I have some experience with electricity and the Pi, but not a lot. Unfortunately, the chlorinator (shown as the controller on the diagrams) is proprietary and I have no info on how it works and/or interacts with the flow switch
I've tried to connect one of the Pi GPIO configured as input as depicted in the diagram below, but I'm getting very erratic behavior, changes between 0 and 1 randomly, whether the circuit is closed or open. I've tried the same with inserting a 10K resistor between the switch circuit and the PI, but no luck
If I measure the voltage between the two cables of the switch circuit I get ~5V when the switch is open, but only a couple of hundreds mVs between the switch when closed
If I measure the resistance of the flow switch alone (closed), it reads ~2.2 Ohms
I also tried to measure the current flowing in the circuit when the switch is closed, but in doing so I think I disrupted the circuit as the LED that indicates that chlorine is being produced (which turn on when the circuit is closed) never turned ON
It's imperative for me to create as little disruption as possible to the original circuit as I don't want to interfere with the controller/switch system
I was thinking about maybe inserting a transistor in the circuit and detect when current is flowing, and couple that with the Pi (2nd picture). Is that a viable option? I have no experience with transistor other than doing a bit of reading on the topic
Any help would be greatly appreciated
(2) Harwil Q-12 flow switch - Installation https://harwil.com/wp-content/uploads/2016/09/Q12-Installation.pdf
(3)Harwil Q-12 flow switch - Datasheet https://harwil.com/wp-content/uploads/2018/11/Q-12_datasheet_8.01.pdf
– tlfong01 Jan 21 '20 at 02:35(2) Float Switch 2/6 https://www.raspberrypi.org/forums/viewtopic.php?f=37&t=77158&p=1384933&hilit=float+sensor+tlfong01#p1388246
– tlfong01 Jan 21 '20 at 08:39(3) Float Switch 4/6 https://www.raspberrypi.org/forums/viewtopic.php?f=37&t=77158&p=1382734&hilit=float+switch+tlfong01#p1382734
(5) Float Switch 5/6 https://www.raspberrypi.org/forums/viewtopic.php?f=37&t=77158&p=1382734&hilit=float+switch+tlfong01#p1383764
– tlfong01 Jan 21 '20 at 08:40