0

Me and my dad were been looking for making small Pi to bigger Pi out of old PC case from 2004. So I thought that I need power button to power Pi but it's in the PC case so I took those but then i don't know how power Pi so I gone online and I looked how to add power switch to RPI2 but it turns out that it only found as RPI1 and that's not what I need but GPIO headers on RPI1 has less plugs and it uses power from here and I don't have power button that requires micro USB on the button heres a picI dont need this one!. So tell me how i can power RPI2 like thisWhere to plug?? But if this is not correct then tell me with a picture and with text on comments below

  • All models of pi are exactly the same in this regard. You cannot do this without a power button including a microUSB jack unless you power through the 5V pin, which is risk prone since it bypasses fuses, etc. – goldilocks Jan 29 '16 at 18:57
  • @goldilocks read DaBoss'ses messages –  Jan 29 '16 at 19:07
  • I've read the whole thread. What is it in that answer (which does not do what you want, by the way -- in other words, it is wrong) do you think changes anything? – goldilocks Jan 29 '16 at 19:08
  • Sorry, that other duplicate was the wrong one. The switch in your picture runs shutdown to stop the operating system then disconnects the power; this is distinct from a button which simply runs the shutdown command but leaves the power to the pi on. If you want to be able to turn the pi back on with the button, you need more than that (see the new duplicate). – goldilocks Jan 29 '16 at 19:14

1 Answers1

1

Personally, this is my favorite method of shutting down my Rpi2.

http://www.recantha.co.uk/blog/?p=13999

Essentially it allows you to shut down your pi with a paper clip, or another conductive object.

You could probably modify this to work with a button.

Basically, you touch to GPIO headers and the pi runs the shutdown command.

Pretty cool if you ask me...Not as elegant as a button but it still works.

enter image description here

TheXed
  • 231
  • 2
  • 11
  • @da-boos then which gpio pin i have to use? My faveruite is pc power button so tell where it connects beauce that one you gave me i dint able to understand –  Jan 29 '16 at 17:21
  • @watonis according to the directions. Take a paper clip (or other conductive object) and touch the last two vertical GPIO pins at the same time. If you’re using a 26-pin Pi, it will be GND and GPIO7. If you’re using a 40-pin Pi, it will be GND and GPIO21. See the diagram below. – TheXed Jan 29 '16 at 17:23
  • 1
    You could definitely modify this to work with a button. Use the same script and commands in the link, and simply wire a normally open momentary push button to the correct GPIO pins. Pressing the button will perform the same task as touching the paper clip to the pins. – Pete Hooper Jan 29 '16 at 17:24
  • @daBoss i still cant understand i never used gpio before i have few pics taken from xperia t3 from few angles to see clearly theres two ways to know how many gpios pins i have and i cant count them all beacuse i forget them too quick heres. 1.im using raspberry pi 2 model b. 2. the image http://imgur.com/a/xuadx And edit the image with paint program and send to me so i can understand better beacuse my dad as well doesnt know wich one plug goes to –  Jan 29 '16 at 17:41
  • @watonis Last two vertical headers as outlined in the picture of my OP. Its not rocket science... no need to count... – TheXed Jan 29 '16 at 17:49
  • @daBoss Thank you for helping me out!!! My dad will remeber this on my PC that im writing on! –  Jan 29 '16 at 17:59
  • @daBoss WAIT!! My dad said that if we plug incorrectly it will blow up!! Tell me the red and black connector wich side will go heres an example red goes to the top and black goes to the bottom –  Jan 29 '16 at 18:04
  • @watonis I don't think it will matter...and it won't blow up lol... – TheXed Jan 29 '16 at 18:11
  • @daBoss try to think or just edit that drawn picture –  Jan 29 '16 at 18:14
  • Or you could just try it. – TheXed Jan 29 '16 at 18:16
  • @daBoss i dont trust beacuse if it blows up it will be too expensive –  Jan 29 '16 at 18:19
  • Its not a bomb, its not going to blow up...oh and if it where a bomb, always cut the red cord first to disarm it. – TheXed Jan 29 '16 at 18:20
  • This is not the same as a power button. It does not cut the power. It simply runs a command to stop the operating system. You also cannot turn the pi back on this way. You still have to reset the power somehow. – goldilocks Jan 29 '16 at 18:56
  • @goldilocks we have already established this :-D – TheXed Jan 29 '16 at 19:17
  • I don't see anywhere that this is explained to the OP. The button in the picture pretty obviously controls the DC input. You've explained how to rig a button to run a command. The question mentions putting this in "an old PC case". So without pulling the cord to the case and plugging it back in, how are you going to turn the pi back on again this way? – goldilocks Jan 29 '16 at 19:22
  • @goldilocks pressing it again? –  Jan 29 '16 at 19:23
  • Wrong. That won't do anything. – goldilocks Jan 29 '16 at 19:24
  • I said that when you touch the two gpio headers together it will run the shutdown command. Yes, you are correct that he would have to unplug the cable and plug it back in to turn it on and something I did not consider. – TheXed Jan 29 '16 at 19:25
  • @watonis Once the operating system has shut down, in order to restart you must kill and reapply the power to the board. It will not do anything again until then. – goldilocks Jan 29 '16 at 19:26
  • However, the Pi2 (and A+/B+) also have a "reset" header that can be used instead of plugging/unplugging. You could use that to make a "turn back on switch", although it is not really a "turn off the power" switch: http://www.instructables.com/id/Rasberry-Pi-2-Reset-Button/ – goldilocks Jan 29 '16 at 19:27
  • The difference here is that "reset" will restart, but not shutdown. This is a problem since you want to make sure the operating system stops properly first. So you could either run the command manually, or use two buttons, one to stop the OS, one to restart the board. – goldilocks Jan 29 '16 at 19:34
  • @goldilocks but how i can make work like real pc powers up? –  Jan 29 '16 at 19:38
  • If you want something that actually controls the power, you need something in between the microUSB jack and the power supply, like in your photograph. I believe the wires on that switch connect to GPIOs to do what da Boss is talking about; there is some kind of controller on the back that keeps the power up for a few seconds to allow this. It is the same as a normal PC; if you turn it off, it does not go off instantaneously like a TV. First, it shuts down the OS. Then it kills the power. That is complicated ;) – goldilocks Jan 29 '16 at 19:41
  • @goldilocks is there a posibility that i can turn on with gpio? –  Jan 30 '16 at 14:20
  • No. You would have to use the reset header indicated in that "Instructables" link. – goldilocks Jan 30 '16 at 14:20
  • @goldilocks then whats the url for this? –  Jan 30 '16 at 15:23
  • It's in my third to last previous comment here, beginning "However, the Pi2 (and A+/B+) also have a 'reset' header...". – goldilocks Jan 30 '16 at 15:30