Yf-s201 Proteus Library ((install)) Link
// --- CALCULATIONS --- // flowRate (L/min) = (PulseCount / 7.5) [since 7.5 Hz = 1 L/min] flowRate = pulseCount / 7.5; //This is the simpler method
Simulating fluid dynamics and liquid measurements inside an electronics CAD environment can be highly challenging because standard simulation packages lack native hydraulic components. To overcome this barrier, embedded systems engineers and hobbyists rely on custom simulation models.
void pulseCounter() pulseCount++;
In the field, click the folder icon to browse for the .hex file.
The default installation path for Proteus 8 is: C:\Program Files (x86)\Labcenter Electronics\Proteus 8 Professional\DATA . yf-s201 proteus library
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).
If you cannot find a reliable custom library, you can perfectly mimic the YF-S201's electrical behavior using native Proteus signal generators. Because microcontrollers only read the digital square wave from the yellow wire, you can use a or a Function Generator to act as the sensor. // --- CALCULATIONS --- // flowRate (L/min) =
Look at the bottom console window and copy the path to the .hex file (e.g., C:\Users\AppData\Local\Temp\arduino_build_xxxxxx/sketch.ino.hex ).
As you click the logic state repeatedly to simulate the turning of the flow sensor rotor, you should see the Flow Rate (L/min) and Total Volume (Liters) update on your simulated LCD screen. Troubleshooting Common Simulation Errors The default installation path for Proteus 8 is:
: C:\ProgramData\Labcenter Electronics\Proteus 8 Professional\Data\LIBRARY (Note: The "ProgramData" folder is hidden by default in Windows. Enable "Hidden items" in your File Explorer view settings).