Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

PowerBlock and Retroflag NESPi case



  • Hi!

    I'm new here and new to both RetroPie and Raspberry Pi's, but I'm very excited to get into it!

    Anyway, I've got a Raspberry Pi 3 and Retroflag's NESPi case. I like the idea that the buttons on the case are functional, but of course don't much like that they simply cut power for a fairly dangerous shutdown! I'm looking at various options to get them working in a safer manner.

    There are a number of modifications out there but I feel like something like the PowerBlock looks much cleaner and nicer than most of the other modifications I've seen. But I'm pretty new to this so I'm hoping someone else has used a PowerBlock in this case before and could maybe walk me through how to wire everything up so it all works properly.

    Anyway, thanks for any help anyone can provide. It seems like the PowerBlock is almost the perfect solution for what I want, I'm just trying to be sure I know what I'm doing before I wire it up!



  • @brandonshire the thing is no matter what meathod you choose for a safe shutdown, the nespi case needs to modified. Soldering skills are needed. The reason is the power and reset buttons are directly in line with the main power. So to make any use of them, you need to cut the traces and isolate the buttons so you can use them for other reasons. Which in turn makes you find another way to send power to the pi from the main input.



  • @lostless Thanks for the reply!

    I'm fine with doing a bit of soldering and modifying, but I'm looking to do the smallest amount of that I can, just so I'm less likely to screw something up! I'm just looking for the cleanest most foolproof option I can find, and so far in my searching the PowerBlock and the Mausberry seem like the cleanest places to start. I've seen a few posts about using the Mausberry, though I couldn't quite follow all the steps, I was just hoping maybe there were some posts about using a PowerBlock for the same thing that I hadnt' yet found, or someone who could put together a quick guide/description.



  • @brandonshire If you are looking for the smallest amount of modification you can just leave it as-is and just shut down from the ES menu before you kill the power. ;)

    But if you have your heart set on modifying, let us know the results!



  • @quicksilver That's true, the least amount would certainly be none!

    But yes, I would like to try to modify the buttons, I'm just looking for something that I can feel reasonably confident I'll get done correctly with my beginners skills. I've done a little bit of soldering before, but not a lot, and I don't know all that much about electronics, so I'm learning about resisters and capacitors and such as i'm reading up on this stuff. Anyway, this seems like a fun project, I'd just prefer to come to the end of it and be successful!



  • @brandonshire The big step (deep breath moment) in the modifications of the NESPi case has to be the cutting of the traces on the bottom of the power button board. However, it is somewhat liberating because you are freeing up the two buttons and LED to use as you please. Unfortunately, outside of NO MODS AT ALL, the least bit of effort will probably still require this step, as there is no other easier way to unlink the buttons from the power circuit. That in turn requires you to reconnect power, bypassing the switches. If soldering is beyond the scope of your intentions, it might be better left as-is

    Once you make the commitment, however, you have bunch of options. A lot of the discussion threads you are probably reading are basically documenting the script enhancements. The truth is these steps are not really necessary. You can use the bash scripts from Mausberry or any other safe switch technique. But now that you have the switches available, you can leverage them any way you please. Even the LED can be used as-is by wiring it in series with a resistor.

    For me, your options look like this:

    1. Do nothing. use NESPi as-is and risk a bad shutdown, but try to use the ES software shutdown and only power off when safe to do so.

    2. Modify the NESPi power board by cutting traces, isolating switches.
      2.a. Route the power such that it bypasses the now cut-out switches.
      2.b. Change power switch to momentary (remove a tiny part from it) and wire it to bridge GPIO header pin 5 to ground. This will awaken Pi from deep sleep.
      2.c. write a very simple script to watch Pin 5 so that it performs a safe shutdown. (you can find examples)
      2.d. Maybe ignore the reset button for now, but always available for future scripting work.

    3. Modify the NESPi power board by cutting traces, isolating switches.
      3.a. Install a Mausberry, or a Control Block, or some other additional circuit to do a true poweroff by wiring/installing it as the USB power input (some creativity required here--tight fit). Wire it as designed using the NESPi switches, LED.
      3.b. setup more complex scripting to make the circuit above work as designed.

    4. Modify the NESPi power board by cutting traces, isolating switches.
      4.a. Follow other tutorial threads for installing diodes and resistors etc.
      4.b. Install scripts to make the above work correctly.

    Basically, the challenge is that NESPi switches are pre-wired to break power when pressed. It is an inexpensive shortcut design. Either you live with it, or you head down the path of modifying the case, and once you do that (by cutting out the switches) you have to solve power wiring with a little soldering and then figure out how you want to leverage the switches and LED. At this point, the minimum might be to leverage the Pin 5 power trick (#2 above).



  • @caver01 Thank you so much for your very detailed response! I guess the reason I was interested in PowerBlock and Mausberry options was becuase they seemed a bit more purpose built than some of the other solutions I've found (involving capacitors and such) and I felt like my fledgling skills might be less likely to mess something up by going with that. I understand there's a certain level of stuff I'm going to have to do myself. And honestly I am excited about that! I'm just looking for a way to start that process but with a greater chance of success! I do have some soldering experience, and I know pretty much whatever I do is going to involve some soldering, I just want to avoid as much really intricate soldering as I can, at least until I'm a bit more comfortable with my skills, you know?

    I had also hoped that maybe by using a Powerblock or Mausberry switch I might be able to rig up the Reset/Power switch as is without cutting the traces, and just have it act as essentially one big switch (as far as the board was concerned). Ideally maybe even have it respond differently to a momentary cut and a longer cut? It seems like maybe that's not really an option, at least not as is, but that's what I had been hoping, and trying to figure out.

    Anyway, I've got a couple of options I"m looking at now, one using capacitors and resisters and such, and the other using an open-source replacement board design for the power and reset buttons that I can apparently get printed up pretty cheaply and then install parts into. I'll let you all know how it goes! And if anyone has any specific advice on what they did and any pitfalls to avoid or tricks to try out I'm all ears!

    Thanks again. I'm still pretty new to all of this so I'm perhaps being overly cautious!



  • @brandonshire I am with you on wanting to do as much as you can without brutalizing the mounting board with the switches. However, it looks like the way the power is wired through these switches, reset breaks the circuit, and power completes it. You could bypass the board and route the power directly to the Pi and to the USB board, but you still have both switches "married" because of the way the traces connect them. I was hoping they could be disconnected via the wiring somehow, but it is not built to allow that.

    Once you commit to cutting the traces, you realize that the board simply becomes a convenient platform to do your soldering and that it still serves to hold the switches and LED solidly. That is not a bad situation, and you now have options for how you want to use them. Just be mindful of how the pins connect on the one side and where power is going as it leaves that board and you are fine.

    Most solutions have people taking the switches out of the power circuit completely and instead wiring them to GPIO pins.

    I have not used Powerblock, but I expect you could make it work assuming it will fit.


  • Global Moderator

    I just ordered a Retroflag NESPi Case. As soon as it arrivers I will take a close look at it and post a tutorial about how to combine it with a PowerBlock. Since the case is shipped from Hongkong it will take some days, though.



  • @Brandonshire I actually just started working on modding my NESPi case with a PowerBlock, and so far it's going pretty well.

    Instead of cutting traces, I desoldered the connector coming from the micro-usb input, and soldered in a jumper instead. I cut the wires that connected to the usb hub board, and cut off the connector for the GPIO pins, soldering the wires to the switch pads on the PowerBlock. I checked with a multimeter, and the power button works as a toggle switch, with the reset button functioning as an in-line normally closed momentary switch (which should in theory serve as a soft-reset button).

    I also desoldered the leads of the LED, hot glued it to the little plastic piece, and used some female dupont connectors to wire it to the PowerBlock, no resistor necessary.

    I soldered the connector from the micro-usb input board to the 5v in pads on the PowerBlock, and the wires that connected to the usb hub board to the 5v out pads, but unfortunately the wire was too short, and I ran short on time yesterday, so I have not been able to test it out yet. (fingers crossed!)

    I did have to desolder the 2x2 pin header from the PowerBlock to make room for a fan, as well as dremel out one of the supports that the base screws into to make room for the PowerBlock, but the remaining screws hold it together fine.

    This was only my second time soldering, and I had no problem once I got used to the process.



  • @jtmack1 That is exactly the sort of solution I was trying to figure out if I could set up. I'll be very interested to hear how it works for you. It seems like the reset button should let the switch operate as a momentary switch, while the power button will let it operate as a "longer term" switch. Assuming the Powerblock can interpret both of those things separately it seems like that should work. Anyway almost all the parts for my replacement board for the switch are here so I'll probably end up going that way but I'll be interested to hear more about how your solution works out too.



  • @jtmack1 The switches in the NESPi case can be used as momentary switches.
    I wrote something about in the thread here - how the latching power switch can be hacked to a momentary one.



  • @Brandonshire I'll make sure to post about it once I get a chance to put the finishing touches on it! To the best of my knowledge, the PowerBlock should initiate a shutdown when you press the reset button, and once finished, sees that the switch is back on, and boot it back up again.

    @cyperghost The PowerBlock actually needs a latching switch, so it worked perfectly for my needs without having to mod the switch. Thanks for the info, though!



  • @jtmack1 said in PowerBlock and Retroflag NESPi case:

    To the best of my knowledge, the PowerBlock should initiate a shutdown when you press the reset button, and once finished, sees that the switch is back on, and boot it back up again.

    Interesting. So, the fact that the Reset and Power switches are basically on the same circuit works in favor of your design, as it allows them do do the same thing except that with Reset, it continues back into a powerup cycle.

    If one were wishing to leverage separate functionality for Reset (such as exiting emulators only) it would have to be isolated from the power switch by cutting traces and bypassing, then wiring it to separate GPIO.



  • @Brandonshire

    Here is the post I just made about my build, if you want to check it out.



  • @jtmack1 Great! Thanks! That's very helpful.



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.

Looks like your connection to RetroPie Forum was lost, please wait while we try to reconnect.