Uncategorized

Float switch question

Asked 
Viewed 25 times
0

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 15 hours 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 15 hours 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 14 hours 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 5 hours 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 5 hours 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 5 hours 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 5 hours 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 5 hours ago
  • Now let us first agree on the following draft schematic, before moving on: imgur.com/gallery/XFRylQR. – tlfong01 5 hours ago
  • There is a bug in the above draft schematic. Need to fix later. My apologies. – tlfong01 3 hours ago
.END

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: