TEP DOWNLOAD CENTER

Project Files of YF-S201 Water Flow Sensor Library for Proteus V1.0: Flow Meter

Libraries Code Projects Simulation
tep://download-terminal yf-s201-tep-v1-0-bf84e79a2aae460495f2b5e139748453.zip ZIP archiveV1.0Verified50 downloadsFree
YF-S201 Water Flow Sensor Library for Proteus V1.0: the sensor with its STATUS panel and the Advance pop-up
Proteus library · File 1 of 1

YF-S201 Water Flow Sensor Library for Proteus V1.0

YF-S201 Water Flow Sensor Library for Proteus V1.0 comes as a ZIP archive of 10 files (1.2 MB, 2.6 MB unpacked) holding Proteus library files, simulation model DLLs, a Proteus simulation, an Arduino sketch and compiled HEX firmware.

  • LIBProteus library
  • DLLProteus model
  • DSNProteus simulation
  • INOArduino sketch
  • HEXHEX firmware

Description

This is the download page of YF-S201 Water Flow Sensor Library for Proteus V1.0, the file package of the tutorial YF-S201 Water Flow Sensor Library for Proteus V1.0: Flow Meter, published on The Engineering Projects in October 2026. Here you get the ZIP file (1.2 MB) with the Proteus library files (LIB and IDX), the simulation model (DLL), a ready Proteus simulation, an Arduino sketch and the compiled HEX firmware, the list of files it contains, the README when there is one, and the installation steps in order.

What this library is

YF-S201-Water-Flow-Sensor-Library-for-Proteus-v1.0.zip with the YF-S201 Hall-effect water flow sensor (a pulse output, F = 7.5 x Q, 450 pulses per litre), Simple and Advance (TEPYFS201.LIB and TEPYFS201.DLL), our Arduino UNO V4.0 library with its built-in serial monitor (ArduinoV4TEP.LIB and TEPARDUINO.DLL), the two-UNO simulation with its HEX file, the demo sketch and a README.

This is version 1.0; older or newer releases, when they exist, are listed in the Development tab.

What is inside the ZIP file

  • ArduinoV4TEP.LIB – Proteus library, 201.9 KB
  • TEPYFS201.LIB – Proteus library, 65.9 KB
  • TEPARDUINO.DLL – Simulation model, 883.5 KB
  • TEPYFS201.DLL – Simulation model, 292.5 KB
  • YFS201-Flow-ArduinoUnoV4.pdsprj – Proteus simulation, 24 KB
  • YFS201_Flow_Demo.ino – Arduino sketch, 5.9 KB
  • and 4 more, all listed in the File Structure tab

The archive unpacks to 2.6 MB and carries its own README (README.txt), shown in the README tab above.

How to download

Use the download panel at the top of this page: after the counter (30 seconds for guests, 10 for members) the black button unlocks and the ZIP file comes straight from our content network. If the browser opens it instead of saving, use Save as; extract the whole archive before using anything inside it.

How to install

  • Step 1: Extract the ZIP file with Windows (Extract All), 7-Zip or WinRAR, keeping its folders.
  • Step 2: Close Proteus and copy ArduinoV4TEP.LIB and TEPYFS201.LIB into its LIBRARY folder (Proteus 8: C:\Program Files (x86)\Labcenter Electronics\Proteus 8 Professional\LIBRARY).
  • Step 3: Copy TEPARDUINO.DLL and TEPYFS201.DLL into the MODELS folder next to it, so the part simulates.
  • Step 4: Start Proteus, press P and search for "ArduinoV4TEP"; place and wire it as in the tutorial.
  • Step 5: Open YFS201_Flow_Demo.ino in the Arduino IDE, pick board and port and Verify (Export Compiled Binary gives the HEX).
  • Step 6: In Proteus set the controller's Program File to YFS201_Flow_Demo.hex; on hardware, flash the same file.
  • Step 7: Open YFS201-Flow-ArduinoUnoV4.pdsprj in Proteus and press Play.

Read the detailed guide

This page is for the files. The full tutorial, YF-S201 Water Flow Sensor Library for Proteus V1.0: Flow Meter, explains the circuit and the code step by step and shows the working results and the simulation; read it before you build. Questions about the download or the installation go in the comments below; more Proteus downloads are listed further down this page.

Read YF-S201 Water Flow Sensor Library for Proteus V1.0: Flow Meter

File Structure

