Project Files of PIR Sensor Library for Proteus V4.0 (HC-SR501 + Arduino)
pir-sensor-tep-v4-0-e45b058f72ee410caf7775fddf419530.zip

PIR Sensor Library for Proteus V4.0
PIR Sensor Library for Proteus V4.0 comes as a ZIP archive of 12 files (1.5 MB, 3.3 MB unpacked) holding Proteus library files, simulation model DLLs, a Proteus simulation, an Arduino sketch and compiled HEX firmware.
- LIBProteus library
- IDXProteus library index
- DLLProteus model
- DSNProteus simulation
- INOArduino sketch
- HEXHEX firmware
Description
Looking for the files of PIR Sensor Library for Proteus V4.0 (HC-SR501 + Arduino)? PIR Sensor Library for Proteus V4.0 is the ZIP package (1.5 MB) you need. It holds the Proteus library files (LIB and IDX), the simulation model (DLL), a ready Proteus simulation, an Arduino sketch and the compiled HEX firmware. Below are the file structure, the README and the installation steps, so you can go from download to a working Proteus simulation in a few minutes.
What this library is
PIR-Sensor-Library-for-Proteus-v4.0.zip with HC-SR501 Simple and Advance (TEPHCSR501.LIB and TEPHCSR501.DLL), the TEP Serial Monitor and Arduino UNO libraries for Proteus, the two-UNO motion demo simulation with its HEX file, the demo sketch (no Arduino library needed) and a README.
This is version 4.0; older or newer releases, when they exist, are listed in the Development tab.
What is inside the ZIP file
- ArduinoV3TEP.LIB – Proteus library, 95.6 KB
- TEPHCSR501.LIB – Proteus library, 391.6 KB
- TEPSERIALMON.LIB – Proteus library, 11.1 KB
- ArduinoV3TEP.IDX – Library index, 830 B
- TEPHCSR501.DLL – Simulation model, 400 KB
- TEPSERIALMON.DLL – Simulation model, 978 KB
- and 6 more, all listed in the File Structure tab
The archive unpacks to 3.3 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 ArduinoV3TEP.LIB, TEPHCSR501.LIB and TEPSERIALMON.LIB and ArduinoV3TEP.IDX into its LIBRARY folder (Proteus 8: C:\Program Files (x86)\Labcenter Electronics\Proteus 8 Professional\LIBRARY).
- Step 3: Copy TEPHCSR501.DLL and TEPSERIALMON.DLL into the MODELS folder next to it, so the part simulates.
- Step 4: Start Proteus, press P and search for "ArduinoV3TEP"; place and wire it as in the tutorial.
- Step 5: Open HCSR501_Motion.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 HCSR501_Motion.hex; on hardware, flash the same file.
- Step 7: Open HCSR501-PIR-ArduinoUnoV3.pdsprj in Proteus and press Play.
Read the detailed guide
This page is for the files. The full tutorial, PIR Sensor Library for Proteus V4.0 (HC-SR501 + Arduino), 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.
File Structure
8.7 KB830 B95.6 KB391.6 KB11.1 KB400 KB978 KB71.5 KB16.8 KB400 KB978 KB29 KBGallery12 images from the tutorialOpen the tutorial
The circuit, the board and the results as they appear in PIR Sensor Library for Proteus V4.0 (HC-SR501 + Arduino). Open an image for its full size.












