Raspberry Pi Power Switch

Thread Starter

The Fishinfiend

Joined Feb 5, 2018
22
I am wondering if this will work.

Ok, I have a Pi with a two position DPDT switch for power. One half of the switch controls the 5v+ to the Pi and the other one controls a signal voltage to the Pi to start a shutdown script so when I flip the switch it from one position to the other it will turn the power off and start the shutdown script. Then I take a transistor and connect the collector to the 5v+ power source side of switch, the emmiter to the Pi's 5v power in, and the base to either the Pi's usb 5v+ or a GPIO 3.3 or 5 v out pin.1527649004978935497545796632828.jpg
Don't mind my drawing it was just a quick sketch to try a so what I was thinking quickly without me starting up CAD.

1. Will this work what I am thinking?

2. How much power would the transistor draw when the switch and Pi are off?

Thanks,

Fishinfiend
 

Sensacell

Joined Jun 19, 2012
3,784
The idea is the PI shuts off it's own power after it puts away it's file system?

Better to use an FET high-side switch for this, the voltage loss can be much lower, the idle current also can be very low.
 

Thread Starter

The Fishinfiend

Joined Feb 5, 2018
22
Thanks for the repy.

The idea is the PI shuts off it's own power after it puts away it's file system?
Yes, correct turn off its power after it puts away the file system.

Also, you say the transistor to use is a FET because it has a lower voltage drop and lower idle current consumption. Is a FET what they use for a low voltage cutoff on a lithium battery circuit?

Either way, in theory the circuit I am thinking about should work, correct?

Thanks again,
Fishinfiend
 

Thread Starter

The Fishinfiend

Joined Feb 5, 2018
22
Thanks Sensacell.

That is really close to what I want except for I was thinking a latching switch not a momentary switch. What I want is a switch that when I turn it on it powers up the Pi and when I turn it off it kills the power to the Pi except for if it is still running. Then it will perform a shutdown script. I was thinking transistor (and Sensacell said a FET would be the one to use) to keep the power on until it finishes the powering down.

I was just going for a easy way to power it down without chance of corrupting the file system without doing multiple button presses.

Also, in the above post with the transistor, I was just wondering if one of those would work to use as a proof of concept BEFORE I order the correct FET. That is the only reason why I am asking about those transistors.

Thanks again
Fishinfiend
 
Top