Yf-s201 Proteus Library ((better)) -
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
Therefore, simulation requires generating a digital signal whose frequency varies based on an input stimulus (simulated water flow). yf-s201 proteus library
- Saves time during prototyping and firmware development
- Enables testing of filtering/debouncing and pulse-counting algorithms
- Useful for demos and teaching without physical sensor
Steps:
void pulseCounter() pulseCount++;
- To simulate a flow of 1 Liter/minute, the frequency needs to be: $$1 L/min \times 450 pulses / 60 seconds = 7.5 Hz$$
- Double-click the DCLOCK component and set the Frequency to
7.5 Hz(or higher for faster flow). - Set the Duty Cycle to 50%.
Step 4: Simulating with a Microcontroller (Arduino Example)
Circuit:
Comments