Sensors and Actuators cont'd

 Smart Systems and Sensors


Continuing with the previous week's topic of Sensors. We've learned about the PIR sensor using different outputs.

A PIR (Passive Infrared sensor) is an electronic device which measures with infrared light from movements of people, animals or other objects. It is a motion detector to sense things within its line of sight. It is most commonly used in alarms or automatic activated lighting systems.

To set up this device we need the following items to begin:

  • PIR sensor (input)
  • Arduino 
  • USB Cable
  • Yellow LED (short side -ve and long side +ve) (Output)
  • F-M Dupont Wires
Underneath and Underside of the PIR


Side profile of the PIR


All items required to create a motion detector

To set this up I've use the following code to initialise it.



Once the code is uploaded to the Arduino it has to calibrate for 30 seconds. The below video shows that although the code was uploaded correctly there was some issue which happened to be the LED was not lighting up. 



                                    With a quick swap of LED it then performs correctly.






For the second part we will incorporate a buzzer to simulate an alarm that goes off when motion is detected. The code is as follows with the items needed to perform this set up:
  • PIR sensor
  • Arduino 
  • USB Cable
  • Breadboard
  • Active Buzzer
  • Red LED (short side -ve and long side +ve)
  • 220 Resistor
  • F-M Dupont Wires







Uploading the code to the Arduino to start the calibration


The sensor detected motion made a buzz along with the LED lighting up and shown by the print out on the serial monitor.

The serial monitor recorded ever instance of motion


Footnote

Adafruit (2023) PIR Motion Sensor. Available at: https://learn.adafruit.com/pir-passive-infrared-proximity-motion-sensor/overview#main-content-container (Accessed: 1 November 2023).

Circuit Magic (2015) PIR Motion Sensor with Arduino. 5 July. Available at: https://www.youtube.com/watch?v=FxaTDvs34mM (Accessed: 1 November 2023).

Circuit Magic (2015) PIR Motion Sensor with Arduino Available at: https://www.circuitmagic.com/arduino/pir-motion-sensor-with-arduino/ (Accessed: 1 November 2023).

Mrelectrouino (2021) Arduino detect a hand gesture by using PIR sensor (hc-sr501). Available at: https://www.mrelectrouino.com/2021/01/Arduino%20detect%20a%20hand%20gesture%20by%20using%20PIR%20sensor%20hc-sr501.html (Accessed: 1 November 2023).

Mr ProjectsoPedia (2021) Arduino pir sensor led and buzzer code | pir motion sensor projects. 8 January. Available at: https://www.youtube.com/watch?v=odvXvw9lc3o (Accessed: 1 November 2023).






Comments

Popular posts from this blog

Multi-Sensor Health Monitor - Arduino Project

Copywriting using pixels

MIDI Instrument