Connect the PIR Sensor to a Raspberry Pi

Use jumper wires to connect the Raspberry Pi to the PIR sensor.

Step 1

Make sure your Raspberry Pi is switched off.

Make sure you have the PIR sensor and three female-to-female jumper cables.

Carry out these steps slowly and carefully. It can be easy to put the wrong cable on the wrong pin – this might damage the Raspberry Pi.

Step 2

Look at the PIR – there are three pins on it.

Step 3

Make sure your Raspberry Pi is sitting the right way up.

Use this diagram to help you. Click on the picture to make it bigger.

Step 4

Connect the top pin on the PIR sensor to the '5V' pin on the Raspberry Pi. This provides power to the PIR sensor.

Step 5

Connect the bottom pin to the 'GND' pin on the Raspberry Pi. This completes the circuit.

Step 6

Connect the middle pin to 'GP4'. When motion is detected, this pin will send a signal down the wire, which can be received by the Raspberry Pi.