yf-s201-tep-v1-0-bf84e79a2aae460495f2b5e139748453.zip10 files · 5 folders · 2.6 MB unpacked
YFS201-TEP-v1.0/10 files · 2.6 MB
Arduino Code/1 file · 5.9 KB
YFS201_Flow_Demo/1 file · 5.9 KB
INO YFS201_Flow_Demo.inoArduino sketch 5.9 KB
Proteus Library Files/2 files · 267.8 KB
LIB ArduinoV4TEP.LIBProteus library 201.9 KB
LIB TEPYFS201.LIBProteus library 65.9 KB
Proteus Model Files/2 files · 1.1 MB
DLL TEPARDUINO.DLLSimulation model 883.5 KB
DLL TEPYFS201.DLLSimulation model 292.5 KB
Proteus Simulation/4 files · 1.2 MB
DLL TEPARDUINO.DLLSimulation model 883.5 KB
DLL TEPYFS201.DLLSimulation model 292.5 KB
DSN YFS201-Flow-ArduinoUnoV4.pdsprjProteus simulation 24 KB
HEX YFS201_Flow_Demo.hexCompiled HEX file 24.2 KB
TXT README.txtText file 22.5 KB

README

README.txt 376 lines
YF-S201 WATER FLOW SENSOR LIBRARY FOR PROTEUS - V1.0 (FLOW, PULSES, VOLUME)
Designed by The Engineering Projects
www.TheEngineeringProjects.com

IMPORTANT LINKS
Article (read it first - pictures, step by step, every feature explained):
  https://www.theengineeringprojects.com/2026/10/yf-s201-water-flow-sensor-library-for-proteus-v1-0.html
Report a bug or suggest a feature (our forum):
  https://www.theengineeringprojects.com/forum/category/yf-s201-water-flow-proteus-library
The demo runs on our Arduino UNO V4.0 (included) - working LEDs, RESET and a
built-in serial monitor, no Virtual Terminal to wire - its own article:
  https://www.theengineeringprojects.com/2026/10/arduino-uno-library-for-proteus-v40.html
The built-in monitor is our TEP Serial Monitor Advance - its own article:
  https://www.theengineeringprojects.com/2026/10/serial-monitor-advance-proteus-library.html
Support us (the libraries are free):
  https://www.theengineeringprojects.com/donate

FILE STRUCTURE
YFS201-TEP-v1.0/
|-- Proteus Library Files/
|   |-- ArduinoV4TEP.LIB                              201.9 KB   TEP Arduino boards V4.0 (UNO), to LIBRARY
|   |-- TEPYFS201.LIB                                  65.9 KB   the YF-S201 water flow sensor, to LIBRARY
|-- Proteus Model Files/
|   |-- TEPARDUINO.DLL                                883.5 KB   the Arduino board model, to MODELS
|   |-- TEPYFS201.DLL                                 292.5 KB   the YF-S201 model, to MODELS
|-- Proteus Simulation/
|   |-- TEPARDUINO.DLL                                883.5 KB   copy of the board model
|   |-- TEPYFS201.DLL                                 292.5 KB   copy of the model
|   |-- YFS201_Flow_Demo.hex                           24.2 KB   both UNOs (demo sketch V1.0)
|   |-- YFS201-Flow-ArduinoUnoV4.pdsprj                24.0 KB   demo: 2 UNOs, 2 sensors on D2 (INT0)
|-- Arduino Code/
|   |-- YFS201_Flow_Demo/YFS201_Flow_Demo.ino           5.9 KB   the demo sketch (source of the .hex)
|-- README.txt                                        ~23.5 KB   this file
Total: 2.63 MB (unzipped). The C++ source code of the model is not included.

WHAT IS IT?
A simulation model of the YF-S201 water flow sensor: the black G1/2" plastic
body with an impeller inside, a magnet on the impeller and a Hall sensor in
the top cap. Water turns the impeller and the yellow wire gives a square
wave: the more water, the faster the pulses. Our own model, written from the
YF-S201 datasheet - not a part that shows a number:
  * F (Hz) = 7.5 x Q (L/min): 7.5 pulses a second for every litre per minute,
    450 pulses per litre (7.5 x 60). The rated range is 1 - 30 L/min (up to
    225 pulses a second); the duty cycle is 50 % (the datasheet: 50 +- 10 %).
  * OUT is LOW while the magnet passes the Hall sensor and HIGH through the
    sensor's pull-up the rest of the time (above 4.7 V at 5 V, below 0.5 V
    LOW). Each pulse is one FALLING edge - count them with attachInterrupt().
  * Every part has its own K: the K property (7.5 = the datasheet's formula;
    real YF-S201 parts differ by up to 10 % - calibrate with a known volume).
  * The impeller has a little inertia (it follows the water with a time
    constant of 0.1 s, so it runs on for a few pulses when the tap closes),
    it does not turn below about 0.5 L/min (a dripping tap gives no pulses)
    and it slips between 0.5 and 1 L/min (fewer pulses than K x Q).
  * At rest OUT stays where the magnet stopped - HIGH or LOW.
  * The water through the sensor (properties FLOW and K); the panel's - / +
    (0.5 L/min a click), six presets of the tap (OFF, DRIP, TAP, SHOWER,
    HOSE, FULL) and four actions: 1 LITRE (exactly 1.000 L, then the tap
    closes - for calibrating), LEAK (a running cistern: 1.5 L/min more, all
    the time), VALVE (a closed valve upstream: no water) and PULSING (a
    diaphragm pump: the flow swings +-40 % 1.3 times a second).
  * OUT is read back: when something holds it LOW while the sensor pulls it
    HIGH (an Arduino pin set as an output LOW, a short), the model warns.
