Flow switch / float rate meter references

Viewed 30 times

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

enter image description here

enter image description here

 New contributor
  • 1
    Using a transistor to isolate the PI from the circuit and set an acceptable logic level for the input seems like a good idea. But I think you need to review the schematics in the question as with them as they are closing the sensor switch will short the voltage source out. – Charemer 2 days ago
  • 1
    I suspect the issue relates to the existing controller. Reading between the lines, I don’t think you understand how the existing controller works, and what you can read from the Pi will depend entirely on what the existing controller is doing with the switch. Perhaps it’s nice and simple and the switch simply grounds an input or pulls it high, or perhaps it’s much more complicated. All the suggestions I can think of involve understanding more about what the existing controller is doing. – Mark Smith 2 days ago
  • This would be a simple question if we had all the necessary information. When you ask questions in a forum such as this (which focuses on answers, not discussion), it helps us all if the facts are laid out clearly in the question. Asking good questions is hard, but you won’t get good answers if your question is ambiguous. I would suggest that you add a schematic diagram to your question showing how your system is currently wired. Once we know that, you’ll get a good answer. – Seamus 2 days ago
  • Hi @Stephane, Welcome and nice to meet you. You float switch problem is interesting. You have given much useful information to help solving the problem. (1) I would suggest to first look at the flow switch (I guess you are now using it to switch 5DVC, NOT 240VAC) (2) I think we can first study switch operation details, and forget measuring the current flow. So first thing first, is to read the datasheet. / to continue, … – tlfong01 2 days ago
  • Now the references: (1) Harwil Q-12 flow switch – Features (magnetic/reed switch 5VDC to 240VAC) harwil.com/product/flow-switch-model-q-12 (2) Harwil Q-12 flow switch – Installation harwil.com/wp-content/uploads/2016/09/Q12-Installation.pdf (3)Harwil Q-12 flow switch – Datasheet harwil.com/wp-content/uploads/2018/11/Q-12_datasheet_8.01.pdf – tlfong01 2 days ago
  • I skimmed the above references and made a quick and dirty summary below: Ref (1) says (a) it can switch either 5VDC or 240VDC, (b) it is a magnetic Reed switch, but this not too important, we just see it as a switch to open or closing electrical contact, to help sensing 5VDC voltage/current – tlfong01 2 days ago
  • Ref (2) Installation procedure Point 3 suggests how to use a multi-meter and a rod to check if the switch can open or close properly. It is imprtant to read the “wiring diagram” (Page 2). Now we see that it is just a “dumb” switch, “blindly” switches anything it is connected. So it is a “passive” switch, meaning that it does not need any power source, such a 5V wall wart, or 12V battery etc. – tlfong01 2 days ago
  • Ref (3) says the following (a) Available with NO (Normal Open), NC (Normal Close) or SPDT (Signle Pole Double Throw) Reed Switch. (b) Switches 5VDC to 240VAC. (c) Switch employs magnetic coupling. (Note, if (a) says it is a Reed Switch, then of course it is magnetic coupling, nothing important here. – tlfong01 2 days ago
  • Now let us first agree on the following draft schematic, before moving on: imgur.com/gallery/XFRylQR. – tlfong01 2 days ago
  • There is a bug in the above draft schematic. Need to fix later. My apologies. – tlfong01 2 days ago
  • I was a bit confused when I read your question on “flow switch”, because I have been playing with “flow meters” which measures flow rate. I also played with solenoid valves which let me open or close a valve. I also have water pressure meter etc to measure more other things: (1) Float Switch 1/6 raspberrypi.org/forums/… (2) Float Switch 2/6 raspberrypi.org/forums/… – tlfong01 yesterday
  • (3) Float Switch 3/6 raspberrypi.org/forums/… (3) Float Switch 4/6 raspberrypi.org/forums/… (5) Float Switch 5/6 raspberrypi.org/forums/… – tlfong01 yesterday
  • My first suggested design above has a big mistake: I forgot that Rpi 3V3 GPIO cannot directly read any signal higher than 3V3! I have suggested ways to get around in my comments to the following question: “How can Rpi GPIO read the 12V output signal from a Guardline Security Alarm?” raspberrypi.stackexchange.com/questions/107026/…. Long story short is to (1) Use 2N2222, or (2) CD4050 to step down from 5V to 12V signal to 3V3. WARNING: Do not use two resistor voltage divider to step down 5V to 18V signals. – tlfong01 yesterday
  • Or you might let us know which chlorinator you are using: Amazon Salt Chlorine Generators: amazon.com/slp/salt-chlorine-generators/daa6gwt57t5o4mr. Your chlorinator may have options to set output signal to 12V, 5V, or even 3V3, for that you can use Rpi GPIO to directly read the chlorinator and flow switch’s output. – tlfong01 yesterday
  • It is not clear how the OP measures the water flow, because the float switch does not measure anything. Perhaps another flow rate meter is used: (1) Flow Meter Reference 1/3 raspberrypi.org/forums/… (2) Flow Meter Reference 2/3 raspberrypi.org/forums/… (2) Flow Meter Reference 3/3 raspberrypi.org/forums/…. – tlfong01 53 secs ago   Edit

Categories: Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: