Isolated connection from a flowmeter to Arduino

Hi everyone, I need to know how to connect a Hall flow meter in isolation to protect the GPIO. The flow meter I use is the classic FS400A. However, there are environmental interferences that sometimes make Arduino interpret the signals in the wrong way. It seems to me that the solution would be to galvanically isolate the flowmeter from the Arduino GPIO. Can you help me on this? Thank you very much
Pedro

Can you show us a schematic or even a block diagram of your current system? How exactly are you powering the flow meter?
What makes you think an isolated path for the signal will fix the problem? By the way, what exactly is the problem? Have you looked at the pulse signal with an oscilloscope?
Paul

Galvanic connection shouldn't be a problem if you use twisted pair between sensor and Arduino,
and a ceramic capacitor from pin to ground if strong RF is near.
What distance are we talking about, and do you actually have interference or only expecting it.

Are you using debounce code?
Leo..

Hello
Switches with hall-sensors do not tend to bounce

I believe the hall sensor is already isolated from anything at the sensor. As mentioned by @Wawa at the input of your Arduino board you should but a capacitor 0.1µ from the hall power to ground and put a series resistor 5k or so and then a 0.1µF capacitor at the GPIO input to ground.

If your sensor requires a pull up you will have to add that before the 5k. I would not use the processor internal pull up as you would like to have lower impedance on the signal to make it less susceptible to RF and noise pickup.

I know, but debounce code could have an adjustable time-out during which a new hall state is not accepted. Must know/calculate the max speed of the rotor (minimum pulse time) for this.
Leo..

1 Like

Hello
Many thank for your notice, I will keep it in mind.

Thank you very much for your quick responses. They have been very helpful to me.
1.- Paul: the system works well. I have it installed in several houses. Suddenly, however, it reads without any flow. Here is the electrical diagram. It is connected to the 5 volts of the power supply, with a voltage divider in the signal, so as not to exceed the 3.3V of the ESP32 GPIO


2.- Wawa: The connection is twisted pair but unshielded. The distances between the flowmeter and the processor is 2 - 3 meters, outdoors. Which capacitor do you recommend for the flowmeter GPIO? I am using a Hall flow meter, so I don't have a debaunce code.
3.- John Rob: you say something like this circuit?

The idea is to rule out that something is interfering with the connection port of the flowmeter. Will it also be necessary to use shielded cable?

I am thinking that the problem is software.

Interupts should simple and fast .

Very common water flow sensor.
Not many people have problems with it.

Must use a level converter of you connect a 5volt sensor output to a 3.3volt Arduino ESP32.
The 10k:20k was ok, if the voltage divider was used near the processor.
And you could just have added a 100n cap from pin to ground there.
The 100 ohm/100n from the second diagram is not ok.
Leo..

Yes. You could probably increase R2 to at least 1k. This will make the filtering more effective.

Do you know the expected max pulse rate? Without knowing more details I would consider using one of the counter timers. I would think flow is not all that fast, I found one FS400A spec that stated the max pps ~ 3.3ms. Perhaps you could use the millis() function to measure each time a counter overflows. This would give you a good average.

Hi Guys, thank you very much. The problem was solved with the 0.1 uF and some mods in the software. Very usefull your comments!!. Thanks again.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.