The sensor is drawn at about twice its real size: the threaded G1/2" ends,
the impeller chamber with the flow arrow, the top cap and its cable - red
VCC, black GND, yellow OUT - to a 3-pin plug. TEP additions on the sensor: a
window into the chamber (the water turns blue and the impeller turns while
the water runs), the SIMPLE / ADVANCE badge, the PWR and OUT LEDs and the
panel button on the cap. The window, the LEDs, the badge, the button and the
panels are TEP additions; the real sensor has none of them.

TWO DEVICES IN ONE LIBRARY (search "YF-S201" or "YFS201" in Pick Devices):
  Simple    YFS201TEP        "YF-S201 Water Flow Sensor V1.0 - Simple"
  Advance   YFS201ADVTEP     (the same, "- Advance")
            (pins VCC, GND and OUT on the left; category Sensors > Flow)
  Simple    On-Sheet Panel: the STATUS panel under the sensor - the banner
            (the flow, the pulses and the litres; amber when the rotor
            stands or slips, or when the part's K is not 7.5; blue with no
            water, during 1 LITRE or with PULSING; red with no power or OUT
            held LOW), THE WATER: - / + and a ruler 0 - 30 L/min (red: no
            pulses, amber: the slip, green: the rated range), six presets,
            four actions, ten readouts (STATE, OUT, WATER, FREQUENCY,
            PULSES, LAST SECOND, WATER PASSED, AT 450 / L, K OF THIS PART,
            ROTOR) and the last four events. The red X closes the panel; the
            PANEL button on the sensor's cap opens it again.
  Advance   Pop-Up Panel: only the sensor on the schematic; at Run a TEP
            pop-up window opens - the look of the TEP Serial Monitor. Tabs
            Sensor, Event log and Tests; gear and ? icons for Settings and
            Help; the palette icon switches the theme:
              Sensor     the presets on the toolbar; THE WATER THROUGH THE
                         SENSOR (-5 / -0.5 / +0.5 / +5 L/min, the actions,
                         the ruler); WHAT THE SENSOR GIVES (the banner, the
                         flow a K 7.5 sketch reads, the frequency, period and
                         duty, the pulses, the volume at 450 per litre); OUT
                         as the Arduino's pin sees it (about eight periods);
                         the last 150 s of the water and of the flow from the
                         pulses
              Event log  power, the pulses, the water, notes and warnings
                         (filters, pause, clear)
              Tests      Pulses & timing, Calibration & volume, Wiring &
                         output (THE TEST TOOLS)
              Settings   theme, text size, open at Run, window size
              Help       report a bug, suggest a feature, article, updates,
                         donate, forum; Copy diagnostics for a bug report
            The OPEN PANEL button on the sensor's cap opens the window again.
Both devices use one model, TEPYFS201.DLL.

