featured
To use the YF-S201 in Proteus, you must manually add the library files to your software directory: Download Files : Obtain the library zip containing WaterSensorTEP.IDX WaterSensorTEP.LIB WaterSensorTEP.HEX Locate Folder : Navigate to the Proteus installation path, typically:
generator in Proteus. Connect it to your interrupt pin and vary its frequency to see how your code responds to different "flow rates" [5]. Watch the "Float" Math yfs201 proteus library
: Connect to a digital pin on your microcontroller, preferably one that supports External Interrupts (e.g., Digital Pin 2 or 3 on an Arduino Uno 💻 The Simulation Code (Arduino Example) To use the YF-S201 in Proteus, you must
// YF-S201 formula: Flow rate (L/min) = Frequency (Hz) / 7.5 flowRate = pulseCount / ; totalLiters += (flowRate / ); Since the sensor output is a frequency, using
To simulate flow, you need code that counts pulses. Since the sensor output is a frequency, using an is the most accurate method. // Signal wire connected to Pin 2 pulseCount = flowRate = totalLiters = setup() Serial.begin(
He navigated to his , usually tucked away in C:\Program Files (x86)\Labcenter Electronics\Proteus 8 Professional\LIBRARY .