EEE PROJECT logo

Motion Detector – How to make a motion detector using Arduino

Motion detector

Making a Motion detector using Arduino and PIR Sensor

The PIR Sensor also is known as the passive infrared sensor is used for a motion detector. It uses the simple concept of thermal imaging which means that whether there’s day or night it can detect motion. The motion detector sensor is the minimized form of a motion detector circuit.

Motion detector

Part list

  • Arduino UNO
  • Breadboard
  • Passive Infrared Sensor or PIR Sensor
  • LED’s
  • Connecting wires

If you open the Cap/Dome you’ll see the black film inside which is the PIR Radiation detector. And the IC is used to control the PIR Motion Sensor.

You’ll see the two potentiometers which are used to control the sensitivity and time delay. The PIR Sensor has the three pins to connect externally which are Vcc, Ground, and Output.

Arduino Uno

The connection is begun with connecting the PIR Ground to the Arduino ground and connecting the PIR output pin to the Arduino pin number 5 and PIR Vcc to Arduino 5v. Now we can connect the LED with the common ground and we connect Arduino ground to the LED ground directly.

The LED positive is connected to pin number 13. You can find the code and schematic on the indestructible page of KJ electronics. Now the after finishing the connections Arduino board should be connected with the Computer and so the program is uploaded.

In the program at the beginning, the port for the PIR is declared and the LED pin is pin number 13 and additionally, the buzzer pin is declared at pin number 12.

In Void Setup {} we had declared the pin number 5 for PIR as input whereas the Pin number 12 and 13 as an output pin. To initiate the communication between the Arduino and the system the command serial.9600 is included.

In Void Loop {} we had initiated and if condition which checks whether the pin number 5 is higher or equal to the threshold value. In this case, the pin number 13 and 12 are kept high which means that the body is detected. Else if the above condition does not arise then the output pins 12 and 13 kept low.

After finishing the program is uploaded to the Arduino Uno. And our setup will be capable to detect the heat radiated by the body and will indicate it with a glow the LED doesn’t matter whether there’s day or night.

3 thoughts on “Motion Detector – How to make a motion detector using Arduino”

Leave a Comment