README
PIR SENSOR (HC-SR501) LIBRARY FOR PROTEUS - V4.0
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/pir-sensor-library-for-proteus-v4-0.html
Report a bug or suggest a feature (our forum):
https://www.theengineeringprojects.com/forum/category/pir-sensor-proteus-library
The demo uses our TEP Serial Monitor Advance (included) instead of Proteus's
Virtual Terminal - 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
HCSR501-TEP-v4.0/
|-- Proteus Library Files/
| |-- ArduinoV3TEP.IDX 0.8 KB its index -> LIBRARY
| |-- ArduinoV3TEP.LIB 95.6 KB TEP Arduino UNO (demo) -> LIBRARY
| |-- TEPHCSR501.LIB 391.6 KB HC-SR501 Simple + Advance (2 devices) -> LIBRARY
| |-- TEPSERIALMON.LIB 11.1 KB TEP Serial Monitor Advance -> LIBRARY
|-- Proteus Model Files/
| |-- TEPHCSR501.DLL 400.0 KB HC-SR501 model -> MODELS
| |-- TEPSERIALMON.DLL 978.0 KB Serial Monitor model -> MODELS
|-- Proteus Simulation/
| |-- HCSR501_Motion.hex 16.8 KB both UNOs (demo sketch V4.0)
| |-- HCSR501-PIR-ArduinoUnoV3.pdsprj 71.5 KB demo: UNO 1 + Simple, UNO 2 + Advance
| |-- TEPHCSR501.DLL 400.0 KB copy of the model (runs as is)
| |-- TEPSERIALMON.DLL 978.0 KB copy of the monitor model
|-- Arduino Code/
| |-- HCSR501_Motion/HCSR501_Motion.ino 8.7 KB the demo sketch (source of the .hex)
|-- README.txt ~30.3 KB this file
Total: 3.30 MB (unzipped). The C++ source code of the model is not included.
WHAT IS IT?
A simulation model of the HC-SR501 PIR motion sensor module for Proteus 8 - the
green board with the white Fresnel dome, the BISS0001 controller, the TIME and
SENS pots and the L / H trigger jumper. Your Arduino reads its OUT pin exactly as
with the real module: HIGH while motion was seen, LOW when the time delay is
over. The model has the BISS0001's behaviour: OUT HIGH on a trigger for the time
delay (the TIME pot, 3 s - 5 min on the real board), jumper H (repeat trigger:
every new motion restarts the delay) or L (single trigger: OUT stays HIGH for the
delay only), the block time after OUT falls (about 2.5 s, triggers ignored), the
warm-up after power-on with its false pulses, and the PIR element: it sees only a
MOVING warm body inside its 110 deg cone and its range (the SENS pot, 3 - 7 m; a
cat at half that range) - a person standing still is invisible.
You move the warm body yourself: a person (or a cat) walks into a room seen from
above, paces, stands still or walks out - or AUTO DEMO does it for you.
While the simulation runs the board is alive: the dome's ring glows (amber while
warming up, orange-red while OUT is HIGH, violet while blocked), the pots turn,
the jumper cap moves, and a "PIR VIEW" screen above the board shows the cone
from above with the zone arcs, the detection range in the state's colour and the
warm body - a halo and heat ripples run to the sensor while the PIR sees it.
TWO DEVICES IN ONE LIBRARY (search "HC-SR501" or "PIR" in Pick Devices):
HC-SR501 Simple device HCSR501TEP "HC-SR501 PIR Motion Sensor - Simple"
On-Sheet Panel: the "PIR ROOM SCENE" next to the board -
the state banner (NO MOTION / MOTION DETECTED - OUT HIGH /
OUT HIGH - TIME DELAY RUNNING / BLOCKED / WARMING UP ...),
the room from above (the view cone, the detection range,
the zone arcs NEAR 1.5 m / MID 3.5 m / FAR 6 m, the person or
cat), OUT / TIME LEFT / BLOCK LEFT / DETECTIONS, the OUT
timeline of the last 30 s and the buttons: WALK IN, STAND
STILL, WALK OUT, AUTO DEMO, PERSON / CAT, the zone, the SENS
and TIME pots (- / +), the jumper (L SINGLE / H REPEAT) and
the warm-up (SKIP / REAL 60 s). The red X in the panel's
header closes it, the PANEL button on the board opens it
again.
HC-SR501 Advance device HCSR501ADVTEP "HC-SR501 PIR Motion Sensor - Advance"
Pop-Up Panel: only the board on the schematic; at Run a TEP
pop-up window opens - the same look as the TEP Serial Monitor
(move it by its header, resize it, minimise it). The tabs
Room and Test sit in the header; the gear and ? icons open
Settings and Help; the palette icon switches the theme:
Room the room from above, THE SENSOR (state, OUT, time
left, block left, detections and PIR pulses, the
measured last HIGH time, the time from the last
pulse to the fall, the last block, the response
time, jumper, range, where the body is), the
scene and module buttons, the OUT timeline of the
last 30 s and the EVENT LOG (every OUT edge with
its measured times, warm-up, false pulses, the
block, power, the body moving / seen)
Test four tools measured on the model (see THE TEST
TOOLS below): OUT check, Retrigger H / L, Warm-up
& block, Range sweep
Settings theme (TEP Dark / Light), text size, open at Run,
window size - remembered for your Windows user
Help Help & Support like the TEP Serial Monitor:
report a bug, suggest a feature, article, guide,
updates, donate, website, forum; Copy diagnostics
(sensor, board, scene, counts, measured values,
events, test results) for a bug report
The OPEN PANEL button on the board opens the window again
after you close it.
Both devices use the same model (TEPHCSR501.DLL) and the same properties (the
Advance device has no PANEL property - its window has "open at Run").
NEW IN V4.0
* Two devices: HC-SR501 Simple (the room scene on the sheet, close / open) and
HC-SR501 Advance (pop-up window with the room, four test tools, settings and
help) - see above.
* Board: the green HC-SR501 drawn clean and bold with a new top strip: three
LEDs - PWR (red, the supply), OUT (green, OUT HIGH) and TRIG (amber, 0.3 s on
every trigger pulse of the BISS0001) - ALL TEP additions: the real HC-SR501
has no LED; the PANEL: SHOWN / CLOSED button (Simple) or OPEN PANEL (Advance)
and a SIMPLE / ADVANCE badge. Above the board the animated PIR VIEW screen.
* Model - an event log: power on / off, warm-up start / end, the false pulses,
OUT rising (with the response time from the first sample that saw the body)
and falling (with the measured HIGH time and the time from the last trigger to
the fall = the time delay), trigger restarts, ignored triggers (and why: jumper
L, blocked, warming up), the end of the block (with the measured block time),
the body starting / stopping, the first sample that sees it.
* Model - measured values on the panels: the last HIGH time, the time after the
last pulse, the last block time, the response time.
* Simulation Log: "OUT LOW - time delay over, blocked for 2.5 s (OUT was HIGH for
7.5 s)" - the measured HIGH time added.
* The demo: ONE project with two UNOs - UNO 1 with HC-SR501 Simple, UNO 2 with
HC-SR501 Advance - each with the TEP Serial Monitor Advance instead of the
Virtual Terminal (U3 = UNO 1, U4 = UNO 2, quick buttons) and a lamp LED on A0.
* The demo sketch keeps every line of the earlier version ("Motion detected!
#1 at 1.2 s", "Motion ended ... (OUT was HIGH for 5.5 s)") and adds: the lamp
on A0 (LAMP s keeps it on after the motion), a warm-up guard (GUARD s) and the
commands HELP, STATUS, RESET, LAMP s, GUARD s. Its times are rounded to 0.1 s
the same way the panels round theirs, so both show the same numbers.
* The LIB text sits where it should in Proteus (written at its centre), the
panel's button rows leave room for their captions, and a button you switch
off keeps no outline of its old colour (every button is drawn unselected
before Run; at Run each box gets a clean card-coloured margin).
* Faster: the panels animate at 10 Hz and only the parts that changed are drawn
again (see TEST STATUS). If a part ever looks stale in your Proteus, add the
property REDRAW=FULL to the sensor (Edit Properties > Other Properties): it
redraws everything on every frame, like the first V4.0 build.
* Version 4.0 everywhere (earlier versions of this library were 1.0 - 3.0); the
C++ source code is not included.
TEST STATUS
V4.0: verified in Proteus 8.5 on 9 Oct 2026 (run 1 + re-check of the fixes),
the demo on two UNOs.
Run 1: start-up lines on U3 / U4, U2's pop-up opens without a caption row;
WALK IN -> "Motion detected! #1 at 19.9 s", the OUT LED, dome and cone glow;
STAND STILL -> "Motion ended #1 at 49.4 s (OUT was HIGH for 29.5 s)";
Help: 8 live cards; the red X closes U1's panel (PANEL: CLOSED), PANEL
reopens it. Three things were fixed after it:
* the panel's group captions were half covered by the buttons under them -
Proteus centres a LIB text on its y and draws the symbol's boxes about 8
thou bigger: the texts are written at their centre, the rows leave a
70-thou caption band, and a check keeps every label clear of the boxes;
* the demo ran at about 0.35 x real time: the panels now animate at 10 Hz
(were 25 Hz) and only the changed parts are redrawn - on the PC the sheet
drawing per simulated second fell from 20,050 to 4,502 shapes and the
pop-up repaints from 19.8 to 9.9;
* a button picked at start-up kept a thin blue outline after another choice:
every button is now drawn unselected in the symbol and each repainted box
(buttons, banner, readouts) gets a card-coloured margin 12 thou wide first.
Re-check of the fixes (same day): about 0.71 x real time (22.0 s simulated in
30.8 s with the pop-up open, U1 animating and two monitors - was 0.35 x);
the captions fully visible, the static texts centred; no outline after WALK
IN / CAT / L SINGLE; the banners "MOTION DETECTED - OUT HIGH", "BLOCKED
(RE-ARMING) - OUT LOW, MOTION IGNORED" (jumper L) and "NO MOTION SEEN - TOO
FAR FOR THE SENSITIVITY" (a cat at 3.5 m); red X / PANEL work; nothing stale
while walking or blocked; U4 prints the "Motion detected!" / "Motion ended
... (OUT was HIGH for ...)" lines. The tools (both runs):
OUT check (40 s, walk in + out): 3 pulses, HIGH 11.0 / 12.5 s (11.8 s on
average), OUT fell 5.0 s after the last pulse, block 2.5 s, response 0.10 s;
Retrigger: L 2 pulses per motion of 5.0 s, 2.5 s apart - H one HIGH of
15.0 s; Warm-up 30 s: 2 false pulses of 1.8 s (at 6.00 / 16.50 s), first
detection 30.20 s, block 2.5 s; Range sweep (person): seen up to 5.0 m, not
from 5.5 m, cone -55 .. +55 deg, the first pulse 0.20 s after the motion.
1435 automatic checks on a PC, 0 failed:
150 on the model alone (the BISS0001 timing for L and H, the block time,
warm-up and false pulses, the PIR sampling rule, range / cone / cat, the
scene, power, every property, the event log, the test motions, and the four
test tools run as the adapter runs them: OUT check, Retrigger (3 bursts per
jumper, readings in every burst), Warm-up & block, Range sweep for a person
at 5 m, a cat and 3 m);
428 on the complete Proteus model (properties, OUT edges at the exact times,
one callback, every panel button and the board's jumper and pots, drawn
frames without stale pixels, the panel close / open, both devices, the pop-up
and all 8 Help links, the LEDs, the PIR VIEW, ASCII-only sheet text in every
state, the event log, the tools through the pop-up checked on the OUT pin,
the labels clear of the drawn boxes and their margins, no blue left in the
12 thou around any button after a new choice in every row, and the partial
redraws: every frame of 70 s of a walking person / cat, painted pixel by
pixel, equals a full redraw - with and without the 8 thou bigger boxes);
29 with the real demo sketch on TWO UNOs against the complete model (every
line, the printed times = the model's events, the commands, the lamp, the
warm-up false pulses with and without GUARD, the Retrigger tool as the sketch
sees it, nothing printed while nothing happens, every line shorter than 80
characters - the longest has 71);
828 on the rendered pop-up and boards (every page fits in TEP Dark and Light,
at Large text and 150 % DPI; no cut text; no empty band on the test pages;
every tool's hint lines fit; every header state fits; before a tool has run
its four result tiles show "-", not zeros).
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" (TEPHCSR501.LIB with both devices,
TEPSERIALMON.LIB and the TEP Arduino UNO V3 library ArduinoV3TEP.LIB / .IDX
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 TEPHCSR501.DLL and TEPSERIALMON.DLL from "Proteus Model Files" to the
MODELS folder (...\Proteus 8 Professional\MODELS).
4. If an earlier version is installed: replace its LIB / DLL and delete
TEPHCSR501.IDX if there is one in the LIBRARY folder.
5. Start Proteus. In Pick Devices (P) search "HC-SR501": you get the Simple and
the Advance device (category Sensors > Motion).
RUN THE DEMO
"Proteus Simulation\HCSR501-PIR-ArduinoUnoV3.pdsprj" - keep the .hex file and the
two DLLs beside the project.
UNO 1 (ARD1): HC-SR501 Simple (U1), Serial Monitor U3.
UNO 2 (ARD2): HC-SR501 Advance (U2), Serial Monitor U4.
Both run HCSR501_Motion.hex. OUT -> D2; an LED (D1 / D2) with 220 ohm on A0 of
each UNO: the lamp.
1. Press Run. Both monitor windows open (9600 baud) and so does U2's pop-up.
U3 and U4 show the three start lines (below). The PWR LEDs are lit.
2. U1: click WALK IN on the panel. The person walks and paces at MID 3.5 m;
0.2 s later OUT goes HIGH: the OUT and TRIG LEDs light, the dome ring turns
orange-red, the detection area turns orange, U3 prints "Motion detected!
#1 at ...". Click STAND STILL: OUT stays HIGH for the time delay (5 s) after
the last trigger, then "Motion ended #1 at ... (OUT was HIGH for ...)", the
area turns violet (blocked 2.5 s), then green again. A person standing still
is not detected. Try CAT, FAR 6 m (too far for SENS 5 m - press SENS +
twice), jumper L SINGLE (OUT drops after 5 s while the person walks), AUTO
DEMO, and WARM-UP REAL 60 s (two false pulses that the sketch counts as
motions!). Close the panel with its red X and open it with PANEL on the
board.
3. U3 / U4 quick buttons: U3 STATUS, LAMP 10 (the lamp stays on 10 s after the
motion), RESET, HELP; U4 STATUS, GUARD 30 (ignore OUT for 30 s - sit out the
warm-up), LAMP 0, HELP.
4. U2 (Advance): Room page - the same scene buttons; watch THE SENSOR card, the
OUT timeline and the EVENT LOG. Test page: the four tools below.
5. Close U2's window and open it again with OPEN PANEL on the board.
Closed a monitor window? Click OPEN MONITOR on the monitor part.
WIRING (as in the earlier versions)
HC-SR501 VCC -> +5 V, GND -> GND, OUT -> D2. In the sketch: pinMode(2, INPUT);
digitalRead(2) - HIGH = motion. No library is needed.
The lamp LED + 220 ohm from A0 to GND on both UNOs.
Serial Monitor RXD <- Arduino D1 (TX), Serial Monitor TXD -> Arduino D0 (RX),
Serial Monitor GND -> ground. RXD2 is not needed: OUT is one logic line and the
sketch prints what it sees.
Pin order in Proteus: VCC OUT GND (left to right, as on the real module with the
dome up and the header at the bottom - some clones swap them: check the
silkscreen under the dome).
REAL HARDWARE:
* Supply 4.5 - 20 V (5 V from the UNO is fine); OUT is 3.3 V when HIGH - an UNO
reads that as HIGH.
* TIME pot: about 3 s .. 5 min (clockwise = longer). SENS pot: about 3 .. 7 m.
* Jumper H (repeat) or L (single) - the factory position varies; most projects
use H.
* After power-on the module needs 30 - 60 s to settle and gives false pulses
meanwhile: wait (or GUARD 60 in the demo) before trusting OUT.
* After OUT falls the module ignores motion for about 2.5 s (the block time) -
not adjustable on the board.
* It sees CHANGES of heat: a body moving ACROSS its zones is seen best; a body
walking straight at it is seen later (not simulated); glass blocks it.
THE SCENE
The room is 9.1 x 8.2 m seen from above, the sensor in the middle of the bottom
wall looking into the room, the door in the right wall at 7 m.
WALK IN from the door to the zone, then pacing across the cone
STAND STILL stops where it is (from outside: walks in and stops)
WALK OUT back to the door and out
AUTO DEMO outside 4 s, in and pacing 6 s, still 12 s, out - again
PERSON / CAT a cat is seen only up to half of the SENS range
NEAR / MID / FAR the pacing zone 1.5 / 3.5 / 6 m
The PIR looks every 100 ms while the body moves; it is SEEN when it moves inside
the 110 deg cone and the range. The 2nd seen sample triggers (0.1 s after the
first), then every 0.5 s while it stays seen.
While a test tool runs it owns the scene (the scene buttons, the board's jumper
and pots wait - the Simulation Log says so once).
THE TEST TOOLS (HC-SR501 Advance, Test tab) - what they really measure
Every tool runs on the live model. A tool only moves the warm body, sets the
jumper or restarts the warm-up, and reads the model's event log - so every time
it shows is what OUT really did, measured with the simulation clock. Each tool
shows one "Good for:" line and one line on how it measures. Every tool puts the
scene, the jumper and the warm-up setting back when it ends.
OUT check Good for: checking that OUT stays HIGH for the TIME pot after
the last motion - what your sketch reads on D2. Records 20,
40 or 60 s ("As set", "Walk in + out" = in, pace 4 s, out,
3 s outside, again, or AUTO DEMO): every pulse with its rise,
fall, HIGH time, the time from its last trigger to the fall,
the restarts and the response time; the block after each
fall; a chart of the body, the PIR pulses and OUT. On a PC
(walk in + out, 40 s): 3 pulses (HIGH 11.0 and 12.5 s, the
third still HIGH at the end), each OUT fell 5.0 s after its
last trigger, block 2.5 s, response 0.10 s.
Retrigger H / L Good for: seeing why OUT drops while you keep moving (jumper
L) or stays HIGH all along (jumper H). The SAME motion (TIME
+ block + 3 s of moving in place at 60 % of the range) with
jumper L, then with jumper H, 1 or 3 bursts each, every
burst after a flat lead-in (READY and OUT LOW for 1 s). On a
PC (TIME 5 s, block 2.5 s: 10.5 s of motion), every burst:
L - 2 pulses of exactly 5.0 s, 2.5 s apart (the block), OUT
fell 2.2 s after the motion; H - one pulse of 15.0 s, OUT
fell 4.7 s after the motion (5.0 s after the last trigger).
Needs TIME 30 s or less.
Warm-up & block Good for: knowing how long to wait after power-on, and how
long the sensor is blind after OUT falls. Restarts the
warm-up (10, 30 or 60 s) like a fresh power-on with the
person moving all along: the false pulses, the ignored
triggers, the first detection; then the person stands still
until OUT falls and moves again at once: the block time and
how long OUT stays LOW. On a PC (30 s): the warm-up 30.0 s,
2 false pulses of 1.8 s (at 6.0 and 16.5 s), 60 triggers
ignored, the first detection at 30.20 s, block 2.5 s, OUT
LOW for 2.7 s between the two detections.
Needs TIME 30 s or less.
Range sweep Good for: finding where the sensor sees a moving body - the
SENS range straight ahead and the 110 deg cone. The body
stands 0.3 s, then moves in place 0.8 s at each point:
straight ahead 0.5 - 8 m (moving along the arc, so the
distance stays) and / or across the cone -70 .. +70 deg at
60 % of the range (moving along the line of sight, so the
angle stays); a point counts when the PIR gives a trigger
pulse. On a PC (person, SENS 5 m): seen up to 5.0 m ahead,
not from 5.5 m; the cone -55 .. +55 deg; the first pulse
0.20 s after the motion started. A cat: seen up to 2.5 m.
The tools refuse to start, with the reason, when the sensor has no power, is
warming up, another test runs or (Retrigger, Warm-up) TIME is above 30 s.
THE DEMO SKETCH ON THE SERIAL MONITOR (HCSR501_Motion)
HELP the command list
STATUS OUT now, the motions counted, the last / shortest / longest HIGH
time, the lamp and guard settings (two lines)
RESET the motion counter back to 0
LAMP s the lamp on A0 stays on s seconds after OUT goes LOW (0 - 600;
0 = it follows OUT)
GUARD s ignore OUT for s seconds (0 - 300) - sit out the warm-up
Monitor quick buttons in the demo: U3 STATUS, LAMP 10, RESET, HELP; U4 STATUS,
GUARD 30, LAMP 0, HELP.
The sketch reads OUT every 10 ms and prints a line only when something happens;
every line is shorter than 80 characters (the TEP Serial Monitor's Simple
interface shows about 80).
EXPECTED MONITOR OUTPUT (U3 and U4)
HC-SR501 PIR Motion Sensor demo - The Engineering Projects
Move in front of the sensor (Proteus: WALK IN on the panel)...
PIR Sensor Library for Proteus V4.0 - type HELP for the commands.
Then WALK IN on U1, wait 3 s, STAND STILL - e.g.:
Motion detected! #1 at 6.4 s
Motion ended #1 at 13.9 s (OUT was HIGH for 7.5 s)
(the times depend on when you click; HIGH = the walk + the 5 s time delay after
the last trigger). STATUS:
Status: OUT LOW, 1 motion, last ended 4.2 s ago
HIGH: last 7.5 s, shortest 7.5 s, longest 7.5 s; lamp 0 s; guard off
LAMP 10, then a motion: "Lamp: A0 stays on 10 s after the motion." ... "Lamp OFF
after 10 s without motion."; GUARD 30: "Guard: OUT ignored for the next 30 s
(warm-up)." ... "Guard over - watching OUT (4 changes ignored)."; an unknown
command: "Unknown command: FOO - type HELP".
PROPERTIES (double-click the sensor > Edit Properties)
TRIGGER Trigger jumper: H (repeat, default) or L (single)
TIMEDELAY Time delay in s (the TIME pot: 3 - 300 on the real board; 1 - 600
accepted), default 5 (fast for the demo)
SENSITIVITY Sensitivity range in m (the SENS pot), 3 - 7, default 5
BLOCKTIME Block time after OUT falls in s, 0 - 10, default 2.5
WARMUP SKIP (default), REAL (60 s) or seconds 0 - 300
BODY PERSON (default) or CAT
ZONE NEAR, MID (default) or FAR
START STILL (default), WALKING, OUTSID
…Development1 release
-
V4.0PIR Sensor Library for Proteus V4.0this page
V4.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
Extract the archive
Right-click pir-sensor-tep-v4-0-e45b058f72ee410caf7775fddf419530.zip and choose Extract All (or open it with 7-Zip or WinRAR) into a folder you can find again. Keep its folder structure (HCSR501-TEP-v4.0) as it is.
- 2
Copy the library files into Proteus
Move ArduinoV3TEP.LIB, TEPHCSR501.LIB and TEPSERIALMON.LIB and ArduinoV3TEP.IDX 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
Add the simulation model
Copy TEPHCSR501.DLL and TEPSERIALMON.DLL into the MODELS folder next to LIBRARY, so the component can run, not only be drawn.
- 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
Open the sketch in the Arduino IDE
Open HCSR501_Motion.ino, select your board and port under Tools, then Verify. Sketch → Export Compiled Binary writes the HEX file a simulation needs.
- 6
Load the HEX file
In Proteus double-click the microcontroller, set Program File to HCSR501_Motion.hex and run the simulation. For real hardware, flash the same file with your programmer.
- 7
Open the example simulation
Open HCSR501-PIR-ArduinoUnoV3.pdsprj in Proteus to see the wiring exactly as in the tutorial. Check the controller's Program File path, then press Play.
- 8
Follow the tutorial
PIR Sensor Library for Proteus V4.0 (HC-SR501 + Arduino) explains every connection and setting in order; keep it open beside the files while you build.
FAQs9 questionsContact TEP
How do I download PIR Sensor Library for Proteus V4.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?
PIR Sensor Library for Proteus V4.0 comes as a ZIP archive of 12 files (1.5 MB, 3.3 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 12 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, 6945e70d607759fd49c82d6b1ff8cd96533baaf03f5befbc98ae0e52e3dd5318. In PowerShell run Get-FileHash "pir-sensor-tep-v4-0-e45b058f72ee410caf7775fddf419530.zip"; on macOS or Linux run shasum -a 256 "pir-sensor-tep-v4-0-e45b058f72ee410caf7775fddf419530.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.
Members skip the wait. Log in or join TEP.
- 80Total downloads
- 4%Popularity
- ProteusCategory
- 0Comments
- ssyedzainnasirUploaded by
- 8 Oct 2026Uploaded at
6945e70d607759fd49c82d6b1ff8cd96533baaf03f5befbc98ae0e52e3dd5318



















Comments
0