TEST STATUS
V1.0: verified in Proteus 8.5 on 18 Oct 2026 (the demo project as shipped:
two Arduino UNO V4.0 boards with their built-in monitors; node 1 with the
Simple sensor at a kitchen tap, 6 L/min, K 7.5; node 2 with the Advance
sensor, a part with K 8.1, the tap closed).
What the run showed:
  * ARD1 from the first second: "#1  t=1 s  45 pulses  45.0 Hz  6.00 L/min
    total 0.100 L", then 45 pulses every second and 0.100 L more each time
    (6.000 L at t=60 s).
  * U2 through its pop-up and ARD2's monitor: RESET and 1 LITRE - 48 or 49
    pulses a second, which the sketch with K 7.5 reads as 6.40 / 6.53 L/min,
    and a total of 1.080 L for exactly 1.000 L of water; the rotor ran on
    for 5 pulses after the tap closed; CAL 1 - "K = 8.10 (486 pulses for
    1.000 L)", then HOSE reads 14.81 - 15.06 L/min; the Calibration & volume
    tool - K measured 8.100, the last 1 LITRE 486 pulses in 10.0 s.
  * Pulses & timing on the hose: 121.50 Hz, a period of 8.23 ms, HIGH 4.12 ms
    and LOW 4.12 ms (50 %), the last edges of OUT with their times.
  * WORK 20 and POLL - 22 pulses a second (2.68 L/min) for 15 L/min of
    water; INT with the same 20 ms of work - 122 pulses (15.00 L/min) again.
  * FULL - 243 pulses a second, 30.00 L/min; HOSE and PULSING - 114 to 127
    pulses a second (14.07 - 15.68 L/min) for an average of 15 L/min; the
    sketch's leak watch - "LEAK? the water has run for 30 s without a break";
    DRIP (0.3 L/min) - no pulses at all, the rotor stalled; 0.8 L/min - 5.4
    Hz instead of 6.5 (3 - 6 pulses a second: the slip); the Event log.
  * U1 with the real mouse (3 wheel steps on U1): VALVE - 29 pulses in the
    last second, then 0, "the flow stopped after 75 s"; OFF and LEAK - 11
    or 12 pulses a second (1.47 / 1.60 L/min) and after 30 s "LEAK? the water
    has run for 30 s without a break"; DRIP - no pulses, "the flow stopped
    after 35 s"; TAP; U1's red X and PANEL.
  * 147.1 s of simulation took 261 s - about 0.56 x real time with the
    pop-up and both monitors open.
  Plus automatic checks on a PC, 0 failed: 51 on the model (F = K x Q, 450
  pulses per litre, the duty cycle, every predicted edge exact, the lag and
  the run-on, the start and the slip, 1 LITRE with K 7.5 and 8.1, LEAK,
  VALVE, PULSING, power off, OUT held LOW), 19 on the demo sketch itself
  against the model (the interrupt called on each falling edge, D2 read from
  OUT, the serial output at 9600 baud: the reports, the totals, CAL, POLL /
  INT with WORK 20, the leak watch, every command) and 12 on the pop-up; the
  demo project read back from disk (57 checks: devices, pins, wires, labels;
  no wire through a part, no wire crossing).

