Today, I will share how to add and simulate a PIR motion sensor with Arduino in Proteus 8 software. A passive infrared (PIR) motion sensor can detect any movement that radiates infrared light. It is ideal for detecting human movement or occupancy in security systems.
References:
Components:
- PIR motion sensor
- LED
- Resistor
- Virtual terminal
- Logic state
Steps (Add Library)
- Download the PIR motion sensor library file at TheEngineeringProjects.com or click the link HERE. The download link will appear after 20 seconds.
- You will find three files on the downloaded zip file, named as:
-PIRSensorTEP.LIB
-PIRSensorTEP.IDX
-PIRSensorTEP.HEX - Extract these three files to the Proteus libraries folder (C:\Program Files (x86)\Labcenter Electronics\Proteus 8 Professional\DATA\LIBRARY).
Steps (PIR Motion Sensor):
- Open your Proteus software and add PIR SENSOR, ARDUINO UNO R3, LED-RED, RESISTOR, VIRTUAL TERMINAL, and LOGICSTATE components to the workspace.
- Wiring components:-Connect VCC, OUT, GND, and Test Pin of sensor pins to the POWER, digital pin 3 (Arduino), GROUND, and LOGICSTATE.-Connect RXD and TXD (VIRTUAL TERMINAL) to the TXD and RXD (Arduino).
-Connect LED from pin 13 Arduino to GROUND through 220 Ω resistor. - Click HERE to download the Arduino project code. Extract the project code and verify.
- Copy the Hex file, then paste it into the Proteus Arduino board.
- Double click the PIR SENSOR and click the folder icon at the Program File box. Go to Local Disk (C:) > Program Files (x86) > Labcenter Electronics > Proteus 8 Professional > DATA > LIBRARY > PIRSensorTEP.HEX > Open > OK.
- Start the simulation. In the beginning, 10 seconds delay is added to calibrate the sensor, and the serial will print out "Calibrating sensor ..........". After 10 seconds, the serial will print out "done" and "SENSOR ACTIVE".
- Toggle the LOGICSTATE to imitate the motion. (LOGICSTATE = 1 motion detected, LOGICSTATE = 0 motion not detected). If the sensor detects movement, the LED light will turn ON, and the serial will print out "motion detected at xxx sec".
- If no movement detects < 5 seconds, the LED light will turn OFF.
- If no movement detects > 5 seconds, the serial will print out "motion ended at xxx sec".
Video:
If you have any suggestions, please write in the comment section. Thank you for your time 👷.
No comments:
Post a Comment