I'm currently turning my pi into a retro gaming unit. GPIO diagram

I have used pins 2,3,4,17 and GND for the joystick.

Button 1: 18 & GND

Button 2: 23 & GND

Button 3: 24 & GND

Button 4: 7 & GND

Button 5: 11 & 8 (assigned as GND)

Button 6: 9 & 25 (assigned as GND)

Button 7: 27 & 22 (assigned as GND)

I need to add one more button but on have GPIO 10 left along with the two 3.3v pins and 5v0 pins. My question is: is it safe to assign 10 as GND and connect a button to it and a 3.3v or 5v0 pin? Would the current from the 3.3v pin damage the button or the pi board?

  • what's the difference betweeen "GPIO pin" and "regular pin" in your question?
    – lenik
    Commented Dec 11, 2013 at 23:45
  • I edited the question to make it clearer
    – DarylF
    Commented Dec 12, 2013 at 9:42
  • You are using separate GND pin for each button. You are using pull-up resistors for you GPIO inputs to detect if button was pressed (logic low) or not (logic high). Since there are only 4 GND pins and you need more buttons, you started using some GPIO ports as GND setting it to logic 0. Then you run out of GPIO pins and you still need one additional button. Your idea is to use additional button in reversed logic - connect it to 3.3V when pressed and use pull-down resistors but you are concerned about too high current flowing from 3.3V to GPIO10. Is that right? Commented Dec 12, 2013 at 9:56
  • I'm a beginner at this so bear with me. I was hoping I could somehow negate the voltage from 3.3v so it could be used as a normal pin allowing me to connect a button to it and GPIO10, with 10 set as GND. Another thought I had although I don't know if its possible was to expand a ground pin so multiple buttons can connect to the same GND.
    – DarylF
    Commented Dec 12, 2013 at 12:12
  • 1
    @DarylF It is absolutely possible to use the same GND pin for grounding multiple inputs, since they're all essentially the same pin. See for example this tutorial with two buttons connected to one GND pin. How you should "expand" the pin will depend on what you need to connect it to.
    – maniacyak
    Commented Dec 12, 2013 at 23:38

2 Answers 2


this looks definitely quite fishy:

Button 5: 11 & 8 (assigned as GND)
Button 6: 9 & 25 (assigned as GND)
Button 7: 27 & 22 (assigned as GND)

you basically need only one single GND pin, use it for every button, there's absolutely no reason to try to use signal pins as ground. and then you may use pins 8, 22 and 25 for something useful.


The quick answer to this question is that you can limit the current using resistors. You can use, for example 1kOhm resistor to limit the current to `3.3V/1000 Ohm = 0.0033 A = 3 mA. This amount of current wont damage your RaspberryPi or button for sure.

If, on the other hand, you wont use the resistor, you will create a shortcut which can damage RaspberryPi. Button should be safe, however.

  • If my understanding of you problem (see my comment) is correct, it would be better to rethink your design a little and you will get much more GPIO pins available. I will update the answer when you respond to my question in comments. Commented Dec 12, 2013 at 10:13

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.