INSTALLATION (about 2 minutes)
1. Close Proteus. Extract the WHOLE ZIP to a normal folder (e.g. Desktop).
2. Copy everything in "Proteus Library Files" (TEPYFS201.LIB with the two
   parts, and our Arduino library V4.0, ArduinoV4TEP.LIB, with the ARDUINO
   UNO V4.0 used by the demo) to the LIBRARY folder of Proteus, for example:
     C:\Program Files (x86)\Labcenter Electronics\Proteus 8 Professional\LIBRARY
   (on some PCs: C:\ProgramData\Labcenter Electronics\Proteus 8 Professional\
   LIBRARY - use the folder that already holds Proteus's own .LIB files).
3. Copy TEPYFS201.DLL and TEPARDUINO.DLL from "Proteus Model Files" to the
   MODELS folder (...\Proteus 8 Professional\MODELS).
   ArduinoV4TEP.LIB and TEPARDUINO.DLL are the files of our Arduino Library
   V4.0 - if you have it, they are the same.
4. Delete TEPYFS201.IDX from the LIBRARY folder if it is there (Proteus makes
   a new index).
5. Start Proteus. In Pick Devices (P) search "YFS201".

RUN THE DEMO
"Proteus Simulation\YFS201-Flow-ArduinoUnoV4.pdsprj" - keep the .hex file and
the two DLLs beside the project.
  ARD1: Arduino UNO V4.0 + U1 = a YF-S201 (Simple): a kitchen tap at
        6 L/min, a part with the datasheet's K 7.5.
  ARD2: Arduino UNO V4.0 + U2 = a YF-S201 (Advance): a garden hose with the
        tap closed; this part has K 8.1 (8 % more pulses than the datasheet).
  Both UNOs run YFS201_Flow_Demo.hex and each has its serial monitor built in
  ("TEP Arduino UNO - ARD1" / "- ARD2"). OUT goes to D2 (INT0) on both.
  1. Press Run. Both UNOs' monitor windows open (9600 baud) and so does the
     pop-up of U2 (move it aside - it opens over the schematic).
  2. The sketch counts the falling edges on D2 with an interrupt and reports
     every second: the pulses, the frequency, the flow (Hz / K) and the
     total (pulses / (K x 60)). ARD1 shows 45 pulses = 6.00 L/min.
  3. Calibrate U2: type RESET in ARD2's monitor, click 1 LITRE in U2's
     pop-up, wait until the total stops (1.080 L with K 7.5), type CAL 1 -
     the sketch works out K = 8.10 from its 486 pulses.
  4. Change the water on U1's STATUS panel or in U2's pop-up (- / +, the
     presets, 1 LITRE, LEAK, VALVE, PULSING). DRIP gives no pulses at all.
  5. Type in a monitor: POLL and WORK 20 (polling with 20 ms of other work in
     loop() misses pulses), INT (the interrupt counts them all again),
     LEAK 10, K 7.5.
  6. U1: close its panel with the red X, open it with PANEL on the sensor.
     U2 (Advance): Sensor, Event log, and Tests - Pulses & timing,
     Calibration & volume, Wiring & output.
Closed a monitor window? Click the UNO's USB port.

WIRING
  YF-S201 wire   Arduino UNO
  red   VCC      5V (the sensor takes 5 - 18 V; in Proteus a VCC terminal)
  black GND      GND
  yellow OUT     D2 (INT0) - or D3 (INT1); pinMode(2, INPUT_PULLUP)
The sensor's OUT reaches its UNO through a net label - FLOW_1 (node 1) and
FLOW_2 (node 2): the same name = connected. VCC and GND are Proteus power
terminals. The serial monitor needs no wires: it is built into the Arduino
UNO V4.0.
  attachInterrupt(digitalPinToInterrupt(2), countPulse, FALLING);
  void countPulse() { pulses++; }          // one pulse = 1 / 450 litre (K 7.5)
REAL HARDWARE:
 * The YF-S201 takes 5 - 18 V and about 15 mA at 5 V. Its HIGH is near its
   supply: on a 3.3 V board (ESP32, Pico) use a divider (10k / 20k) or a
   level shifter on the yellow wire, or power it from 3.3 V only if your
   part still switches there.
 * Use an interrupt pin: D2 or D3 on an UNO / Nano; 2, 3, 18, 19, 20, 21 on
   a Mega. Keep the ISR short (count only) and copy the count with the
   interrupts off.
 * Mount it with the arrow in the direction of the flow, the cap on top,
   with a straight pipe before it; air in the pipe and very low flows read
   wrong. Calibrate every sensor with a known volume.
 * Long wires near pumps and motors pick up noise: keep the yellow wire short
   or shielded; 10 nF from OUT to GND helps.

THE TEST TOOLS (Advance, Tests tab) - what they really measure
Every tool reads the model during the running simulation; each shows one
"Good for:" line and, where it judges, a verdict per row (green = fine, amber
= check, red = wrong).
  Pulses & timing
                Good for: no pulses at all, a flow reading that jumps, a
                sketch that misses pulses, choosing how long to count. The
                frequency, the period with the HIGH and LOW times (the duty
                cycle), the pulses of the last second, the count since
                power-on, the rotor, and the last edges of OUT with their
                times.
  Calibration & volume
                Good for: a meter that reads a few percent high or low,
                totals that drift, calibrating with a known volume, slow
                flows. K of this part against the datasheet's 7.5, what a K
                7.5 sketch is off by, the water and the pulses since the
                reference, the K measured, the last 1 LITRE (its pulses and
                time), the slow-flow limits.
  Wiring & output
                Good for: no pulses at all, OUT stuck LOW, which Arduino pin
                to use, a 3.3 V board. The power, how OUT drives the wire
                (LOW strong, HIGH through the pull-up), OUT held LOW by the
                circuit, the interrupt pins, pinMode.

THE DEMO SKETCH ON THE SERIAL MONITOR (YFS201_Flow_Demo V1.0)
  K x               the sensor's factor, e.g. K 7.5 (450 pulses per litre)
  RESET             the total back to 0
  CAL x             x litres ran since RESET: K = the pulses / (60 x x)
  LEAK s            warn after s seconds of flow without a break (0 = off);
                    30 at the start
  POLL              count by reading D2 in loop() instead of the interrupt
  INT               count with the interrupt again (FALLING on INT0)
  WORK ms           other work in loop(): a delay of ms each turn (0 = none)
  HELP              the command list
Commands are not case-sensitive; type them in the UNO's built-in monitor and
press Enter. The report line: "#N  t=.. s  P pulses  F Hz  Q L/min  total V
L" - P the pulses of the last second, F = P / the seconds, Q = F / K, V = all
pulses / (K x 60).

EXPECTED MONITOR OUTPUT (the start)
ARD1 (a kitchen tap at 6 L/min, K 7.5):
  TEP YF-S201 water flow sensor - demo V1.0
  Pulses on D2 (INT0, FALLING); K = 7.5 (450 pulses per litre); a report every second
  Commands: K x, RESET, CAL x (litres since RESET), LEAK s, POLL, INT, WORK ms, HELP
  #1  t=1 s  45 pulses  45.0 Hz  6.00 L/min  total 0.100 L
  #2  t=2 s  45 pulses  45.0 Hz  6.00 L/min  total 0.200 L
  #3  t=3 s  45 pulses  45.0 Hz  6.00 L/min  total 0.300 L
ARD2 prints the same header and "0 pulses  0.0 Hz  0.00 L/min  total 0.000 L"
until water runs through U2.
ARD2 after RESET, 1 LITRE in U2's pop-up and CAL 1:
  #19  t=19 s  19 pulses  19.0 Hz  2.53 L/min  total 1.080 L
  #20  t=20 s  0 pulses  0.0 Hz  0.00 L/min  total 1.080 L
  CAL 1
  K = 8.10 (486 pulses for 1.000 L)

PROPERTIES (double-click the part > Edit Properties)
  FLOW         the water through the sensor at the start in L/min, 0 - 30
               (default 0)
  K            this part's pulses a second per L/min (default 7.5, the
               datasheet; 450 pulses per litre) - real parts differ
  PANEL        Simple only: the STATUS panel at the start, OPEN or CLOSED
