0

I'm having trouble connecting 4 PIR sensors to a Raspberry Pi B+. I have managed to connect 2 PIR sensors to the Raspberry Pi but can't figure out how to connect 4 of them because there isn't enough 5v ports. Each PIR sensor needs to be connected to a GND, 5v port and a GPIO. If I were to use a breadboard, how do I physically connect to it the breadboard?

enter image description here

enter image description here

7
  • @SteveRobillard Do I need resistors?
    – peter pan
    Apr 23, 2016 at 3:23
  • If you don't need them to connect the sensor directly to the pi why would using a breadboard require them? Apr 23, 2016 at 3:36
  • @SteveRobillard sorry , someone told me to use resistors then and this caused the confusion . thank you so much
    – peter pan
    Apr 23, 2016 at 3:38
  • This tutorial may help learn.adafruit.com/… Apr 23, 2016 at 3:41
  • @SteveRobillard postimg.org/image/z0cpv2493 steve this is what you mean. I drew the layout of how I would connect it based on your description
    – peter pan
    Apr 23, 2016 at 3:52

1 Answer 1

1

You could use a terminal block and connect one side (each pair of screws - 1-6 in the image below - ae joined together) to the 5 Volt pin on the Pi and the sensors VCC pin to the other side (you can attach more than one wire to each screw).

terminal block

or a breadboard.

breadboard

Most breadboards have a pair of red and blue lines on the long sides. These are called the power rails and all of the pins in the red row are connected, likewise for the blue. Connect the 5 Volt pin from the Pi to one of the holes in the red row, and connect the Pi ground pin to the blue row. Then you can connect the sensors power and ground to the red and blue row of pins respectively. You may want to read this tutorial from sparkfun on how to use a breadboard.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.