{"id":32485,"date":"2020-05-11T19:47:22","date_gmt":"2020-05-11T11:47:22","guid":{"rendered":"\/blog\/?p=32485"},"modified":"2020-05-30T23:34:48","modified_gmt":"2020-05-30T15:34:48","slug":"how-to-use-water-flow-sensor-with-arduino","status":"publish","type":"post","link":"https:\/\/www.seeedstudio.com\/blog\/2020\/05\/11\/how-to-use-water-flow-sensor-with-arduino\/","title":{"rendered":"How to use Water Flow Sensor \/ Meter with Arduino"},"content":{"rendered":"\n<p>Well, in this blog we will tell you basically all the things you need to know about the Water Flow Sensor, which including:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>A short description of the water flow sensor. <\/li><li>The working principle of the hall water flow sensor.<\/li><li>How to use a water flow sensor (Hardware and Code).<\/li><li>The detail about the calculation formula.<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">What is a water flow sensor(meter)? <\/h2>\n\n\n\n<p>We use a water flow sensor to measure the water flow rate. The water flow rate is the volume of fluid that passes per unit time. People often use water flow sensor for automatic water heater control, DIY coffee machines, water vending machines, etc.<\/p>\n\n\n\n<p>There are a variety of flow sensors of different principles, but for makers using Arduino or Raspberry Pi, the most common flow sensor is based on a Hall device. For example, the most classic water flow sensor&nbsp;<a href=\"https:\/\/www.seeedstudio.com\/M11-1-25-Water-Flow-Sensor-p-1345.html\">YF-S402<\/a>&nbsp;and&nbsp;<a href=\"https:\/\/www.seeedstudio.com\/G1-2-Water-Flow-Sensor-p-635.html\">YF-S201<\/a>&nbsp;rely on Hall sensors.<\/p>\n\n\n\n<p> So, how does the Hall water flow sensor work? <\/p>\n\n\n\n<h2 class=\"wp-block-heading\"> How does the water flow sensor work?<\/h2>\n\n\n\n<p> In order to explain how does the water flow work, let\u2019s open the lid and take a look. <\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img fetchpriority=\"high\" decoding=\"async\" width=\"1030\" height=\"686\" src=\"https:\/\/blog.seeedstudio.com\/wp-content\/uploads\/2020\/05\/DSC03966-1030x686.jpg\" alt=\"\" class=\"wp-image-32486\" srcset=\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/05\/DSC03966-1030x686.jpg 1030w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/05\/DSC03966-300x200.jpg 300w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/05\/DSC03966-768x512.jpg 768w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/05\/DSC03966-1024x682.jpg 1024w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/05\/DSC03966-675x450.jpg 675w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/05\/DSC03966.jpg 1400w\" sizes=\"(max-width: 1030px) 100vw, 1030px\" \/><figcaption>All components of YF-402<\/figcaption><\/figure><\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img decoding=\"async\" width=\"1030\" height=\"599\" src=\"https:\/\/blog.seeedstudio.com\/wp-content\/uploads\/2020\/05\/how-does-water-flow-sensor-work-1030x599.jpg\" alt=\"\" class=\"wp-image-32487\" srcset=\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/05\/how-does-water-flow-sensor-work-1030x599.jpg 1030w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/05\/how-does-water-flow-sensor-work-300x174.jpg 300w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/05\/how-does-water-flow-sensor-work-768x446.jpg 768w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/05\/how-does-water-flow-sensor-work-1024x595.jpg 1024w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/05\/how-does-water-flow-sensor-work.jpg 1235w\" sizes=\"(max-width: 1030px) 100vw, 1030px\" \/><figcaption>Water flow sensor work principle <\/figcaption><\/figure><\/div>\n\n\n\n<p> It\u2019s quite simple inside. The main components are&nbsp;the <strong>Hall Effect sensor<\/strong>,&nbsp;<strong>turbine wheel,<\/strong>&nbsp;and&nbsp;<strong>magnet<\/strong>. The water flows in through the inlet and out through the outlet. The water current drove the wheel to turn, and the magnet on the wheel turned with it. Magnetic field rotation triggers the Hall sensor, which outputs high and low level square waves(pulse). <\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img decoding=\"async\" width=\"632\" height=\"313\" src=\"https:\/\/blog.seeedstudio.com\/wp-content\/uploads\/2020\/05\/Water-flow-sensor-principle-1.gif\" alt=\"\" class=\"wp-image-32621\" \/><figcaption>water flow sensor working principle<\/figcaption><\/figure><\/div>\n\n\n\n<p> For every round of the wheel, the volume of water flowing through is a certain amount, as is the number of square waves output. Therefore, we can calculate the flow of water by counting the number of square waves(pulse). <\/p>\n\n\n\n<h2 class=\"wp-block-heading\"> How to use the water flow sensor with Arduino. <\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Material Required<\/h3>\n\n\n\n<ul class=\"wp-block-list\"><li>An <a aria-label=\"Arduino Board (opens in a new tab)\" href=\"https:\/\/www.seeedstudio.com\/Arduino-Uno-Rev3-p-2995.html\" target=\"_blank\" rel=\"noreferrer noopener\">Arduino Board<\/a>\/ <a aria-label=\"Seeeduino board (opens in a new tab)\" href=\"https:\/\/www.seeedstudio.com\/Seeeduino-V4-2-p-2517.html\" target=\"_blank\" rel=\"noreferrer noopener\">Seeeduino board<\/a><\/li><li><a aria-label=\"Grove base shield (opens in a new tab)\" href=\"https:\/\/www.seeedstudio.com\/Base-Shield-V2.html\" target=\"_blank\" rel=\"noreferrer noopener\">Grove base shield<\/a><\/li><li><a aria-label=\"Water flow sensor (opens in a new tab)\" href=\"https:\/\/www.seeedstudio.com\/catalogsearch\/result\/?q=Water+flow+sensor\" target=\"_blank\" rel=\"noreferrer noopener\">Water flow sensor<\/a><\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Hardware Connection <\/h3>\n\n\n\n<p>For the YF serial, there are 3 wires:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Red for Vcc<\/li><li>Black for GND<\/li><li>Yellow for pulse output.<\/li><\/ul>\n\n\n\n<p> For the Atmega 328-based board like <a href=\"https:\/\/www.seeedstudio.com\/Arduino-Uno-Rev3-p-2995.html\">Arduino UNO<\/a> and <a href=\"https:\/\/www.seeedstudio.com\/Seeeduino-V4-2-p-2517.html\">Seeeduino V4.2<\/a>. There are two digital pins that can be used as an interrupt. Digital pin 2 for&nbsp;<strong>interrupt 0<\/strong>, and digital pin 3 for&nbsp;<strong>interrupt 1<\/strong>. In this blog, we use the&nbsp;<strong>D2<\/strong>&nbsp;pin to detect the pulse output by the water flow sensor. If you are using Seeeduino + <a aria-label=\"Grove base shield (opens in a new tab)\" href=\"https:\/\/www.seeedstudio.com\/Base-Shield-V2.html\" target=\"_blank\" rel=\"noreferrer noopener\">Grove base shield<\/a>, just plug the water flow sensor to the D2 connecter. If you are using other Arduino board please use jumper cables to connect to the right pin. <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"960\" height=\"640\" src=\"https:\/\/blog.seeedstudio.com\/wp-content\/uploads\/2020\/05\/image-34.png\" alt=\"\" class=\"wp-image-32490\" srcset=\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/05\/image-34.png 960w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/05\/image-34-300x200.png 300w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/05\/image-34-768x512.png 768w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/05\/image-34-675x450.png 675w\" sizes=\"(max-width: 960px) 100vw, 960px\" \/><figcaption>Water flow sensor  connect with Arduino<\/figcaption><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Software Code<\/h3>\n\n\n\n<p>Of course, you can use&nbsp;<code>digitalread()<\/code>&nbsp;in the&nbsp;<strong>LOOP<\/strong>&nbsp;function to read the output of the water flow sensor. Count number plus one whenever a high level is read. However, this approach is not real-time, and the program requires a certain waiting time for each execution, during which new pulses are not detected. <br><br>For such real-time demanding applications, we typically use&nbsp;<strong>interrupt<\/strong>. Whenever the rising edge of the pulse is detected, an interruption is triggered, counting plus one. <\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"418\" height=\"193\" src=\"https:\/\/blog.seeedstudio.com\/wp-content\/uploads\/2020\/05\/image-33.png\" alt=\"\" class=\"wp-image-32489\" srcset=\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/05\/image-33.png 418w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/05\/image-33-300x139.png 300w\" sizes=\"(max-width: 418px) 100vw, 418px\" \/><\/figure><\/div>\n\n\n\n<p> For more detail about&nbsp;<strong>interrupt<\/strong>&nbsp;please check&nbsp;<a href=\"https:\/\/www.arduino.cc\/reference\/en\/language\/functions\/external-interrupts\/attachinterrupt\/\" target=\"_blank\" rel=\"noreferrer noopener\">attachinterrupt()<\/a>. <\/p>\n\n\n\n<p> Then open your Arduino IDE and copy the code below. Download the code into Arduino. <\/p>\n\n\n\n<p>Note\uff1a<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>The code here is for the most classic YF &#8211; S201 Water Flow Sensor. However the picture above is YF &#8211; S402. Beacause we do not have YF &#8211; S201 in our hand. The code used for both is almost the same, with only one factor to be modified.<\/p><\/blockquote>\n\n\n\n<pre class=\"wp-block-code\"><code>\/*\nYF\u2010 S201 Water Flow Sensor\nWater Flow Sensor output processed to read in litres\/hour\nAdaptation Courtesy: www.hobbytronics.co.uk\n*\/\n\nvolatile int flow_frequency; \/\/ Measures flow sensor pulsesunsigned \n\nint l_hour; \/\/ Calculated litres\/hour\nunsigned char flowsensor = 2; \/\/ Sensor Input\nunsigned long currentTime;\nunsigned long cloopTime;\n\nvoid flow () \/\/ Interrupt function\n\n{\n   flow_frequency++;\n}\n\n   void setup()\n {\n   pinMode(flowsensor, INPUT);\n   digitalWrite(flowsensor, HIGH); \/\/ Optional Internal Pull-Up\n   Serial.begin(9600);\n   attachInterrupt(0, flow, RISING); \/\/ Setup Interrupt\n   sei(); \/\/ Enable interrupts\n   currentTime = millis();\n   cloopTime = currentTime;\n}\n\n   void loop ()\n{\n   currentTime = millis();\n   \/\/ Every second, calculate and print litres\/hour\n   if(currentTime &gt;= (cloopTime + 1000))\n   {\n      cloopTime = currentTime; \/\/ Updates cloopTime\n      \/\/ Pulse frequency (Hz) = 7.5Q, Q is flow rate in L\/min.\n      l_hour = (flow_frequency * 60 \/ 7.5); \/\/ (Pulse frequency x 60 min) \/ 7.5Q = flowrate in L\/hour\n      flow_frequency = 0; \/\/ Reset Counter\n      Serial.print(l_hour, DEC); \/\/ Print litres\/hour\n      Serial.println(\" L\/hour\");\n   }\n}<\/code><\/pre>\n\n\n\n<p> Open the serial monitor tool and set the baud rate to 9600. as the water through, the flow value will print to the appropriate window. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The Formula for the calculation of water flow sensor <\/h2>\n\n\n\n<p>In the code section, we used the following formula, so how did this formula come about?<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>l_hour = (flow_frequency * 60 \/ 7.5)<\/code><\/pre>\n\n\n\n<p> Earlier we mentioned that with each revolution of the wheel, the volume of fluid flowing through is certain. At the same time, the number of pulses generated per revolution of the wheel is also a certain amount. Thus, we can establish an equation between the number of pulses and the water flow. <\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>In fact, the YF series uses a ring magnet with six alternating poles, so that for every revolution, three low levels and three high levels, i.e., three pulses, are generated.<\/p><\/blockquote>\n\n\n\n<p>For the YF-S201, every liter of water that flows, the Hall Sensor outputs&nbsp; 450 pulses. Let\u2019s do little math here. <\/p>\n\n\n\n<p> 450 pulse for 1 liter, so each pulse means 1\/450 liter water flowing through. <\/p>\n\n\n\n<p> We take the total volume of liquid flowing through the water flow sensor at a certain time&nbsp;<code>t<\/code>(unit s) as&nbsp;<code>V_total<\/code>(unit L), and the total number of pulses detected as&nbsp;<code>N<\/code>. Then we get: <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>V_total(L) = N* 1\/450(L) <\/code><\/pre>\n\n\n\n<p> Also, the total volume of fluid flowing through the water flow sensor is equal to the&nbsp;<code>water flow rate(Q - unit L\/s)<\/code>&nbsp;multiplied by time&nbsp;<code>t<\/code>(unit s) . <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>V_total(L) = Q(L\/s)*t(s) <\/code><\/pre>\n\n\n\n<p> So, we get\uff1a <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>N* 1\/450 = Q(L\/s)*t(s) \nN\/t = 450 * Q(L\/s) <\/code><\/pre>\n\n\n\n<p> <code>N\/t<\/code>&nbsp;happen to be frequency&nbsp;<code>f<\/code>, so: <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>f = 450*Q(L\/s); \nQ(L\/s) = f\/450; \nQ(L\/min) = f*60\/450 = f\/7.5 \nQ(L\/hour) = f*60*60\/450 = f*60 \/7.5 <\/code><\/pre>\n\n\n\n<p> For the YF &#8211; S402, every liter of water that flows, the Hall Sensor outputs 4380 pulses. So, the formula should be: <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>f = 4380*Q(L\/s); \nQ(L\/s) = f\/4380; \nQ(L\/min) = f*60\/4380 = f\/73 \nQ(L\/hour) = f*60*60\/4380 = f*60 \/73 <\/code><\/pre>\n\n\n\n<p>That&#8217;s all about this blog.<\/p>\n\n\n\n<p>You can also check <a href=\"https:\/\/www.seeedstudio.com\/blog\/2020\/05\/30\/how-to-select-the-best-water-flow-sensor-for-your-arduino-project\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"How to select the best water flow sensor for your project (opens in a new tab)\">How to select the best water flow sensor for your project<\/a> to help you find the right one.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Well, in this blog we will tell you basically all the things you need to<\/p>\n","protected":false},"author":2732,"featured_media":32621,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_lmt_disableupdate":"","_lmt_disable":"","_price":"","_stock":"","_tribe_ticket_header":"","_tribe_default_ticket_provider":"","_tribe_ticket_capacity":"0","_ticket_start_date":"","_ticket_end_date":"","_tribe_ticket_show_description":"","_tribe_ticket_show_not_going":false,"_tribe_ticket_use_global_stock":"","_tribe_ticket_global_stock_level":"","_global_stock_mode":"","_global_stock_cap":"","_tribe_rsvp_for_event":"","_tribe_ticket_going_count":"","_tribe_ticket_not_going_count":"","_tribe_tickets_list":"[]","_tribe_ticket_has_attendee_info_fields":false,"iawp_total_views":0,"footnotes":""},"categories":[1],"tags":[6,3182,3179,3181,3180],"class_list":["post-32485","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-news","tag-arduino","tag-water-flow-meter","tag-water-flow-sensor","tag-yf-s201","tag-yf-s402"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to use Water Flow Sensor \/ Meter with Arduino - Latest News from Seeed Studio<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.seeedstudio.com\/blog\/2020\/05\/11\/how-to-use-water-flow-sensor-with-arduino\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to use Water Flow Sensor \/ Meter with Arduino - Latest News from Seeed Studio\" \/>\n<meta property=\"og:description\" content=\"Well, in this blog we will tell you basically all the things you need to\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.seeedstudio.com\/blog\/2020\/05\/11\/how-to-use-water-flow-sensor-with-arduino\/\" \/>\n<meta property=\"og:site_name\" content=\"Latest News from Seeed Studio\" \/>\n<meta property=\"article:published_time\" content=\"2020-05-11T11:47:22+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-05-30T15:34:48+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/05\/Water-flow-sensor-principle-1.gif\" \/>\n\t<meta property=\"og:image:width\" content=\"632\" \/>\n\t<meta property=\"og:image:height\" content=\"313\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/gif\" \/>\n<meta name=\"author\" content=\"Ains\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ains\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/2020\/05\/11\/how-to-use-water-flow-sensor-with-arduino\/\",\"url\":\"https:\/\/www.seeedstudio.com\/blog\/2020\/05\/11\/how-to-use-water-flow-sensor-with-arduino\/\",\"name\":\"How to use Water Flow Sensor \/ Meter with Arduino - Latest News from Seeed Studio\",\"isPartOf\":{\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/2020\/05\/11\/how-to-use-water-flow-sensor-with-arduino\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/2020\/05\/11\/how-to-use-water-flow-sensor-with-arduino\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/05\/Water-flow-sensor-principle-1.gif\",\"datePublished\":\"2020-05-11T11:47:22+00:00\",\"dateModified\":\"2020-05-30T15:34:48+00:00\",\"author\":{\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/#\/schema\/person\/010f14bf867d126ce23ab1ab6005d91c\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/2020\/05\/11\/how-to-use-water-flow-sensor-with-arduino\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.seeedstudio.com\/blog\/2020\/05\/11\/how-to-use-water-flow-sensor-with-arduino\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/2020\/05\/11\/how-to-use-water-flow-sensor-with-arduino\/#primaryimage\",\"url\":\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/05\/Water-flow-sensor-principle-1.gif\",\"contentUrl\":\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/05\/Water-flow-sensor-principle-1.gif\",\"width\":632,\"height\":313},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/2020\/05\/11\/how-to-use-water-flow-sensor-with-arduino\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.seeedstudio.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to use Water Flow Sensor \/ Meter with Arduino\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/#website\",\"url\":\"https:\/\/www.seeedstudio.com\/blog\/\",\"name\":\"Latest News from Seeed Studio\",\"description\":\"Emerging IoT, AI and Autonomous Applications on the Edge\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.seeedstudio.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/#\/schema\/person\/010f14bf867d126ce23ab1ab6005d91c\",\"name\":\"Ains\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/e1db5b2900fee34c2a399690bebfc869?s=96&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/e1db5b2900fee34c2a399690bebfc869?s=96&r=g\",\"caption\":\"Ains\"},\"url\":\"https:\/\/www.seeedstudio.com\/blog\/author\/ains\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to use Water Flow Sensor \/ Meter with Arduino - Latest News from Seeed Studio","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.seeedstudio.com\/blog\/2020\/05\/11\/how-to-use-water-flow-sensor-with-arduino\/","og_locale":"en_US","og_type":"article","og_title":"How to use Water Flow Sensor \/ Meter with Arduino - Latest News from Seeed Studio","og_description":"Well, in this blog we will tell you basically all the things you need to","og_url":"https:\/\/www.seeedstudio.com\/blog\/2020\/05\/11\/how-to-use-water-flow-sensor-with-arduino\/","og_site_name":"Latest News from Seeed Studio","article_published_time":"2020-05-11T11:47:22+00:00","article_modified_time":"2020-05-30T15:34:48+00:00","og_image":[{"width":632,"height":313,"url":"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/05\/Water-flow-sensor-principle-1.gif","type":"image\/gif"}],"author":"Ains","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Ains","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.seeedstudio.com\/blog\/2020\/05\/11\/how-to-use-water-flow-sensor-with-arduino\/","url":"https:\/\/www.seeedstudio.com\/blog\/2020\/05\/11\/how-to-use-water-flow-sensor-with-arduino\/","name":"How to use Water Flow Sensor \/ Meter with Arduino - Latest News from Seeed Studio","isPartOf":{"@id":"https:\/\/www.seeedstudio.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.seeedstudio.com\/blog\/2020\/05\/11\/how-to-use-water-flow-sensor-with-arduino\/#primaryimage"},"image":{"@id":"https:\/\/www.seeedstudio.com\/blog\/2020\/05\/11\/how-to-use-water-flow-sensor-with-arduino\/#primaryimage"},"thumbnailUrl":"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/05\/Water-flow-sensor-principle-1.gif","datePublished":"2020-05-11T11:47:22+00:00","dateModified":"2020-05-30T15:34:48+00:00","author":{"@id":"https:\/\/www.seeedstudio.com\/blog\/#\/schema\/person\/010f14bf867d126ce23ab1ab6005d91c"},"breadcrumb":{"@id":"https:\/\/www.seeedstudio.com\/blog\/2020\/05\/11\/how-to-use-water-flow-sensor-with-arduino\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.seeedstudio.com\/blog\/2020\/05\/11\/how-to-use-water-flow-sensor-with-arduino\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.seeedstudio.com\/blog\/2020\/05\/11\/how-to-use-water-flow-sensor-with-arduino\/#primaryimage","url":"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/05\/Water-flow-sensor-principle-1.gif","contentUrl":"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/05\/Water-flow-sensor-principle-1.gif","width":632,"height":313},{"@type":"BreadcrumbList","@id":"https:\/\/www.seeedstudio.com\/blog\/2020\/05\/11\/how-to-use-water-flow-sensor-with-arduino\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.seeedstudio.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to use Water Flow Sensor \/ Meter with Arduino"}]},{"@type":"WebSite","@id":"https:\/\/www.seeedstudio.com\/blog\/#website","url":"https:\/\/www.seeedstudio.com\/blog\/","name":"Latest News from Seeed Studio","description":"Emerging IoT, AI and Autonomous Applications on the Edge","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.seeedstudio.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.seeedstudio.com\/blog\/#\/schema\/person\/010f14bf867d126ce23ab1ab6005d91c","name":"Ains","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.seeedstudio.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/e1db5b2900fee34c2a399690bebfc869?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/e1db5b2900fee34c2a399690bebfc869?s=96&r=g","caption":"Ains"},"url":"https:\/\/www.seeedstudio.com\/blog\/author\/ains\/"}]}},"modified_by":"Ains","views":100729,"featured_image_urls":{"full":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/05\/Water-flow-sensor-principle-1.gif",632,313,false],"thumbnail":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/05\/Water-flow-sensor-principle-1-80x80.gif",80,80,true],"medium":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/05\/Water-flow-sensor-principle-1-300x149.gif",300,149,true],"medium_large":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/05\/Water-flow-sensor-principle-1.gif",632,313,false],"large":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/05\/Water-flow-sensor-principle-1.gif",632,313,false],"1536x1536":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/05\/Water-flow-sensor-principle-1.gif",632,313,false],"2048x2048":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/05\/Water-flow-sensor-principle-1.gif",632,313,false],"visody_icon":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/05\/Water-flow-sensor-principle-1.gif",32,16,false],"magazine-7-slider-full":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/05\/Water-flow-sensor-principle-1.gif",632,313,false],"magazine-7-slider-center":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/05\/Water-flow-sensor-principle-1.gif",632,313,false],"magazine-7-featured":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/05\/Water-flow-sensor-principle-1.gif",632,313,false],"magazine-7-medium":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/05\/Water-flow-sensor-principle-1.gif",632,313,false],"magazine-7-medium-square":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/05\/Water-flow-sensor-principle-1.gif",632,313,false]},"author_info":{"display_name":"Ains","author_link":"https:\/\/www.seeedstudio.com\/blog\/author\/ains\/"},"category_info":"<a href=\"https:\/\/www.seeedstudio.com\/blog\/category\/news\/\" rel=\"category tag\">News<\/a>","tag_info":"News","comment_count":"0","_links":{"self":[{"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/posts\/32485","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/users\/2732"}],"replies":[{"embeddable":true,"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/comments?post=32485"}],"version-history":[{"count":10,"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/posts\/32485\/revisions"}],"predecessor-version":[{"id":33205,"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/posts\/32485\/revisions\/33205"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/media\/32621"}],"wp:attachment":[{"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/media?parent=32485"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/categories?post=32485"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/tags?post=32485"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}