There is no official built-in component in the default Proteus library. To simulate this water flow sensor, you must typically use a custom library or model it using a pulse generator to mimic its Hall Effect output. The Engineering Projects Understanding the YF-S201 Component
The YF-S201 is a Hall Effect water flow sensor that provides a digital pulse output proportional to the flow rate. Operating Voltage : 5V to 18V DC. Output Signal
: A square wave where the frequency changes based on water velocity. Pulse Rate : Approximately 450 pulses per liter : Flow rate (L/min) = Pulse Frequency (Hz) / 7.5. PlatformIO Registry Adding the Library to Proteus If you have downloaded a custom library file (usually files), follow these steps to install it:
: Obtain the YF-S201 Proteus library (often available on sites like The Engineering Projects Copy Files : Copy the library files from your download folder. Paste in Proteus : Navigate to the Proteus installation folder (e.g.,
C:\Program Files (x86)\Labcenter Electronics\Proteus 8 Professional\Data\Library ) and paste the files there.
: Close and reopen Proteus. Search for "YF-S201" in the component picker ( The Engineering Projects Simulation Alternatives
If a dedicated library is unavailable, you can simulate the sensor's behavior using standard Proteus components: Clock Generator Pulse Generator
(DCLOCK) connected to your microcontroller's interrupt pin. Adjust the frequency to simulate different flow rates. Interfacing Arduino YFS201 Library to handle the pulse counting and conversion in your code. PlatformIO Registry Typical Circuit Connection Sensor Wire Connection Proteus Component Power Rail Black (GND) Ground Terminal Yellow (Signal) Digital Pin (e.g., Pin 2 for Arduino) Microcontroller Input Proteus Libraries of Embedded Sensors yfs201 proteus library
To simulate the YF-S201 Water Flow Sensor in Proteus, you need to manually add the component library since it is not a native part of the standard Proteus installation. 1. Download and Install the YF-S201 Library
Since the YF-S201 outputs a pulse signal based on water flow, most Proteus libraries for it consist of two specific file types: .LIB and .IDX.
Download the Library: Search for a "YF-S201 Proteus Library" (often found on sites like Engineering Projects or GitHub) and download the .zip file.
Extract the Files: Unzip the folder to find the .LIB and .IDX files.
Move to Proteus Directory: Copy these files and paste them into the LIBRARY folder of your Proteus installation.
Common Path (Proteus 8.x): C:\Program Files (x86)\Labcenter Electronics\Proteus 8 Professional\Data\LIBRARY
Note: If you cannot find the Data folder, it may be hidden in C:\ProgramData\Labcenter Electronics. There is no official built-in component in the
Restart Proteus: Close and reopen Proteus for the new component to appear in your library search. 2. Wiring the YF-S201 in Proteus
The sensor typically has three pins that you must connect to your microcontroller (e.g., Arduino): VCC: Connect to +5V. GND: Connect to the common Ground.
Pulse (Signal): Connect to a Digital Pin on your microcontroller. For Arduino, Pin 2 or 3 is recommended because they support External Interrupts, which are essential for counting flow pulses accurately. 3. Simulating Water Flow
Because Proteus cannot simulate physical water, the YF-S201 component in the software usually acts as a Pulse Generator.
When you run the simulation, you may need to adjust the "flow rate" by clicking on the sensor and changing its frequency or pulse properties to mimic different water speeds.
If the component has a "test" pin, you might need to toggle a switch or logic state to generate the pulses. 4. Code Implementation (Arduino Example)
To read the sensor, use a simple interrupt-based script in your firmware: Introduction In the world of embedded systems and
volatile int pulseCount = 0; void pulseCounter() pulseCount++; void setup() Serial.begin(9600); // Trigger on falling edge of the signal attachInterrupt(digitalPinToInterrupt(2), pulseCounter, FALLING); void loop() // Logic to convert pulseCount to Liters per Minute (L/min) Use code with caution. Copied to clipboard
If you encounter a "No library found" error, ensure you are running Proteus as an Administrator so it has the permissions to read the newly added files.
How to Add Arduino UNO Library to Proteus | Step-by-Step Guide
In the world of Proteus simulation, the YFS201 is notorious for being "difficult." Here is the "deep story" on why it is hard to find, how the simulation actually works, and how to build one if you can't find a library file.
In the world of embedded systems and IoT-based flow measurement, the YFS201 water flow sensor has emerged as a popular choice for hobbyists and professionals alike. Known for its affordability, ease of use, and decent accuracy, the YFS201 is frequently paired with Arduino, ESP8266, and STM32 microcontrollers. However, before committing to hardware, every smart developer knows the value of simulation.
This is where the YFS201 Proteus Library comes into play. Proteus, developed by Labcenter Electronics, is one of the most powerful electronic design automation (EDA) tools, offering schematic capture, PCB layout, and—most importantly—microcontroller simulation.
But there’s a catch: Proteus does not include the YFS201 sensor in its default library. This article provides a complete walkthrough on sourcing, installing, and using a custom YFS201 library for Proteus. You will learn why simulation matters, how to model flow sensors, and how to write firmware that reads flow rate and total volume—all without a physical prototype.
Unlike a simple switch, the YFS201 library contains a Property called Frequency or FlowRate. When you run the simulation, the OUT pin toggles at this frequency.
FLOW_RATE_LPM (Liters per minute). Change this value to see the output frequency change immediately.