I have encountered problem with Arduino UNO and water flow sensor. So here's situation:
I have connected a 12 V power supply from DC battery and then used 5 V regulator which output is used as input to 3.3 V regulator.
Ground of all power supply is the same that is ground of 12 V. It is connected to 5 V and then 3 V. I have a water flow sensor which uses 5 V from output of the 5 V regulator also this output is used to power the Arduino.
When serial port is connected to a laptop, the sensor works fine and gives accurate output. But when serial port disconnected sensor gives output even if there is no flow of water.