Components of the Circuit
The components of the circuit are:
- any Arduino microcontroller board
- jumper wires
- a PIR sensor
- an LED
- a current-limiting resistor, about 220Ω
You will notice that the PIR sensor has 3 pins on the underside. They are meant to
be connected to
+5V power, and a digital I/O pin. The following picture
identifies each pin:
The complete circuit is shown below.
|Controlling an LED with a PIR Sensor|
Tuning the sensor
The underside of the PIR sensor has 2 pots, both yellow:
the pot on the left (like the
+5Vpin) adjusts the delay time of the sensor. Adjusting this
pot changes the amount of time that the PIR stays “ON” after motion is detected. It can be
adjusted from about 2 seconds up to a couple of minutes!
the pot on the right (like the
GNDpin) adjusts the sensitivity of the sensor. If it is
set low, then the sensor is most useful for nearby objects (up to about 10 ft =3 m). If it is
turned all the way to its highest setting, it can detect objects up to 20 ft (=6m).
Is the Arduino necessary?
Notice that you could have built a circuit with a battery, an LED and the PIR sensor,
without involving the Arduino at all. This approach makes sense if you want to look at
your circuit to determine whether the PIR sensor has detected a warm object moving. But if
you wanted your circuit to respond by, say, taking a picture (which requires an add-on
camera) or recording the time (which requires an add-on RTC module) or turning on a motor,
then you’ll need the Arduino to convey the signal from the PIR to the output device of