Library: Yf-s201 Proteus
Example Arduino code for reading the YF-S201 sensor using interrupts to get flow rate and total volume.
Compile your Arduino code and locate the .hex output file. Double-click the Arduino UNO component in Proteus and upload the .hex file to the program file section.
Simulating a water flow sensor in Proteus requires a clever workaround because the software lacks a native, dedicated YF-S201 component. The YF-S201 sensor operates by using a internal magnetic Hall effect sensor that outputs a digital pulse every time the internal turbine spins.
In the field, click the folder icon to browse for the .hex file. yf-s201 proteus library
Title: YF-S201 Sensor Model for Proteus — Accurate, Ready-to-Use Library Component
Wire the LM016L LCD to the digital pins of the Arduino to display real-time Liters per Minute (L/min) values.
Add IoT capabilities to send the total volume consumed to an or ESP8266 dashboard. Example Arduino code for reading the YF-S201 sensor
Copy these files and paste them into your Proteus library directory:
There may be times when a dedicated library is not available, or you need to test your system's response to very specific, non-standard flow patterns. In these cases, a common practice among experienced Proteus users is to simulate the sensor using a . This method works because the sensor's signal is a simple square wave, and you can use the equation Flow Rate (Q) = Pulse Frequency (F) / 7.5 to control the simulation.
Ensure the pulse generator is set to a digital voltage amplitude of 5V . Analog sine waves or lower voltage thresholds may fail to trigger the internal digital interrupt. Simulating a water flow sensor in Proteus requires
Red (VCC), Black (GND), Yellow (Pulse Output) 📥 How to Install the YF-S201 Proteus Library Water Sensor Library For Proteus - The Engineering Projects
Place the PULSE generator tool from the Left Generator Toolbar. Connect its positive terminal to Digital Pin 2 of the Arduino. Pin 2 supports external hardware interrupts ( INT0 ), which are necessary for accurate pulse tracking.
One of the most powerful features of Proteus is its ability to simulate an Arduino board running your own code. You can combine this with the YF-S201 library. Here is a basic outline: