i would like to know how many sensors can be connected to raspberry pi at a time (i would like to connect sensors like temperature sensor,humidity sensor,pir motion sensor and 3 to 4 leds)

  • 2
    Hello and welcome to RPi.SE Without further information and specific details about that sensors and how they are going to be connected it is however nearly impossible to answer that question.
    – Ghanima
    Oct 21, 2014 at 19:16
  • i'm doing pi-planter (raspberrypi.org/tag/piplanter) i would like to add sensors like soil ph meter,PIR motion sensor,,soil moisture sensor,temperature sensors and a motor switch. Is this possible in RPi B+ model? Oct 25, 2014 at 14:41
  • You can build ever-more elaborate multiplexing structures to connect as many sensors as you want but ulitimately you reach a point where you just can't get the data out at the rate you require. When you will reach this point is massively situation specific. So there is no straight answer to this question. Oct 15, 2015 at 4:51

1 Answer 1


This depends on many factors. Main limitation is the number of programmabble GPIO ping you have. In model A and B, there are 17 programmable pins (rest are +5v, 3V3 or GND). On model B+ you have 26 programmable pins (rest are +5V etc.). If you ever run out of pins, you can make a multiplexer which will be able to handle higher amount of devices on the same amount of pins.

TIP: For analog sensors i used MCP3002 Analog-Digital converter. The full wiring takes 5 GPIO pins, 2 power pins and GND.


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