I'm planning a project that involves a portable Pi Zero with a battery and I want to wire a switch that turns on and off the pi/battery. I'm not too experienced with hardware and I would like some kind of solution

Charging circuit I'm using: https://www.adafruit.com/product/1904

Switch I'm using: https://www.adafruit.com/product/805

1 Answer 1


The easiest way would be to put the switch anywhere on the positive (+) wire. Make a cut in the wire and solder in the switch. One part of the wire will go to the middle pin and the other part to either the left or right pin of the switch.

Depending where on the positive cable you put the switch may mean you interrupt the supply when charging the battery. If that's not your intention it would be better placed between the PI and the charger, not the charger and battery.

Note this method would not shutdown the PI in a clean manner. It would be the same as ripping out the power. There are many tutorials on how to connect a momentary button to a gpio and send the shutdown command - better way.

Edit 1 - Insert visual at OP's request


simulate this circuit – Schematic created using CircuitLab

  • Could I have something more visual like a picture? I don't quite understand yet Oct 22, 2017 at 16:21

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.