How to Make an Arduino Motion Sensor Alarm on the Cheap

Making an Arduino based motion sensor alarm is an easy and inexpensive way to add security to your home or office. With just a few common components, you can build your own DIY security system to detect intruders and sound an alarm.

What You Will Need

Here is a list of components you will need to make your own Arduino motion sensor alarm:

How a PIR Motion Sensor Works

A PIR (passive infrared) motion sensor detects movement by sensing changes in infrared radiation levels. When a warm body like a human or animal passes in front of the sensor, the infrared radiation levels change rapidly, triggering the sensor.

PIR sensors are inexpensive, easy to use, low power, and do not emit any radiation themselves, making them ideal for DIY motion sensing projects. They have a range of up to 20 feet, adjustable sensitivity, and a wide field of view.

Connecting the Motion Sensor to the Arduino

Follow these steps to connect your PIR motion sensor to the Arduino board:

  1. Plug the Arduino into your computer using a USB cable. This provides power to the Arduino.

  2. Place the PIR sensor on a breadboard.

  3. Connect the GND pin on the PIR sensor to a GND pin on the Arduino using a jumper wire.

  4. Connect the VCC pin on the PIR sensor to the 5V pin on the Arduino. This provides power to the sensor.

  5. Connect the OUT pin on the PIR to any digital I/O pin on the Arduino. This sends motion detection signals to the Arduino. I used pin 7.

  6. Upload the motion detection sketch (code) to your Arduino board. More on this in the next step.

How to Make an Arduino Motion Sensor Alarm on the Cheap

Uploading the Arduino Sketch

The Arduino sketch is the program code that tells the Arduino what to do. For this motion alarm project, the sketch needs to detect signals from the PIR sensor and trigger the buzzer alarm when motion is detected.

Here are the key elements of the motion detection sketch:

There are many sample sketches available online for Arduino motion alarms you can start with. Upload the sketch and open the serial monitor to see it in action.

Adding a Buzzer Alarm

An audible buzzer alarm makes your motion detection system much more effective as an alert and deterrent.

To add a buzzer alarm:

Now your Arduino alarm will make a loud sound when the PIR sensor detects movement!

Powering the Motion Sensor Alarm

Once your motion detection circuit is complete on the breadboard, you need a portable power source. The easiest option is to power the Arduino alarm with a 9V battery.

To hook up a 9V battery:

Using a battery lets you install your DIY security system anywhere without being tethered to a power outlet.

Installing and Testing the Sensor

When you are ready to deploy your Arduino motion alarm:

Try walking in front of the sensor at various distances and angles to ensure it works as expected. Adjustments can be made to the sensor positioning, sensitivity and sketch as needed.

Some additional calibration may be required if you have any false alarms. But after that it will serve as a sensitive tripwire for motion!

Conclusion

Building your own Arduino motion detector alarm is an inexpensive DIY security project using common components. The key elements are an Arduino board, PIR motion sensor, buzzer, battery, and sensor sketch. With some basic wiring and coding, you can set up an effective tripwire alarm system to detect intruders. This is a great beginner-friendly project to learn Arduino and useful for real world security applications.