Pi Supply Board, Darlington Pair? - Page 1
Forum section: electronics / projects

author: paul_g_787
author_rank: Frequent Contributor
timestamp: June 30, 2022, 10:41:14 am
content: Hi.I have been having a look at the Pi Supply project which adds a proper soft-off power button to the raspberry pi and cuts the power to the board until the on button is pressed.I have attached the schematic.I have two questions I cannot work out.The first is why are there two BC548B transistors in a Darlington pair? I have used the BC548B to switch relays before but only used a single transistor. So am I misunderstanding something here?Secondly, is there an easy way to improve this so the soft off and on button are one switch? So it would be like a PC power button.

author: Uunoctium
author_rank: Frequent Contributor
timestamp: June 30, 2022, 08:13:23 pm
content: at your second question: not really an easy way. You have at least to store or latch the actual state eg. toggle an FF, if not willing to use an bistable relay.Example from TI with CD4013. Instead of the schmitt/buffer you can use the second half of 4013 for debouncing. Adding an small capacitor plus resistor at reset pin forces FF to an defined power-on state.

author: Benta
author_rank: Super Contributor
timestamp: June 30, 2022, 08:37:25 pm
content: Just for my understanding:"ON" is on in all cases."OFF" turns off the power mechanically."Soft OFF" is controlled by an I/O port on the RPi (P1).Is that right? So why is "Soft OFF" a switch? What am I missing here?

author: WatchfulEye
author_rank: Regular Contributor
timestamp: June 30, 2022, 09:08:54 pm
content: The darlington configuration is used to reduce base current. When the "on" button is pressed, the relay turns on, but there is no signal to keep the power on until the PI boots and sends a "soft power on" signal. The capacitor has to hold the transistors on for long enough, which requires RC time constant, and therefore low base drive current and high gain.The "soft off" switch is connected between 2 Pi GPIOs. One is an output held high by the PI to indicate a power request. The switch connects this to the input, to signal to the PI that the user has requested a soft off. When the PI is ready it acknowledges by pulling the power request pin low. After a suitable time determined by the capacitor, the relay releases.Combining the "on" and "soft off" switches into a single DPST switch should work fine. Closing the on switch won't do anything while power is on, and closing the soft off switch won't do anything while power is off.

author: Benta
author_rank: Super Contributor
timestamp: June 30, 2022, 09:25:25 pm
content: Thanks for the clarification.So the actual on/off switches are "ON" and "Soft OFF" and "OFF" is an emergency stop (big red button)?

author: paul_g_787
author_rank: Frequent Contributor
timestamp: July 01, 2022, 11:47:57 am
content: Quote from: Benta on June 30, 2022, 09:25:25 pmOn will turn on the relay therefore powering the Raspberry Pi via the USB output.Soft Off sends a signal into a GPIO pin so that the pi can run the shutdown command so it can perform a proper shutdown.Off just switches the relay off instantly cutting the power to the Pi.

author: paul_g_787
author_rank: Frequent Contributor
timestamp: July 01, 2022, 11:51:05 am
content: Quote from: WatchfulEye on June 30, 2022, 09:08:54 pmAha I see. Good explanation! thank you. So it just reduces the amount of current drawn from the GPIO pin of the Pi.What is the max current a single GPIO pin can output? Mine is a Raspberry Pi 1 Model B.Quote from: WatchfulEye on June 30, 2022, 09:08:54 pmYes that is exactly what I was thinking! I am going to be mounting the Pi in a DIY enclosure, so I will get a DPST Normaly Open momentary switch, this was I will only need one button just like a standard PC case.