Library — Yf-s201 Proteus
Since a specific library does not exist, we must use generic Proteus components to emulate the YF-S201’s behavior. Here are three practical methods.
Close Proteus. Navigate to your Proteus installation directory.
To help you get your project up and running smoothly, tell me:
Serial.print("Flow Rate: "); Serial.print(flowRate); Serial.print(" L/min\t"); Serial.print("Total: "); Serial.print(totalLiters); Serial.println(" L");
Do you need assistance for the library files? Share public link yf-s201 proteus library
Turning the potentiometer in simulation varies the output frequency. Your microcontroller code will read changing flow rates. This is the best software-only method.
Open the Component Mode (P) in Proteus and search for and select the following: (or your preferred microcontroller) YF-S201 Flow Sensor (now visible via your new library) LM016L (Standard 16x2 HD44780 LCD display)
However, because Proteus does not include the YF-S201 in its default component library, developers must download and install a custom or build a custom simulation model. This guide covers how to set up, program, and simulate a water flow monitoring system from scratch using Proteus and Arduino. What is the YF-S201 Water Flow Sensor?
The pulse frequency is directly proportional to the flow rate. The standard calibration formula for the YF-S201 is: Since a specific library does not exist, we
pulseCount = 0; oldTime = millis(); attachInterrupt(digitalPinToInterrupt(2), pulseCounter, FALLING);
Use this if you only need the physical footprint for PCB design.
The YF-S201 is a popular, low-cost sensor used to measure the volume and rate of liquids passing through a pipe. It consists of a plastic valve body, a water rotor, and a Hall-effect magnetic sensor. How it Works
: Close and reopen Proteus to refresh the component database. Navigate to your Proteus installation directory
The installation path varies depending on your Proteus version. Common default directories include:
⚠️ In simulation, add a from Yellow wire to +5V. In real hardware, the sensor needs an external 10k pull-up on the signal line.
(Potentiometer to simulate changing flow speeds manually, if using an advanced simulation model) Wiring the Schematic