Here’s how to make a simple Arduino Mega PIR alarm.

Project Steps

Connect PIR sensor

GND to ground, V+ to pin 53, OUT to pin 51.

Connect speaker

Connect speaker to pin 41 and ground.