Sunday, February 13, 2022

How to Add and Simulate PIR Motion Sensor in Proteus 8 | Passive Infrared | Arduino

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:

  1. PIR motion sensor
  2. LED
  3. Resistor
  4. Virtual terminal
  5. Logic state

Steps (Add Library)
  1. Download the PIR motion sensor library file at TheEngineeringProjects.com or click the link HERE. The download link will appear after 20 seconds.

  2. You will find three files on the downloaded zip file, named as:
    -PIRSensorTEP.LIB
    -PIRSensorTEP.IDX
    -PIRSensorTEP.HEX


  3. Extract these three files to the Proteus libraries folder (C:\Program Files (x86)\Labcenter Electronics\Proteus 8 Professional\DATA\LIBRARY).

Steps (PIR Motion Sensor):
  1. Open your Proteus software and add PIR SENSOR, ARDUINO UNO R3, LED-RED, RESISTOR, VIRTUAL TERMINAL, and LOGICSTATE components to the workspace.


  2. 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.


  3. Click HERE to download the Arduino project code. Extract the project code and verify. 


  4. Copy the Hex file, then paste it into the Proteus Arduino board.


  5. 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.


  6. 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".


  7. 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".


  8. If no movement detects < 5 seconds, the LED light will turn OFF.


  9. 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