Every run starts again from the properties; the magnet's rest position (OUT
HIGH or LOW at the start) differs from part to part.
The demo's UNOs (ARDUINO UNO V4.0): PROGRAM YFS201_Flow_Demo.hex, MONITOR YES
(the built-in monitor), BAUD 9600, AUTOOPEN YES, BOOTLOADER YES.

LINKS.INI (OPTIONAL)
The Help page cards of the Advance device open web pages. To point them
somewhere else without a new DLL, put a text file named links.ini next to
TEPYFS201.DLL with lines KEY=URL, for example:
  ARTICLE=https://www.theengineeringprojects.com/...
Keys: WEBSITE, FORUM, BUG_REPORT, FEATURE_REQUEST, ARTICLE, USER_GUIDE,
UPDATE_CHECK, DONATE. Only http:// and https:// links are used; lines starting
with # are comments.

TROUBLESHOOTING
* No pulses at all: no water (OFF, VALVE closed), a flow below about
  0.5 L/min (DRIP - the rotor stands), no power on VCC / GND, or the sketch
  counts on the wrong pin or interrupt (D2 = INT0).
* The flow reads a few percent high or low: this part's K is not the 7.5 in
  the sketch - calibrate (RESET, 1 LITRE, CAL 1).
* The flow reads far too low at high flows: the sketch polls the pin and
  misses pulses while loop() waits - use attachInterrupt (INT).
* The reading jumps by about 0.13 L/min: one pulse more or less in a one-
  second count; count longer for slow flows. With PULSING the flow itself
  swings - average over a second or more.
* OUT stuck LOW: the pin is set as an OUTPUT LOW, or the yellow wire is
  shorted (the Wiring & output tool shows it). At rest OUT may also simply
  stay LOW where the magnet stopped - count edges, not levels.
* The parts are not simulated: TEPYFS201.DLL is missing from MODELS and from
  the project folder. No UNO / no monitor window: TEPARDUINO.DLL is missing,
  or click the UNO's USB port.
* Advance: the pop-up does not appear - click OPEN PANEL on the sensor, or
  turn "Open the panel at Run" on its Settings page back on.

BUG REPORTS AND FEATURE REQUESTS
Please post them in our forum with a screenshot, the Serial Monitor text, the
simulation log and (Advance) the Copy diagnostics text:
  https://www.theengineeringprojects.com/forum/category/yf-s201-water-flow-proteus-library

SUPPORT US
This library is free. If it saves you time, please support our work:
  https://www.theengineeringprojects.com/donate

WEBSITE
  https://www.theengineeringprojects.com/

LICENCES AND THIRD-PARTY NOTES
* The YF-S201 model (TEPYFS201.DLL), the symbols and artwork and the Arduino
  Library V4.0 (ArduinoV4TEP.LIB / TEPARDUINO.DLL, with its built-in TEP
  Serial Monitor Advance) are made by The Engineering Projects. The model is
  an independent implementation written from the YF-S201 datasheet (the
  pins, the pulse formula, the range, the output levels and duty cycle). The
  model uses only standard Windows libraries; no Visual C++ redistributable
  is needed.
  The C++ source code is not included.
