Water flow sensor YF-S201C

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Water flow sensor YF-S201C

#11 Post by TD-er » 09 Aug 2018, 22:13

What is the output voltage of that sensor?
The ESP only can handle 3.3V. Some say it should be 5V-tolerant, but I am not so sure about that.

Do you have some kind of schematics of the sensor?
Does it pull a signal to GND to send a '0', or should you use a pull-down resistor and does it output 5V when it tries to send a '1' and is it floating when '0' ? (then you need 2 resistors to make the signal max. 3.3V)

olleman
Normal user
Posts: 53
Joined: 27 Aug 2017, 08:10

Re: Water flow sensor YF-S201C

#12 Post by olleman » 10 Aug 2018, 08:33

Seems like it sends 5V. I distinctly remember that the wemos d1 can handle 5V input, I think that the popular ultrasonic sensors sends 5V and I have used these without any additional resistors in the past.

Also tried with a NodeMcu yesterday with the same result.

Here's a technical datasheet but I can't really make anything out of it. Perhaps somebody else can?

https://www.google.se/url?sa=t&source=w ... mKZV_b9fJq

olleman
Normal user
Posts: 53
Joined: 27 Aug 2017, 08:10

Re: Water flow sensor YF-S201C

#13 Post by olleman » 10 Aug 2018, 12:24

Tried bridging with a jumper cable and pull up - same thing! BUT when configures as a switch input it gives med "0" or "1" as expected. I have tried every configuration I can think of in the pulse logic counter. Am I missing something fundamental?

Also tried the sensor with ha LED and it gives pulses as it should.

EDIT: hmm pulse counter needed to be one of the first 1-4 tasks, working now :)

olleman
Normal user
Posts: 53
Joined: 27 Aug 2017, 08:10

Re: Water flow sensor YF-S201C

#14 Post by olleman » 10 Aug 2018, 19:32

So, back to my project. I have tried today with water with different flows and at 5l/min and above it seems to be accurate but tat 1-3 l/min it's highly inaccurate which is a shame since it's rated for 1-30 l/min. Having bad values at this range wont work since this range is quite often used in my boat where I wanted to use this project. I'm gonna need something with better precision but I'm not sure where to find it.

Another way would of course be to use some kind of level measuring of the tank itself that's been suggested in the thread but I like this approach. If someone has experience with flow sensors that work well at 1-10 litres/min please direct me to these sensors :)

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: Water flow sensor YF-S201C

#15 Post by grovkillen » 10 Aug 2018, 20:15

I have used this flow sensor for quite some time and even a flow of 10mL/second (0.6L per minute) is counted accurately. The sensor is used in many coffee machines and I would say that the cups used are 0.2L at most and that one is filled accurately within 30 seconds. So they are really good (and cheap).
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

olleman
Normal user
Posts: 53
Joined: 27 Aug 2017, 08:10

Re: Water flow sensor YF-S201C

#16 Post by olleman » 11 Aug 2018, 08:45

Thanks! Do you know anything how they perform upwards 10l/min even though they are rated to MAX 6l/min? I will occasionally have MAX flow in the boat which would mean about 10l/min.

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Water flow sensor YF-S201C

#17 Post by TD-er » 11 Aug 2018, 13:14

olleman wrote: 11 Aug 2018, 08:45 Thanks! Do you know anything how they perform upwards 10l/min even though they are rated to MAX 6l/min? I will occasionally have MAX flow in the boat which would mean about 10l/min.
I can imagine the water pressure may also be an issue with these flow sensor with 10 liter/min.

olleman
Normal user
Posts: 53
Joined: 27 Aug 2017, 08:10

Re: Water flow sensor YF-S201C

#18 Post by olleman » 11 Aug 2018, 15:39

This one seems interesting, seems to be very similar to the one grovkillen recommended but with threaded connections and supposedly a MAX flow of 10l instead of 6.

https://de.aliexpress.com/item/Hall-Sen ... 78327.html

olleman
Normal user
Posts: 53
Joined: 27 Aug 2017, 08:10

Re: Water flow sensor YF-S201C

#19 Post by olleman » 11 Aug 2018, 15:46

On another note, I'm having problem making a rule that needs to contain a formula within the SendToHTTP command. Is it possible to do this?
Look at the last portion of below rule, I need to multiply the value by 6 (to get flow/min) but ESPEasy won't accept this formatting. Do I need to remind everyone that scripting and coding isn't my strong suit :)? Having two tasks with the same flowmeter doesn't work since one of them always stops working...

on Flow#Liter>0 do
SendToHTTP 10.3.141.50,8080,/json.htm?type=command&param=udevice&idx=21&nvalue=0&svalue=[Flow#Liter*6]
endon

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: Water flow sensor YF-S201C

#20 Post by grovkillen » 12 Aug 2018, 09:40

olleman wrote: 11 Aug 2018, 08:45 Thanks! Do you know anything how they perform upwards 10l/min even though they are rated to MAX 6l/min? I will occasionally have MAX flow in the boat which would mean about 10l/min.
I would think it'll work okay for short periods of time with a max flow of 10L/min. I haven't tested it myself but I guess it's easy to test with an air pressure hose and blow it into the sensor.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 29 guests