Water flow sensor + relay

hi..
I am new to this and in mid of one of my project.

I need program as if flow sensor detect water flow relay need to start. If there is no flow in flow sensor relay should stop.

Please help me.

Simple solution: propeller+DC motor --> measure voltage --> do something with value

Can you provide any details of the flow sensor you are using?

start with the basics.
you need to know water is flowing. how do you plan to do that ?
if you have a garden hose or pipe, you can use a spinning flow sensor.

with a sensor, you get to know if water is flowing.
if you know that, then you can turn on a relay
when you know water stops flowing, you can turn the relay off.

to help us get you started, let us know what sensor you have now.
of what the water source is and how you can detect water flowing.

the more you can tell, us the easier it is for us to help you.