User avatar
VeryNoob
Posts: 49
Joined: Thu Feb 14, 2013 1:07 pm
Location: Australia

Is this how the Pi-Supply Works?

Thu Sep 11, 2014 2:39 am

First of all, I highly recommend that if you have a Raspberry Pi system that you want to be able to turn off, you get yourself a Pi-Supply. They are brilliant. I have one for each of my raspberry pi's.

But I am a curious boy, and wondered how it works. So I've taken there open schematics, and drawn out how I think it works.

Please see the attached image. Can anyone tell me if I have this right?
And I have two questions.
1) Are there two transistors to enable them to be properly saturated?
2) What does the diode (D1) running across the relay coil do?


Image

User avatar
VeryNoob
Posts: 49
Joined: Thu Feb 14, 2013 1:07 pm
Location: Australia

Re: Is this how the Pi-Supply Works?

Sat Sep 13, 2014 9:03 am

anyone?

User avatar
DougieLawson
Posts: 35811
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Is this how the Pi-Supply Works?

Sat Sep 13, 2014 9:08 am

http://www.pi-supply.com/contact-us/

Why not ask the manufacturer/vendor?
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

User avatar
Burngate
Posts: 5972
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Re: Is this how the Pi-Supply Works?

Sat Sep 13, 2014 11:44 am

VeryNoob wrote:Please see the attached image. Can anyone tell me if I have this right?
And I have two questions.
1) Are there two transistors to enable them to be properly saturated?
2) What does the diode (D1) running across the relay coil do?
Yes, you have it more-or-less right.

1) More-or-less.
Without knowing the spec of either the transistors or the relay, only hand-waving is possible, but the following might explain.
The relay requires this much current, and the capacitor can only supply that much current for so long, which has to be long enough for the Pi to boot and take GPIO 7 high.
Therefore we need a gain in excess of this over that. A single transistor can't be guaranteed to have that gain, but a darlington pair can.

2) Being an inductor, the relay coil stores energy. When it's switched off, the energy has to go somewhere, and without that diode the energy drives the negative end positive (how much positive depends on the inductance, the current, and stray capacitance) The diode clamps that voltage to prevent damage, and dissipates the energy

User avatar
redhawk
Posts: 3465
Joined: Sun Mar 04, 2012 2:13 pm
Location: ::1

Re: Is this how the Pi-Supply Works?

Sat Sep 13, 2014 1:35 pm

VeryNoob wrote:First of all, I highly recommend that if you have a Raspberry Pi system that you want to be able to turn off, you get yourself a Pi-Supply. They are brilliant. I have one for each of my raspberry pi's.

But I am a curious boy, and wondered how it works. So I've taken there open schematics, and drawn out how I think it works.
These people are a bunch of crooks, they've actually stolen my circuit my idea and change a few bits around but essentially the same circuit.
For more information on building and circuit operation feel free to read my write up http://www.raspberrypi.org/forums/viewt ... 3&p=306972

As for the diode across the relay coil this is standard procedure in electrical circuits.
When current is applied to the relay coil it stores energy, when the current is withdrawn the magnetic field collapses and a very high voltage is released.
Transistors do not take kindly to having high voltage applied in the wrong direction so a diode is added across the relay coil to prevent back EMF.

Richard S.

User avatar
VeryNoob
Posts: 49
Joined: Thu Feb 14, 2013 1:07 pm
Location: Australia

Re: Is this how the Pi-Supply Works?

Sat Sep 13, 2014 11:04 pm

Good write up red. Are you sure they stole you idea? There kickstarter started on on the 11 Feb 2013, your write up is 21 Feb 2013.

I will admit, the circuit diagram looks very similar.

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 12124
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Is this how the Pi-Supply Works?

Sun Sep 14, 2014 1:17 am

the diode is for suppressing "back emf", its standard when driving coils.

There are only a few ways to create a power controller, using discrete components, so its no wonder they all look alike.

These days most designers simply use a power control IC.

User avatar
VeryNoob
Posts: 49
Joined: Thu Feb 14, 2013 1:07 pm
Location: Australia

Re: Is this how the Pi-Supply Works?

Sun Sep 14, 2014 1:57 am

mahjongg wrote:These days most designers simply use a power control IC.
This is an interesting idea. Don't suppose anyone has a link to more information? I'm trying to build my own version that sits on a GPIO expansion board, along with a IR receiver and some power circuitry to back-feed the RPi. So I can have a nice and neat media player that isn't a ball of wires.

User avatar
VeryNoob
Posts: 49
Joined: Thu Feb 14, 2013 1:07 pm
Location: Australia

Re: Is this how the Pi-Supply Works?

Sun Sep 14, 2014 2:12 pm


User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 12124
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Is this how the Pi-Supply Works?

Sun Sep 14, 2014 3:24 pm

yes, that is an example of what I like to call a YAPOC (Yet Another POwer Controller) with discrete components, like I said, they are all alike.
it seems everybody wants to re-invent one.

An actual "power control IC" is what you will find in most modern devices that do no have an on/off (slide) switch, but instead relay on software turn off, and a button to turn on. An LTC2950-1 is an example of such a solution, a data sheet of it can be found here:
http://www.farnell.com/datasheets/1605146.pdf

Most devices now have the POC built into the SoC they are using, or in a multi function IC like a battery charger+power manager.

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 12124
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Is this how the Pi-Supply Works?

Sun Sep 21, 2014 2:50 pm

here is a video describing one of the simplest single button power-on/off circuits possible, its actually cheaper to use this circuit than buying a mechanical toggle switch.

http://www.eevblog.com/2012/03/30/eevbl ... h-circuit/

Return to “HATs and other add-ons”