Open Source Shutdown Circuit?
-
Does anyone know of any open source safe shutdown circuit designs? Apologies if this has been asked before but a search for "shutdown" yields a surprising number of hits and none obviously helpful in this context.
Over the years I've bought a half dozen Mausberry circuits for my various builds and they're functionally ideal, but aesthetically I'd prefer to integrate something into my own PCB design.
Unfortunately, I lack the competence to reverse engineer these circuits but I'm surprised there isn't an open source solution available. Every few months I come back to this and spend a couple of days Googling to no avail - hopefully someone else has had more joy than me.
-
I'm somewhat reassured by the lack of responses - looks like it's not just me stumped by this one.
Although there may be light at the end of the tunnel! I've had an On/Off Shim sat on a shelf for a while now but never used it - the default momentary switch didn't fit with my projects.
Having picked it up again I suddenly found this:
https://retropie.org.uk/forum/topic/17415/multi-switch-shutdown-scriptA couple of hours of testing and it works with a SNES slide switch which is what I want. Also, looking a the circuit it seems a little more manageable and doing a little digging I unearthed this:
No idea how accurate this is but it's worth a shot; I'll pull together the components and give it a try. Hopefully I'll be back to share a success story soon.
-
@jackal123uk said in Open Source Shutdown Circuit?:
doing a little digging I unearthed this:
Where exactly? (to give the author due credit)
Thanks for sharing.
-
@Clyde said in Open Source Shutdown Circuit?:
@jackal123uk said in Open Source Shutdown Circuit?:
doing a little digging I unearthed this:
Where exactly? (to give the author due credit)
Thanks for sharing.
Good point!
Actually looks like it's from Pimoroni themselves...
https://github.com/pimoroni/clean-shutdown/issues/18I also found this which is an attempt to trace the circuit - looks pretty close.
https://forum.core-electronics.com.au/t/pi-zero-on-off-shim/4396/11 -
I've drafted a small circuit to test with; it's just at the fabricators now and should be with me in a week or so. Once I've tested with the multi switch shutdown script (and assuming successful) I'll start integrating into my console projects.
Standby for further updates...
-
Just received the boards from OSHPark - arrived yesterday and not bad considering the order was placed 06/10/19.
Very fiddly soldering! I'm missing one value of capacitor so no tasing just yet - hope to get these tomorrow so I'll report back then.
-
Finally gotten round to testing with mixed results...
The circuit is supplying power to the pi with the switch open and when the switch is closed the shutdown script is called and the pi powers down.
Clearly there's some thing wrong but the fact that it does something gives me hope - a little more testing methinks...
-
Success!!!
After a bit more testing, a lot of head scratching and a little kicking myself I found the problem and fixed it.
The moral to the story is not to make assumptions. The circuit is connected at the junction marked below - usually I'd expect this to be marked differently so assumed it wasn't connected.
Adding a small link to the circuit as below and it works like a charm.
Now I can move on to building this into other projects. For anyone else looking to do this then at least I've validated the above circuit diagram so you don't have to.
If it's any help I can post the Eagle files for my little prototype circuit - just let me know.
-
@jackal123uk Thanks for sharing your solution! Mouseberryes are out-of-stock for a while and I would like to use this concept to power RPi from the car battery. When the engine is turned on, one of the 12V battery outputs is active while the other battery output is always 12Vs, so the goal is to transform 12V to 5V only if engine is on, to power RPi. I wouldneed such circuit to safely power off RPi when engine is turned off.
As I have really limited experiences with hardware, I would like to ask you how to modify the scheme to support such solution? Why do you have this USB in your circuit? Thanks a lot!
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.