Connect the sensor’s Signal wire to an interrupt-capable pin (e.g., Pin 2) on the Arduino.
Standard libraries just generate random pulses. The exclusive version includes a . You can dial in the exact flow rate (L/min), and the library calculates the precise frequency in real-time: [ Frequency (Hz) = (7.5 \times FlowRate) / 60 ]
Once installed, follow these steps to add the sensor to your project: Open the in Proteus and click 'P'. yfs201 proteus library exclusive
The is typically distributed under open-source or educational licenses. It is not an official Labcenter product. However, it respects the original sensor’s datasheet from manufacturer (YFS – Jiangsu Yidu Flow Sensor). Always check the license file included with your download. Using this library for commercial product validation is acceptable, but you must verify with real hardware before production.
Note: The ProgramData folder is hidden by default in Windows. You may need to enable "Hidden items" in your File Explorer view settings. Connect the sensor’s Signal wire to an interrupt-capable
When fluid flows through the valve, it forces the internal turbine wheel to spin. The integrated magnet moves past the Hall Effect integrated circuit with each rotation, generating a distinct high/low square-wave output pulse.
This exclusive guide provides everything you need to know about integrating, simulating, and coding for the YF-S201 water flow sensor within Proteus. Understanding the YF-S201 Hardware Blueprint You can dial in the exact flow rate
: Most Proteus models include a "Test" pin. Connect a Potentiometer (POT-HG) to this pin. This allows you to manually vary the "flow rate" during simulation since you cannot run actual water through the software. 3. Calculating Flow in Code The YF-S201 typically follows the formula: , where is the flow rate.
void loop() if(millis() - oldTime > 1000) //every 1 second detachInterrupt(0); flowRate = (pulseCount / 7.5); // Liters per minute lcd.setCursor(0,0); lcd.print("Flow: "); lcd.print(flowRate); lcd.print(" L/min "); pulseCount = 0; oldTime = millis(); attachInterrupt(digitalPinToInterrupt(2), pulseCounter, RISING);
Have you used the exclusive library in a unique project? Share your simulation results and custom modifications in the comments below. For the latest updates on Proteus simulation models, subscribe to our newsletter.