* Arduino UNO V4.0 (ArduinoV4TEP.LIB / TEPARDUINO.DLL, our Arduino Library
  V4.0 - its microcontroller is Proteus's own AVR model): The Engineering
  Projects, https://www.theengineeringprojects.com/2026/10/arduino-uno-library-for-proteus-v40.html
* The demo sketch uses no library - none is needed (attachInterrupt() is part
  of the Arduino core).
* The .hex file is built from the demo sketch and the Arduino AVR core 1.8.6,
  which includes LGPL-licensed code; its source code is available at
  https://github.com/arduino/ArduinoCore-avr/tree/1.8.6
  The demo sketch's source is in "Arduino Code", so the .hex can be rebuilt
  with other versions of the core (REBUILDING THE FIRMWARE).
* YF-S201 is a maker's part name. Proteus is a product of Labcenter
  Electronics and is not included. Arduino is a trademark of Arduino SA. This
  library is not made or endorsed by the sensor's maker or by Labcenter.

REBUILDING THE FIRMWARE (OPTIONAL)
The HEX file is supplied; Arduino IDE is not needed to run the demo. To edit
the sketch, open Arduino Code\YFS201_Flow_Demo\YFS201_Flow_Demo.ino in the
Arduino IDE, select Arduino Uno and use Sketch > Export Compiled Binary.
Replace the simulation's .hex with the exported HEX.
The sketch needs 8,788 bytes of flash and 308 bytes of RAM.

MODEL SCOPE AND LIMITS
Modelled: the pulse output (F = K x Q, K 7.5 by default = 450 pulses per
litre, the 50 % duty cycle), the 1 - 30 L/min range, OUT LOW strong and HIGH
through a pull-up, OUT floating without power, OUT held LOW by the circuit,
the impeller's lag and run-on, no turning below about 0.5 L/min and the slip
up to 1 L/min, the water (the tap, 1 LITRE, LEAK, VALVE, PULSING), power on /
off.
How the part works with the circuit: VCC and GND power the Hall sensor (on or
off); OUT is the model's output (LOW strong, HIGH weak) and is read back.
Not modelled: the water pressure and the pressure loss, the temperature,
air in the pipe, the mounting position, flows above 30 L/min, wear, the
supply voltage (any HIGH on VCC works) and the 5 V level of OUT, the real
spread of K across the range (the model's K is one number per part above
1 L/min). The model's own choices: the default K (the datasheet's formula;
its own table shows about 8 Hz per L/min), the time constant of 0.1 s, the
start at 0.5 L/min and the slip to 1 L/min, the rest position of the magnet,
the actions' numbers (LEAK 1.5 L/min, PULSING +-40 % at 1.3 Hz, 1 LITRE at
6 L/min or the tap's flow).

VERSION
TEP YF-S201 library V1.0 (Oct 2026). Devices YFS201TEP / YFS201ADVTEP
(TEPYFS201.LIB / TEPYFS201.DLL). Demo sketch YFS201_Flow_Demo V1.0 (an
interrupt on D2, no library). Demo board: ARDUINO UNO V4.0 (TEP Arduino
Library V4.0) with its built-in serial monitor.
Advertisement

Development1 release

  1. V1.0YF-S201 Water Flow Sensor Library for Proteus V1.0this page

    V1.0 is the only release in the Download Center so far. When a newer version is published, it appears above with its own download page.

Installation8 steps

From the download to a working project, in order. The steps follow what the package contains.

You will need

  • Proteus Design SuiteProteus 8 or newer (Labcenter), on Windows
  • Arduino IDE1.8 or 2.x, with the board of the tutorial chosen under Tools → Board
  • Any archive toolWindows, macOS and Linux extract ZIP files on their own

