{"product_id":"yf-s201c-water-flow-sensor-with-1-2-inch-threads","title":"YF-S201C Water Flow Sensor with 1\/2 inch threads","description":"\u003cdiv\u003e\u003cimg src=\"https:\/\/assets.thingbits.net\/description\/100-percent-genuine-guarantee-badge-v4.svg\" alt=\"100 Percent Genuine Guarantee Badge\" width=\"150\" height=\"35\"\u003e\u003c\/div\u003e\n\u003chr\u003e\n\u003cp\u003e\u003cstrong\u003eThe YF-S201C is a water flow sensor\u003c\/strong\u003e\u003cspan\u003e \u003c\/span\u003ethat measures liquid\u003cspan\u003e \u003c\/span\u003e\u003cstrong\u003eflow rates upto 30 litres per minute\u003c\/strong\u003e\u003cspan\u003e \u003c\/span\u003ecan handle maximum pressure of 1.75 megapascals. It is r\u003cstrong\u003eated for 3.5V to 24V DC.\u003c\/strong\u003e\u003c\/p\u003e\n\u003cdiv class=\"col-md-4\"\u003e\n\u003ch4\u003eOverview\u003c\/h4\u003e\n\u003cp\u003e\u003cstrong\u003eThe YF-S201C is a water flow sensor\u003c\/strong\u003e\u003cspan\u003e \u003c\/span\u003ethat measures liquid flow rates. It consists of a plastic housing, a rotating impeller, and a Hall effect sensor. It has a flow rate of 1 to 30 Litres per minute and can handle maximum pressure of 1.75 megapascals.\u003c\/p\u003e\n\u003ch4\u003eHow it works?\u003c\/h4\u003e\n\u003cp\u003e\u003cstrong\u003eIt has a rotor (a.k.a impeller)\u003c\/strong\u003e\u003cspan\u003e \u003c\/span\u003einside and as the water flows through the sensor, it pushes against the blades of the rotor causing it to spin which has a magnet attached to it. The faster the water flows, the faster the rotor spins along with the magnets. These rotations are sensed using a hall efect sensor which can detect the magnetic field and is positioned near the rotor.\u003c\/p\u003e\n\u003cp\u003eAs the magnet on the rotor spins past the Hall effect sensor, it creates a disruption in the magnetic field. The Hall effect sensor detects this change and outputs an electrical signal, typically a pulse. The number of pulses generated by the sensor is directly related to the speed of the rotor, which in turn, is related to the flow rate of the water.\u003c\/p\u003e\n\u003ch4\u003eDimensions\u003c\/h4\u003e\n\u003cp\u003eDimension and physical characteristics of the YF-S201C water flow sensor.\u003c\/p\u003e\n\u003cimg class=\"img-fluid\" src=\"https:\/\/images.thingbits.net\/eyJidWNrZXQiOiJ0aGluZ2JpdHMtbmV0Iiwia2V5IjoiZGVzY3JpcHRpb24vd2F0ZXItZmxvdy1zZW5zb3IteWYtczIwMWMtZGlhZ3JhbS5qcGcifQ==\" alt=\"YF-S201C Water Flow Sensor Dimensions\" width=\"917\" height=\"1588\"\u003e\n\u003cdiv class=\"table-responsive\"\u003e \u003c\/div\u003e\n\u003c\/div\u003e\n\u003cdiv class=\"col-md-4\"\u003e\n\u003ch4\u003eSpecifications\u003c\/h4\u003e\n\u003cp\u003eSpecifications for YF-S201C water flow sensor.\u003c\/p\u003e\n\u003cdiv class=\"table-responsive\"\u003e\n\u003ctable class=\"table table-striped\"\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003cstrong\u003eModel\u003c\/strong\u003e\u003c\/td\u003e\n\u003ctd\u003eYF-S201C\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003cstrong\u003eOperating Voltage\u003c\/strong\u003e\u003c\/td\u003e\n\u003ctd\u003e3.5V to 24V DC\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003cstrong\u003eMax. Operating Current\u003c\/strong\u003e\u003c\/td\u003e\n\u003ctd\u003e15mA @ 5V DC\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003cstrong\u003eOperating Flow Rate\u003c\/strong\u003e\u003c\/td\u003e\n\u003ctd\u003e1 to 30 L\/min\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003cstrong\u003eOperating Temperature\u003c\/strong\u003e\u003c\/td\u003e\n\u003ctd\u003e-25°C to 80°C\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003cstrong\u003eOperating Humidity Range\u003c\/strong\u003e\u003c\/td\u003e\n\u003ctd\u003e25% to 95%RH\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003cstrong\u003eMax. Water Pressure\u003c\/strong\u003e\u003c\/td\u003e\n\u003ctd\u003e1.75 MPa\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003cstrong\u003eOutput Duty Cycle\u003c\/strong\u003e\u003c\/td\u003e\n\u003ctd\u003e50%  ±10%\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003cstrong\u003eOutput Rise Time\u003c\/strong\u003e\u003c\/td\u003e\n\u003ctd\u003e0.04 us\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003cstrong\u003eOutput Fall Time\u003c\/strong\u003e\u003c\/td\u003e\n\u003ctd\u003e0.018 us\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003cstrong\u003eFlow Rate Pulse\u003c\/strong\u003e\u003c\/td\u003e\n\u003ctd\u003ePulse Frequency = 7.5 x Q\u003cbr\u003eQ = Flow Rate L\/min\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003cstrong\u003eExternal Threads\u003c\/strong\u003e\u003c\/td\u003e\n\u003ctd\u003e1\/2 inch\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003cstrong\u003eDurability\u003c\/strong\u003e\u003c\/td\u003e\n\u003ctd\u003e300,000 cycles\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003c\/tbody\u003e\n\u003c\/table\u003e\n\u003c\/div\u003e\n\u003chr\u003e\n\u003ch4\u003ePinout\u003c\/h4\u003e\n\u003cp\u003e\u003cspan\u003eYF-S201C \u003c\/span\u003eWater flow sensor pinout and wire color coding.\u003c\/p\u003e\n\u003cdiv class=\"table-responsive\"\u003e\n\u003ctable class=\"table table-bordered\"\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003cstrong\u003eNo.\u003c\/strong\u003e\u003c\/td\u003e\n\u003ctd\u003e\u003cstrong\u003ePins\u003c\/strong\u003e\u003c\/td\u003e\n\u003ctd\u003e\u003cstrong\u003eColor\u003c\/strong\u003e\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e1\u003c\/td\u003e\n\u003ctd\u003e5V - 24V DC\u003c\/td\u003e\n\u003ctd\u003e\u003cspan\u003e\u003csvg class=\"svg-inline--fa fa-circle\" aria-hidden=\"true\" data-prefix=\"fas\" data-icon=\"circle\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewbox=\"0 0 512 512\" data-fa-i2svg=\"\"\u003e\u003cpath fill=\"currentColor\" d=\"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512z\"\u003e\u003c\/path\u003e\u003c\/svg\u003e Red\u003c\/span\u003e\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e2\u003c\/td\u003e\n\u003ctd\u003eGND\u003c\/td\u003e\n\u003ctd\u003e\u003cspan\u003e\u003csvg class=\"svg-inline--fa fa-circle\" aria-hidden=\"true\" data-prefix=\"fas\" data-icon=\"circle\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewbox=\"0 0 512 512\" data-fa-i2svg=\"\"\u003e\u003cpath fill=\"currentColor\" d=\"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512z\"\u003e\u003c\/path\u003e\u003c\/svg\u003e Black\u003c\/span\u003e\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e3\u003c\/td\u003e\n\u003ctd\u003ePulse Output\u003c\/td\u003e\n\u003ctd\u003e\u003cspan\u003e\u003csvg class=\"svg-inline--fa fa-circle\" aria-hidden=\"true\" data-prefix=\"fas\" data-icon=\"circle\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewbox=\"0 0 512 512\" data-fa-i2svg=\"\"\u003e\u003cpath fill=\"currentColor\" d=\"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512z\"\u003e\u003c\/path\u003e\u003c\/svg\u003e Yellow\u003c\/span\u003e\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003c\/tbody\u003e\n\u003c\/table\u003e\n\u003c\/div\u003e\n\u003c\/div\u003e\n\u003cdiv class=\"col-md-4\"\u003e\n\u003ch4\u003eConnections \u0026amp; Code\u003c\/h4\u003e\n\u003cul id=\"pills-tab\" class=\"nav nav-pills mb-3\" role=\"tablist\"\u003e\n\u003cli class=\"nav-item\" role=\"presentation\"\u003e\u003cbutton id=\"pills-home-tab\" class=\"nav-link active\" role=\"tab\" type=\"button\" data-toggle=\"pill\" data-target=\"#pills-home\" aria-controls=\"pills-home\" aria-selected=\"true\"\u003eUNO\u003c\/button\u003e\u003c\/li\u003e\n\u003c\/ul\u003e\n\u003cdiv id=\"pills-tabContent\" class=\"tab-content\"\u003e\n\u003cdiv id=\"pills-home\" class=\"tab-pane fade show active\" role=\"tabpanel\" aria-labelledby=\"pills-home-tab\"\u003e\n\u003ch5\u003eConnection\u003c\/h5\u003e\n\u003cul class=\"list-unstyled\"\u003e\n\u003cli\u003e\n\u003cstrong\u003eVIN (Red):\u003c\/strong\u003e\u003cspan\u003e \u003c\/span\u003eYou may connect this to 5V pin on arduino UNO but we recommend to connect it to an external power supply of 5V DC\u003c\/li\u003e\n\u003cli\u003e\n\u003cstrong\u003eGND (Black):\u003c\/strong\u003e\u003cspan\u003e \u003c\/span\u003eConnect to GND. Make sure you connect all ground pins together. If you are using an external power supply connect the power supply ground to aduino UNO GND.\u003c\/li\u003e\n\u003cli\u003e\n\u003cstrong\u003ePulse Output (Yellow):\u003c\/strong\u003e Connect to digital pin 2.\u003c\/li\u003e\n\u003c\/ul\u003e\n\u003chr\u003e\n\u003ch5\u003eCode\u003c\/h5\u003e\n\u003cp\u003eArduino UNO code for water flow sensor.\u003c\/p\u003e\n\u003cp\u003eNo external libraries are needed for this basic code.\u003c\/p\u003e\n\u003cpre\u003e\u003ccode class=\"hljs language-cpp\" data-highlighted=\"yes\"\u003e\n\u003cspan class=\"hljs-meta\"\u003e#\u003cspan class=\"hljs-keyword\"\u003edefine\u003c\/span\u003e flowPin 2  \u003cspan class=\"hljs-comment\"\u003e\/\/ Define the digital pin connected to the flow sensor\u003c\/span\u003e\u003c\/span\u003e\n\n\u003cspan class=\"hljs-keyword\"\u003evolatile\u003c\/span\u003e \u003cspan class=\"hljs-type\"\u003eint\u003c\/span\u003e flow_count = \u003cspan class=\"hljs-number\"\u003e0\u003c\/span\u003e; \u003cspan class=\"hljs-comment\"\u003e\/\/ Counts the number of pulses from the sensor\u003c\/span\u003e\n\n\u003cspan class=\"hljs-function\"\u003e\u003cspan class=\"hljs-type\"\u003evoid\u003c\/span\u003e \u003cspan class=\"hljs-title\"\u003esetup\u003c\/span\u003e\u003cspan class=\"hljs-params\"\u003e()\u003c\/span\u003e \u003c\/span\u003e{\n  Serial.\u003cspan class=\"hljs-built_in\"\u003ebegin\u003c\/span\u003e(\u003cspan class=\"hljs-number\"\u003e9600\u003c\/span\u003e);        \u003cspan class=\"hljs-comment\"\u003e\/\/ Initialize serial communication for debugging\u003c\/span\u003e\n  \u003cspan class=\"hljs-built_in\"\u003epinMode\u003c\/span\u003e(flowPin, INPUT);    \u003cspan class=\"hljs-comment\"\u003e\/\/ Set the flow sensor pin as input\u003c\/span\u003e\n  \u003cspan class=\"hljs-built_in\"\u003eattachInterrupt\u003c\/span\u003e(\u003cspan class=\"hljs-built_in\"\u003edigitalPinToInterrupt\u003c\/span\u003e(flowPin), flowInterrupt, RISING);\n  \u003cspan class=\"hljs-comment\"\u003e\/\/ Enable interrupt on rising edge (each pulse)\u003c\/span\u003e\n}\n\n\u003cspan class=\"hljs-function\"\u003e\u003cspan class=\"hljs-type\"\u003evoid\u003c\/span\u003e \u003cspan class=\"hljs-title\"\u003eloop\u003c\/span\u003e\u003cspan class=\"hljs-params\"\u003e()\u003c\/span\u003e \u003c\/span\u003e{\n  \u003cspan class=\"hljs-type\"\u003eunsigned\u003c\/span\u003e \u003cspan class=\"hljs-type\"\u003elong\u003c\/span\u003e currentMillis = \u003cspan class=\"hljs-built_in\"\u003emillis\u003c\/span\u003e();\n  \u003cspan class=\"hljs-type\"\u003estatic\u003c\/span\u003e \u003cspan class=\"hljs-type\"\u003eunsigned\u003c\/span\u003e \u003cspan class=\"hljs-type\"\u003elong\u003c\/span\u003e previousMillis = \u003cspan class=\"hljs-number\"\u003e0\u003c\/span\u003e; \u003cspan class=\"hljs-comment\"\u003e\/\/ Stores time of last interrupt\u003c\/span\u003e\n\n  \u003cspan class=\"hljs-comment\"\u003e\/\/ Calculate flow rate every 1 second\u003c\/span\u003e\n  \u003cspan class=\"hljs-keyword\"\u003eif\u003c\/span\u003e (currentMillis - previousMillis \u0026gt;= \u003cspan class=\"hljs-number\"\u003e1000\u003c\/span\u003e) {\n    \u003cspan class=\"hljs-type\"\u003efloat\u003c\/span\u003e flowRate = (flow_count * \u003cspan class=\"hljs-number\"\u003e60.0\u003c\/span\u003e) \/ (currentMillis - previousMillis);  \u003cspan class=\"hljs-comment\"\u003e\/\/ Flow rate in pulses per minute\u003c\/span\u003e\n    Serial.\u003cspan class=\"hljs-built_in\"\u003eprint\u003c\/span\u003e(\u003cspan class=\"hljs-string\"\u003e\"Flow Rate: \"\u003c\/span\u003e);\n    Serial.\u003cspan class=\"hljs-built_in\"\u003eprint\u003c\/span\u003e(flowRate);\n    Serial.\u003cspan class=\"hljs-built_in\"\u003eprintln\u003c\/span\u003e(\u003cspan class=\"hljs-string\"\u003e\" pulses per minute\"\u003c\/span\u003e);\n    flow_count = \u003cspan class=\"hljs-number\"\u003e0\u003c\/span\u003e; \u003cspan class=\"hljs-comment\"\u003e\/\/ Reset counter for next measurement\u003c\/span\u003e\n    previousMillis = currentMillis;\n  }\n}\n\n\u003cspan class=\"hljs-function\"\u003e\u003cspan class=\"hljs-type\"\u003evoid\u003c\/span\u003e \u003cspan class=\"hljs-title\"\u003eflowInterrupt\u003c\/span\u003e\u003cspan class=\"hljs-params\"\u003e()\u003c\/span\u003e \u003c\/span\u003e{\n  flow_count++; \u003cspan class=\"hljs-comment\"\u003e\/\/ Increment pulse counter on interrupt\u003c\/span\u003e\n}\u003c\/code\u003e\u003c\/pre\u003e\n\u003c\/div\u003e\n\u003c\/div\u003e\n\u003c\/div\u003e","brand":"Artlayer3D","offers":[{"title":"Clear","offer_id":47484660809922,"sku":"AL3D0217","price":354.0,"currency_code":"INR","in_stock":true},{"title":"Black","offer_id":47484660842690,"sku":"AL3D0218","price":354.0,"currency_code":"INR","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0737\/4195\/9362\/files\/eyJidWNrZXQiOiJ0aGluZ2JpdHMtbmV0Iiwia2V5IjoieTZrN281MDE0cXUweG5neDl3Z3E3c2hsdDd0ZCIsImVkaXRzIjp7InJlc2l6ZSI6eyJ3aWR0aCI6OTcwLCJoZWlnaHQiOjcyOCwiZml0IjoiY292ZXIifX19.webp?v=1776692042","url":"https:\/\/artlayer3d.com\/products\/yf-s201c-water-flow-sensor-with-1-2-inch-threads","provider":"Artlayer3D","version":"1.0","type":"link"}