1

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

15
  • 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
    Jan 20, 2020 at 16:55
  • 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
    Jan 20, 2020 at 17:20
  • 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
    Jan 20, 2020 at 17:49
  • 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
    Jan 21, 2020 at 2:35
  • 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
    Jan 21, 2020 at 2:35

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.