Yfs201 Proteus Library Exclusive [patched]
Place an and the YFS201 sensor in the Proteus workspace.
Open Arduino IDE and upload the following code to your virtual Arduino in Proteus:
If you are using Proteus 9, be aware that a known license issue can prevent DLL-based library models from functioning. Libraries that rely on LIB and MODEL files might work, but those that depend on .DLL files will fail. The community is actively working on a solution, but no official fix is available yet.
In a physical prototype, this is straightforward. But in Proteus simulation software, a problem arises:
void setup() Serial.begin(9600); pinMode(2, INPUT); attachInterrupt(digitalPinToInterrupt(2), pulseCounter, RISING); oldTime = millis(); yfs201 proteus library exclusive
Wire the 16x2 LCD to the Arduino using standard digital pins or an I2C backpack model to display the calculated "Liters per Minute" and "Total Liters Consumed." Production-Ready Arduino Code for Simulation
Simulating fluid dynamics and sensor telemetry in Proteus requires accurate peripheral models. The YF-S201 water flow sensor is a staple in automation, smart agriculture, and liquid dosing projects.
: It produces a pulse signal where the frequency depends on the flow rate. : The standard calculation for flow is Pulse frequency = 7.5 × Q (where Q is flow rate in L/min). How to Add the YF-S201 Library to Proteus
Even with a reliable library, you might encounter simulation errors. Here are two common problems and their solutions: Place an and the YFS201 sensor in the Proteus workspace
// YFS201 Flow Sensor Simulation Code volatile int pulseCount = 0; float flowRate = 0.0; unsigned long oldTime = 0;
The following production-ready Arduino sketch handles external interrupts, tracks timing, and calculates both immediate flow rates and cumulative volume totals.
: Some simulation models require you to right-click the component, select Edit Properties , and browse for the provided .HEX file to define its behavior. Simulating without a Specific Library Proteus Libraries of Embedded Sensors
Proteus ISIS includes a "Make Device" wizard ( Library menu → Make Device ). This tool guides you through a process of creating a new component: The community is actively working on a solution,
Whether you are designing a smart water meter for a university thesis or an automated coffee brewer for a startup, mastering the YFS201 simulation ensures that when you finally connect the water pipes, your electronics are already 100% ready.
Here are the essential parameters provided by the manufacturer and various technical resources:
Since the physical sensor outputs pulses proportional to flow, simulation models often use a potentiometer signal generator to mimic the "flow" input. : Connect to 5V and Ground. Signal Output