The speed of the rotor changes with different rates of flow. The Hall-effect sensor outputs a corresponding high/low digital pulse signal (square wave). Pin Configuration: The sensor uses three simple wires: Red (VCC): 5V to 24V DC power supply. Black (GND): Ground connection. Yellow (Pulse/Data): PWM pulse output signal. Key Features of an Exclusive Proteus Library
is a staple in the DIY and industrial automation world for measuring liquid volume and flow rate. While Proteus is a powerhouse for electronic simulation, it does not natively include a dedicated model for this specific sensor. To bridge this gap, developers have created "exclusive" libraries that allow you to simulate water flow projects without a physical lab setup. What is the YF-S201 Flow Sensor?
Whether you are a student working on a school project, a hobbyist building a smart irrigation system, or a professional developing an industrial flow meter, integrating this library into your Proteus workflow is a smart, efficient, and reliable approach to electronics design.
Published: October 2023 | Updated for Latest Proteus 8/9 Versions
: You will typically get a .zip or .rar file containing .LIB , .IDX , and sometimes a .HEX file.
What do you want to track? (e.g., total volume data logging , relays for valves , etc.)
const int sensorPin = 2; volatile long pulseCount = 0; float flowRate = 0.0; unsigned int flowMilliLitres = 0; unsigned long totalMilliLitres = 0; unsigned long oldTime = 0; void pulseCounter() pulseCount++; void setup() Serial.begin(9600); pinMode(sensorPin, INPUT_PULLUP); // Interrupt 0 is tied to digital pin 2 attachInterrupt(digitalPinToInterrupt(sensorPin), pulseCounter, FALLING); void loop() if((millis() - oldTime) > 1000) detachInterrupt(digitalPinToInterrupt(sensorPin)); // YF-S201 conversion formula: Pulse frequency (Hz) = 7.5Q, where Q is flow rate in L/min flowRate = ((1000.0 / (millis() - oldTime)) * pulseCount) / 7.5; oldTime = millis(); flowMilliLitres = (flowRate / 60) * 1000; totalMilliLitres += flowMilliLitres; Serial.print("Flow rate: "); Serial.print(flowRate); Serial.print(" L/min Use code with caution. Troubleshooting Simulation Errors
The exclusive library uses a "Pull-up" configuration. Add a 10k resistor from OUT to VCC in your schematic. The model expects an open-collector output.
Edyth Moore says:
Yfs201 Proteus Library - Exclusive
The speed of the rotor changes with different rates of flow. The Hall-effect sensor outputs a corresponding high/low digital pulse signal (square wave). Pin Configuration: The sensor uses three simple wires: Red (VCC): 5V to 24V DC power supply. Black (GND): Ground connection. Yellow (Pulse/Data): PWM pulse output signal. Key Features of an Exclusive Proteus Library
is a staple in the DIY and industrial automation world for measuring liquid volume and flow rate. While Proteus is a powerhouse for electronic simulation, it does not natively include a dedicated model for this specific sensor. To bridge this gap, developers have created "exclusive" libraries that allow you to simulate water flow projects without a physical lab setup. What is the YF-S201 Flow Sensor?
Whether you are a student working on a school project, a hobbyist building a smart irrigation system, or a professional developing an industrial flow meter, integrating this library into your Proteus workflow is a smart, efficient, and reliable approach to electronics design. yfs201 proteus library exclusive
Published: October 2023 | Updated for Latest Proteus 8/9 Versions
: You will typically get a .zip or .rar file containing .LIB , .IDX , and sometimes a .HEX file. The speed of the rotor changes with different rates of flow
What do you want to track? (e.g., total volume data logging , relays for valves , etc.)
const int sensorPin = 2; volatile long pulseCount = 0; float flowRate = 0.0; unsigned int flowMilliLitres = 0; unsigned long totalMilliLitres = 0; unsigned long oldTime = 0; void pulseCounter() pulseCount++; void setup() Serial.begin(9600); pinMode(sensorPin, INPUT_PULLUP); // Interrupt 0 is tied to digital pin 2 attachInterrupt(digitalPinToInterrupt(sensorPin), pulseCounter, FALLING); void loop() if((millis() - oldTime) > 1000) detachInterrupt(digitalPinToInterrupt(sensorPin)); // YF-S201 conversion formula: Pulse frequency (Hz) = 7.5Q, where Q is flow rate in L/min flowRate = ((1000.0 / (millis() - oldTime)) * pulseCount) / 7.5; oldTime = millis(); flowMilliLitres = (flowRate / 60) * 1000; totalMilliLitres += flowMilliLitres; Serial.print("Flow rate: "); Serial.print(flowRate); Serial.print(" L/min Use code with caution. Troubleshooting Simulation Errors Black (GND): Ground connection
The exclusive library uses a "Pull-up" configuration. Add a 10k resistor from OUT to VCC in your schematic. The model expects an open-collector output.
October 8, 2024 — 4:05 am
Stefan says:
Great work here – thank you for the clear explanation !
November 29, 2024 — 7:23 am
Jacky says:
It’s a very simple thing, but it has to be made very complicated
April 10, 2025 — 11:51 pm
비아그라 구매 사이트 says:
멋진 것들입니다. 당신의 포스트를 보고 매우 만족합니다.
고맙습니다 그리고 당신에게 연락하고 싶습니다.
메일을 보내주시겠습니까?
July 8, 2025 — 12:33 pm
Emily Lahren says:
Thank you for reading! You can contact me through my main contact page using the menu at the top of the page.
July 27, 2025 — 8:27 pm
Steve says:
Thank you!
July 26, 2025 — 2:27 pm
Muhammad Kamran says:
Good effort, easy to understand.
July 28, 2025 — 10:36 pm