1

I have quite a few sensors connected to my pi.

At the moment I power everything using the 5v and gnd pins on the raspberry pi. I now notice some problems with the relays not always reacting. I don't know if this is a power problem, but as I want to add more sensors in the future I think it might become a problem at one point anyways.

What is a good way of powering multiple 5v devices?

  • Which model Pi are you using? Do you have any other connected devices running (USB, HDMI, etc)? – PhilM May 24 '16 at 1:35
4

Try buying an external power supply preferably one with a barrel jack such as this, be sure that you get one with the proper number of amps that you need. You can caculate the number of amps required by adding up the amperage requirements for all of the devices to get you intend on connecting to it. You may use a slightly lower rated supply if you do not expect to be turning on all of your relays simultaneously.

Now all you would need to do is to buy a barrel connector such as this and be sure that you get the right size, then all you would have to do from there would be to connect it to either a bread board or a PCB and connect all of your devices to it. Be sure to connect the ground from your Pi to the negative terminal on your power supply(this is only needed because you are using sensors and not just relay(s))

Note: be sure to remember that your Pi will no longer be able to turn off the power running to your relays and sensors and that you will have to do this manually either by connecting a switch into your circuit or by disconnecting the power source when not in use.

  • Thanks, won't it be a problem that the ground of the devices isn't connected to the pi though? – Xeli May 23 '16 at 20:42
  • 1
    Yes, you will need a common ground for the sensors you are using, please connect the ground gpio pin from the Pi to the negative pin on your power supply. My post has been edited to reflect this change. – Mohammad Ali May 23 '16 at 20:49
  • @Xeli please mark this answer as correct if it has helped you. – Mohammad Ali May 23 '16 at 21:08
  • Would it also be oke if I connected the pi to the external power supply too? So the pi has the same ground as the other devices have, or is the gpio ground seperate? – Xeli May 23 '16 at 21:33
  • 1
    That would be ok, but often your USB phone charger has a much cleaner output. But if you feel the need to connect the Pi to a External power supply, be sure that you take that into account when calculating amperage needs, and also i would recommend that you connect a USB port to your breadboard then power the Pi through that. Instead of back feeding it through its gpio pins as. They do not contain the smoothing capacitor that the USB input does. – Mohammad Ali May 23 '16 at 21:38

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.