Please, flip your device!

Yf-s201 Proteus Library: !!exclusive!!

Watch the LCD initialize. Adjust the test potentiometer connected to the YF-S201 model. You will see the frequency pulse stream change dynamically, altering the live flow rate and cumulative milliliter readings displayed on the LCD. Troubleshooting Common Issues

If you are using the custom YF-S201 simulation library, use the interactive component buttons to increase or decrease the simulated water flow. If you are using a PULSE generator, change its frequency setting (e.g., 37.5 Hz for 5 L/min, 75 Hz for 10 L/min).

Would you like a step-by-step guide to creating your own YF-S201 simulation model in Proteus instead?

The YF-S201 sensor typically consists of a plastic valve body, a water rotor, and a Hall-effect sensor. yf-s201 proteus library

const int sensorPin = 2; // Connected to the flow sensor signal volatile uint16_t 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_INPUT_PULLUP); // Trigger interrupt on the falling edge of the pulse attachInterrupt(digitalPinToInterrupt(sensorPin), pulseCounter, FALLING); void loop() // Run the calculation exactly once every second (1000 milliseconds) if ((millis() - oldTime) > 1000) // Disable interrupts while processing to prevent data corruption detachInterrupt(digitalPinToInterrupt(sensorPin)); // Calculate flow rate in Liters per minute based on manufacturer calibration flowRate = ((1000.0 / (millis() - oldTime)) * pulseCount) / 7.5; oldTime = millis(); // Calculate total volume passed through the sensor flowMilliLitres = (flowRate / 60) * 1000; totalMilliLitres += flowMilliLitres; // Print results to the Proteus Virtual Terminal Serial.print("Flow rate: "); Serial.print(flowRate); Serial.print(" L/min"); Serial.print("\t Total Liquid: "); Serial.print(totalMilliLitres); Serial.println(" mL"); // Reset the pulse counter for the next interval pulseCount = 0; // Re-enable the interrupt attachInterrupt(digitalPinToInterrupt(sensorPin), pulseCounter, FALLING); Use code with caution. Loading the Code into Proteus

To make the frequency variable during simulation, you would need to use VCO as the primitive instead of DCLOCK , but analog primitives cannot be easily assigned to custom digital symbols in basic Proteus versions.

is a Hall effect-based water flow sensor commonly simulated in Proteus using external library files, as it is not included in the standard installation. The Engineering Projects Core Simulation Features Real-time Flow Measurement : Accurately simulates the measurement of water flow in Liters per Minute (L/min) Cumulative Volume Calculation Watch the LCD initialize

void IRAM_ATTR countPulse() pulseCount++; // Increment pulse count on every rising edge

No one has released a verified, dynamic, ready-to-download Proteus library for YF-S201 as of 2025. The sensor's output depends on physical water flow, which Proteus cannot simulate natively.

Click the button at the bottom-left of the Proteus interface. Troubleshooting Common Issues If you are using the

Open your Proteus ISIS schematic capture program and add the following parts to your workspace:

volatile int pulseCount = 0; float flowRate = 0.0; float totalLiters = 0.0; unsigned long oldTime = 0;

The native Proteus Design Suite database does not include the YF-S201. You must download and add a third-party sensor package.

The installation path varies depending on your Proteus version. Common default directories include: