Protecting your home and family is a top priority for most homeowners. Investing in an alarm system can provide peace of mind, but professional installation can be expensive. With a few inexpensive components, you can build your own reliable motion sensor alarm that will alert you when someone enters your home. This simple DIY alarm system for under $20 is easy to construct with basic skills and tools.

What You'll Need

Constructing a DIY motion sensor alarm requires just a few affordable components. Here's what I'll need to build mine:

Arduino Uno

The Arduino Uno is a microcontroller board that serves as the brains of the alarm system. It processes input from the motion sensor and triggers the alarm. The Uno costs around $10.

PIR Motion Sensor

A PIR (passive infrared) motion sensor detects movement in a space. When it senses motion, it outputs a high signal that triggers the Arduino. I can get one for about $3.


A buzzer provides the audible alarm sound when motion is detected. A small active buzzer is just a couple dollars.

Jumper wires

Jumper wires connect the components on a breadboard. A pack of various lengths costs around $7.

9V Battery and clip

A 9V battery powers the Arduino and other components. The clip connects the battery to the breadboard. About $5 total.

With these 5 basic parts, I can build a DIY motion sensor alarm for around $20!

Constructing the Motion Sensor Alarm

Building the alarm is straightforward with my selected components. Here are the step-by-step instructions to construct the motion sensor alarm:

Step 1: Set up the Arduino

First, I'll place the Arduino Uno board on my breadboard. I'll insert the 9V battery into the Arduino power jack to power it up.

Step 2: Connect the motion sensor

Using jumper wires, I'll connect the PIR motion sensor pins to the Arduino's digital I/O pins D8 through D12. This allows the Uno to receive the sensor's output signal.

Step 3: Connect the buzzer

Next, I'll use a jumper wire to connect one buzzer pin to Arduino pin D13. The other buzzer pin will connect to the positive rail on the breadboard.

Step 4: Upload the code

With the Arduino IDE, I'll upload a simple program to detect a HIGH signal from the sensor and activate the buzzer. This code controls the alarm logic.

Step 5: Position the sensor

Finally, I can position my motion sensor facing the entry point I want to monitor and test the alarm!

Customizing and Improving the Alarm

While functional already, I can expand and customize my DIY motion sensor alarm to tailor it for my needs:

With inexpensive parts, a little coding, and DIY ingenuity, I now have a custom motion sensor alarm protecting my home! While basic, this simple alarm provides me with affordable security.