Steps

  1. 1

    Extract the archive

    Right-click yf-s201-tep-v1-0-bf84e79a2aae460495f2b5e139748453.zip and choose Extract All (or open it with 7-Zip or WinRAR) into a folder you can find again. Keep its folder structure (YFS201-TEP-v1.0) as it is.

  2. 2

    Copy the library files into Proteus

    Move ArduinoV4TEP.LIB and TEPYFS201.LIB and the files into the LIBRARY folder of your Proteus installation: C:\Program Files (x86)\Labcenter Electronics\Proteus 8 Professional\LIBRARY for Proteus 8, or the matching Proteus 7 folder. Older versions keep it under ProgramData\Labcenter Electronics. If Proteus is open, close it first.

  3. 3

    Add the simulation model

    Copy TEPARDUINO.DLL and TEPYFS201.DLL into the MODELS folder next to LIBRARY, so the component can run, not only be drawn.

  4. 4

    Restart Proteus and place the component

    Start Proteus, open a schematic, press P (Pick Devices) and search for the component by the name used in the tutorial. It appears with its pins ready to wire.

  5. 5

    Open the sketch in the Arduino IDE

    Open YFS201_Flow_Demo.ino, select your board and port under Tools, then Verify. Sketch → Export Compiled Binary writes the HEX file a simulation needs.

  6. 6

    Load the HEX file

    In Proteus double-click the microcontroller, set Program File to YFS201_Flow_Demo.hex and run the simulation. For real hardware, flash the same file with your programmer.

  7. 7

    Open the example simulation

    Open YFS201-Flow-ArduinoUnoV4.pdsprj in Proteus to see the wiring exactly as in the tutorial. Check the controller's Program File path, then press Play.

  8. 8

    Follow the tutorial

    YF-S201 Water Flow Sensor Library for Proteus V1.0: Flow Meter explains every connection and setting in order; keep it open beside the files while you build.

How to add a library in Proteus 8

FAQs9 questionsContact TEP

How do I download YF-S201 Water Flow Sensor Library for Proteus V1.0?

Wait for the 30-second guest countdown on this page, then press the download button; the file comes straight from our storage. Members who are logged in skip the wait. If the browser opens the file instead of saving it, use its Save as option. The download link is made for you when the countdown ends and works for 15 minutes; a saved or shared link stops working, so share this page instead.

What is inside the archive?

YF-S201 Water Flow Sensor Library for Proteus V1.0 comes as a ZIP archive of 10 files (1.2 MB, 2.6 MB unpacked) holding Proteus library files, simulation model DLLs, a Proteus simulation, an Arduino sketch and compiled HEX firmware. Open the File Structure tab for the full list of 10 files.

What should I do if the download does not start?

Check the browser's download list first; an ad blocker or a company firewall can also hold it back, so try another browser or network. If the file arrives incomplete, download it again. For an installation problem, read the Install tab or tell us in the comments with your software version and the exact error message.

Is this file free?

Yes. Every file in the TEP Download Center is free for learning, personal and student projects. If you share it, link back to this page or the tutorial so others find the latest version.

How do I check that the file arrived complete?

Compare its SHA-256 with the one on this page, b88cb33fbfceb36fa685cf0c1fd72017f2b90183de1f6406a6a365bedf55f5c8. In PowerShell run Get-FileHash "yf-s201-tep-v1-0-bf84e79a2aae460495f2b5e139748453.zip"; on macOS or Linux run shasum -a 256 "yf-s201-tep-v1-0-bf84e79a2aae460495f2b5e139748453.zip". The same value means the file is exactly the one in our storage; a different one means the download broke off, so download it again.

Do I need WinRAR to open the ZIP file?

No. Windows, macOS and Linux open ZIP archives on their own (Extract All, or double-click). WinRAR and 7-Zip work too. Extract the whole archive before using the files.

Where do I put the LIB and IDX files?

Both files go into the LIBRARY folder of your Proteus installation (Proteus 8: C:\Program Files (x86)\Labcenter Electronics\Proteus 8 Professional\LIBRARY; Proteus 7 has the same folder under its own name). Restart Proteus afterwards and search for the component with P.

Which Proteus version does the library need?

The tutorial names the Proteus version the library was made and tested with. Most TEP libraries work in Proteus 7 and Proteus 8; if the component does not appear after a restart, check that both the LIB and the IDX file were copied and that Proteus was fully closed while copying.

How do I get the HEX file into the simulation?

Compile the sketch in the Arduino IDE (Sketch → Export Compiled Binary gives you the HEX next to the sketch), then in Proteus double-click the board, set Program File to that HEX and run.

preparing · yf-s201-tep-v1-0-bf84e79a2aae460495f2b5e139748453.zip
Rating
Your download will be ready shortly
Preparing your download…

Members skip the wait. Log in or join TEP.

  • 50Total downloads
  • 4%Popularity
  • ProteusCategory
  • 0Comments
  • ssyedzainnasirUploaded by
  • 17 Oct 2026Uploaded at
Last 14 days37 downloads
SHA-256 b88cb33fbfceb36fa685cf0c1fd72017f2b90183de1f6406a6a365bedf55f5c8
DocumentationYF-S201 Water Flow Sensor Library for Proteus V1.0: Flow Meter
Need help with this file? Bug report Ask a question Download problemsGet updates
Advertisement

Comments

0

Join the conversation

Start the conversationAsk a question or share how you used this download.