What are the things to be considered when connecting 3-4 different modules to raspberry pi3?

Ex: i am using 4 modules namely RFID reader, hall effect sensor, gps and some push buttons. Need to connect all at once. But some of the gpio pins are same for different modules(if i am using pin number 24 for rfid, the same 24th is required by hall effect sensor). So i searched in google and found gpio expander.

  1. If i use gpio expander can i be able to use a pin multiple times? RFID need 3.3v, hall effect sensor and gps need 5v.

  2. Can i connect it to respective voltages ? Does raspberry pi supplies the need of all modules at a time?

    Since i am developing a portable project i have to use a battery as power supply instead of usb adapter for raspberry pi.

    1. Which battery is suitable? 5v or 9v?

    2. Are any other solutions there instead of battery and usb?

This is all the doubts i had and couldn't find answers anywhere. These questions might look silly 😬. Thank you for your time.

1 Answer 1


I'm only interested in the first of your 5 questions. Probably all 5 have been answered multiple times.

You need to identify the GPIO requirements for each sensor and attempt to resolve each clash.

For example, you mention RFID reader, Hall effect sensor, GPS, and some push buttons.

  • RFID reader - likely to need fixed GPIO as it's likely to use SPI, or I2C, or a serial link. Reserve the needed GPIO for this device.
  • Hall effect sensor - generally has no special requirements, just needs a single spare GPIO. Allocate a GPIO when all other device needs have been satisfied.
  • GPS - likely to need fixed GPIO as typically they use a serial link. If it clashes with the RFID reader then use a different RFID reader interface if possible. If they both need serial one can use the Pi UART (GPIO14/15) and the other can use a USB serial dongle (or they can both use USB serial dongles).
  • Push buttons - generally has no special requirements, just needs a single spare GPIO. Allocate a GPIO when all other device needs have been satisfied.
  • Thanks joan. I have gpio requirements for each module now. I don't find any conflicts between the usage of gpio pins. But only confusion is rfid need 3.3v and hall sensor need 5v. Can i connect it directly to pi pins 1(3.3v) and 2(5v) respectively? Apr 14, 2017 at 8:14
  • No problem. Some people use a breadboard to lay out components as they have convenient power and ground rails allowing you to plug in multiple devices. If the board has two separate rails you can use one for 5V/ground and the other for 3V3/ground.
    – joan
    Apr 14, 2017 at 8:21
  • It's maybe worth mentioning that if you power the Hall sensor with 5V you're likely to get 5V back out again on its signal pin, which is going to be incompatible with the Pi's 3.3V GPIO pins.
    – goobering
    Apr 14, 2017 at 11:04
  • 1
    @goobering You would need to check the sensor. I have only used the (OH31)44E type of Hall effect sensor which have open collector outputs. I.e. you can power them with any voltage, the output line is pulled to ground during the pulse and floats to an external voltage (e.g. GPIO pull-up) otherwise. I think open collector outputs are fairly common with this sort of device.
    – joan
    Apr 14, 2017 at 11:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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