Water flow sensor does not work correctly when adding a power supply to the circuit

Hello all,
I just noticed that my water flow sensor stops displaying correct values(very high values) when I connect it with a solenoid valve, and more precisely , this happens when i connect a power supply to the relay (5v) that will be connected to the solenoid valve(12v).
So the conclusion is, the power supply, somehow, influences the reading of the water flow sensor, and make the values go very bigger , although it's only connected to the relay not to the sensor.

And to be clear, the code works fine, because I tried working only with the sensor and it gave me correct values.
And i also can't get rid of the power supply becasue it's important to make the solenoid valve work.

What to do ?

Has anybody been in such situation before? Thank you.
edit: here's the wiring:

I usually draw a schematic before or during the project construction so as to avoid such problems. Do you have a schematic to show how you this all wired together?

On the surface it sounds like some sort of induced electrical noise or a grounding issue.

Can you post the devices and details on how they are hooked together?

Post some images of your project wired up.

yes done.

done.

yes.

Don't see any problem with your wiring diagram (not a schematic). But, is there any physical connection between your 12 volt solenoid power supply and the Arduino 5 volt supply?

Code?
Did you use (potentially problematic) interrupts for something that doesn't need it.
Leo..

For this type of circuit where there's a solenoid valve with coil that could draw 2A when energized, I recommend controlling it with a fully isolated control circuit. Your existing relay module doesn't provide opto isolation and requires about 80mA from the UNO.

  • check that the flyback diode across solenoid valve isn't blown ... it should be at least 2A rated.

I suggest using a DC SSR rated for 5A like this one:

image

Another option is to use a single relay module with opto isolation that uses your existing 12V power supply, like this one:

image

If the UNO is powered by the same 12V supply as for the solenoid, then choose the first option (5A DC SSR) because you'll need to purchase a separate power supply for the relay module.

Using a breadboard? If so do note that a hobby grade breadboard handles about 300mA at most. A thingy requiring 2A and 5A wired through a breadboard, don't expect them to operate correctly.

In theory, as shown the external power has no galvanic connection to your Arduino or flow sensor.

I could see the action of energizing the relay which in turn powers your valve could cause a transient noise spike when they are turned ON or OFF. However you suggest the issue is constant.

Can you clarify if the problem exists with the external power connected and the relay + valve is not actuated?

Hi, @emna123

Can you please post an image(s) of your project so we can see your component layout?
How are you powering the UNO?
What is the specification of your 12V power supply?
Can you post a link to data/specs of your solenoid valve?

Can you please post your code?
To add code please click this link;

Please add all this information and code in a new post?
Please do not go back and edit an earlier posting.

Thanks.. Tom... :smiley: :+1: :coffee: :australia:

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