NesPi Case Power Problems
-
@valhalla_pi Are you using a fan? I haven't tested without a fan yet but it's conceivable that the fan is causing enough voltage drain to induce the issue, or at least worsen it. I've been wondering if lobbing the end off of the fan connector, soldering on a couple of female dupont connectors and attaching to the 3.3V pins on the Pi might reduce the drain enough for the Pi to behave normally. I'm tempted to do that at this point but I need an indicator of a reasonable chance of success before I commit to butchering my fan.
-
I think everyone should have one of these: https://www.aliexpress.com/item/USB-Tester-Current-Voltage-Digital-Dispay-Charger-Capacity-Doctor-Quick-Charge-Power-Bank-Meter-Voltmeter-4V/32820027125.html
They are really handy for Pi stuff and other electronics and they are pretty cheap! I use one for testing USB cables/power adapters mostly, and you can also use them to calculate how much electricity the Pi actually uses. -
@drake999 Couldn't you use some temporary wires to make contact with the fan connector and wire the fan to the Pi's 3.3v? At least with a temp solution you could do a test first.
Also, from what I have read, the beauty of the Nespi case is the form factor and only some of the design features, but most of what I read about references the flawed design of the power/reset buttons, as they cut power directly and put the SD card at risk of a bad shutdown. Consequently, I do plan to buy one of these cases but with the full knowledge of its shortcomings and with the intention of modifying it to make up for the problems:
- Rewire the power/reset, moving their function away from the power itself and instead to GPIO pins to trigger a safe, scripted shutdown and emulator exit/reset.
- Bypass the built-in power port and use a Mausberry circuit instead. Or simply wire the power leads straight into the mausberry to avoid plastic case modifcation. This would tie directly to the bullet above leveraging the existing buttons and LED.
- Wire fan to the Pi instead
These steps have been performed by others without low voltage complaints.
-
@caver01 Yes I could use temporary wires for testing, so that's worth trying. As far as the other stuff you mention, I don't have a lot of time for additional modifications and I don't mind killing the power directly with the buttons. I know to do a safe shutdown first before powering off so thats not a big deal for me. Worst case scenario if I corrupt my card I'll just reimage it with a backup. I would like to eliminate the voltage issues without a huge number of modifications. You shouldn't have to purchase a product, then fundamentally alter it to get it to work the way it's supposed to. If it's not possible to correct this issue with a 5.25V adapter and moving the fan to 3.3V, it will sit there and look pretty I guess, lol.
-
@madmodder123 Thanks for bringing this to our attention. I may have use for this at some point.
-
@drake999 understood. I think a lot of us tinker with our systems way more than we actually play the games (and some of us enjoy the tinkering more than gameplay too)! At any rate, it is a bummer that you are running into voltage issues just using the case as it was intended. Hopefully using GPIO for the fan will help. I don't like the prospect of having to guess on heftier power supplies.
-
I solved my under volatage power issue by replacing the internal power wire between the rear power port pcb and the main NesPi PCB with the power/reset buttons. I only had to replace the first set of positive/negative wires between those 2 boards. The cheap wire in the NesPi case has very few strands of wire in it. I used a slightly thicker gauge and soldered it into place.
I have been using a 3amp NorthPada psu from Amazon, and have not had a single lightning bolt since replacing that +/- power wire. I'm also using a dual fan heatsink.
-
I had similar issues as well. What I ended up doing was taking a tiny slot screwdriver and push on the metal connector within the ends of the cables that connect to the header pins on the board (while it was disconnected), creating a more secure connection on the pins. I also took a pair of wire strippers and used the plier end to pinch the connector of my power supply so that it's connection is also more secure, eliminating some of the power loss created by all the friction connections this case has. I do have a dual fan connected in my setup, and I haven't seen a lightning bolt icon since. I tested this by running some PS1 games, and N64 as I believe they probably create the most power demand.
-
i had a intermittent one for me, and all i had to do was trim the power supply connector to make it a better fit. after that the lighting bolt went away.
granted i have not messed with it much. i just finished getting it set up in the case with the few mods that i made to it.
-
Well I've suffered for the community yet again and through testing several adapters I found a working solution. I purchased the adapter below and no under-voltage issues whatsoever, with a 1350 Mhz overclock and the 5V fan attached to the NesPi case fan pins. I tortured all four cores for 30 minutes with sysbench and not one under-voltage warning. Temps remained below 65 degrees (because of my heatsinks and fan). For those who are interested, here is the adapter I used.
-
@caver01 Yeah I used to like to tinker a lot more than I do now. Truthfully I still like it to a certain extent but I just don't have the time. The good news is the adapter I ordered worked. No under-voltage issues, without moving fan to 3.3V and high overclock.
-
@drake999 said in NesPi Case Power Problems:
For those who are interested, here is the adapter I used.
It looks you hit the mark. I saw this in one of the vendors descriptions.
"2. Power supply needs to reach more than 3A, it will not produce low voltage situation"
-
@drake999 said in NesPi Case Power Problems:
5V fan attached to the NesPi case fan pin.
Is it a 30MM fan? They don't really say in the description.
-
@riverstorm hello. Yes it was a 30x30x10 fan. I don't think amperage was the problem. I believe it was resistance in the power and reset switches droping the voltage. I tried a 5V 3A adapter before this and it performed the same as a 2.5A adapter. I had to specifically hunt for a 5.25V adapter, which is apparently at the max for the PI's tolerance.
-
@drake999 said in NesPi Case Power Problems:
I had to specifically hunt for a 5.25V adapter, which is apparently at the max for the PI's tolerance.
Thanks for the information. I am kind of interested in trying one out after reading this thread and maybe as Caver suggested a scripted shut-down/reset would be make it about perfect. With a couple of NES controllers you would almost have the consoles they've been selling. :)
I think you can push it a bit higher even. I've been using an old HP charger from HP's brief stint into the tablet market. It's a 5.3v 2A. No vdroop. There's a link in this first post that has a pretty exhaustive battery of tests for stress testing. Following this guys guide my stable clock was only 1260. I can for the most part get away with 1300 but it's not completely stable.
I have a few fans of course they are 30x30x7. :) A few MM's to short. I would need case and fan the rest I have laying around.
-
@caver01 said in NesPi Case Power Problems:
- Rewire the power/reset, moving their function away from the power itself and instead to GPIO pins to trigger a safe, scripted shutdown and emulator exit/reset.
- Bypass the built-in power port and use a Mausberry circuit instead. Or simply wire the power leads straight into the mausberry to avoid plastic case modifcation. This would tie directly to the bullet above leveraging the existing buttons and LED.
- Wire fan to the Pi instead
I was wondering if you could clear a few things up? It looks like Drake found a proper power supply that would save moving the fan and stop under-voltage issues.
I've seen the hack Yahmez posted looks pretty neat and doable. I saw another guy asking about a pre-built PCB which would be really nice just to flat out purchase it. I would prefer to do that. I was thinking of asking how that was going. I also saw you were doing quite a bit with a script but the conversation seemed to end about a month ago.
Is the Mausberry circuit you're referring to in your steps above a tutorial or something yet to be designed?
Is the script you were working on "proprietary" to the circuit you're designing above or it does it work with the Yahmez hack?
There's a lot of information that seems to be all over in many threads so it's hard to pull it altogether unless you've been following it closely.
It's to bad that NESPi developers didn't build it with RetroPie in mind. I mean hardware wise or at least an optional add-on PCB. Then allow the community to work a script to do a proper reset/shutdown. I know it's probably used in many many applications but it seems the RetroPie project is here to stay and has a solid community and would require little to no marketing to sell it. I've seen many references all over to RetroPie and different hardware that works with it all the way up to the multi-billion dollar conglomerate Amazon. :)
-
The official Pi 5.1V 2.5A power adapter fixed my problems with undervoltage on the NesPi case, but then, I have also rebuilt the entire case to allow for proper shutdown, and the reset button closes any running emulator and puts you back in ES. Will make a guide once I finalize everything, it requires some soldering and only 1 resistor, no other additional components. Also I replaced all wires with slightly thicker ones, which made a significant difference.
Remember that stepping up the A will most of them time not fix an undervoltage problem, because, its underVOLTAGE not underAMPERE.
I had a 5.0V 2.5A Deltaco adapter that when measured only gave 4.71V with my Pi just sitting in the ES main menu, the official Pi 5.1V 2.5A gave 5.07V.
-
@riverstorm First of all, I don't have the Nespi case, YET. I want one, but I will almost surely modify it, as I cannot have the power button literally cutting the power like it does. That just won't fly for sharing with friends who don't understand the risk.
The Mausberry circuit is basically just a power switch add-on some guy made and sells. There are several versions of it. Basically, it has USB power input on one side, USB power output on the other, a switch (or solder pads for one), and pins for GPIO in and out. What you do is plug your power adapter to it, then plug it into the Pi, and connect two GPIO wires. Push the switch/button, the Pi gets power. Push it again, and the circuit sends a signal on a GPIO, and then starts "listening" on the other GPIO for it to go LOW. When that happens, it assumes the Pi has powered down, so it it cuts power.
The key to making the circuit work is a simple script that launches at startup and does two things. Number one, the script sets a GPIO pin to HIGH. The point of this is so that when the circuit starts its shutdown routine the Pi will eventually go off, and when that happens, this pin will go back to LOW and the circuit will see that and cut power. Number two, the script sets up a polling loop, watching the other GPIO for a signal from the mausberry circuit (which the circuit sends when you push the power button). When the script sees this signal, it breaks out of the loop and executes a shutdown command.
I will admit, all of the recent activity around the script has been really confusing. I won't start another, but I will summarize the main things those threads achieved.
- The recommended script from Mausberry is simply a BASH script. It is not proprietary. It is just a simple BASH script that sets one pin HIGH and starts looping watching the other which is LOW. This is not very efficient, as your Pi will have this eternal BASH script looping in memory and using CPU. How much? I dunno. How inefficient is BASH? I dunno. But a Python script would be better, or so I have read, because it can use edge-detection and interrupts instead of constantly checking the state of GPIO. So, one goal for me from some of the threads was to get a Python version of the script.
- The script was written to simply shutdown. It has no regard for emulators, saving Emulation Station metadata (like last played, or favorites, etc.. It just initiates a power down. This is safe, certainly, but can be frustrating if you also want it to preserve ES data. So, a major revision to the script included emulator detection and closure plus graceful exit of ES to save metadata--and THEN do a shutdown. Meleu was able to do something really cool and that was to setup a 'service' such that any shutdown request kicks-off the ES detection and closure of running emulators. This is nice because it separates the retropie-specfic shutdown innovations from the script that interacts with mausberry and GPIO pins, effectively making graceful exit and metadata preservation generic and usable with any shutdown mechanism. For example, if you had a game running and simultaneously SSH into the Pi and initiate a shutdown command, Meleu's service would find the emulator and quit, then close ES.
- Finally, and this part is really Mausberry-specific, a few of us worked on an additional tidbit to use a third GPIO to trigger a mosfet/opto-coupler relay or a transistor to electrically press the power button during a soft shutdown. This is to solve a small problem (or rather, an incomplete solution) with the design of the Mausberry. If you are using a Mausberry curcuit with the script running as-is, and you request a shutdown via software (such as through the Emulation Station menu) the Pi starts the shutdown routine, but at the end, the Mausberry circuit does NOT cut power. Why? Because it is not "listening" to that first GPIO pin to go LOW until it detects someone has pushed its power button. There are various reasons for why it was designed this way, but point is that Mausberry gets stuck in powered-on mode if you decide to shutdown in software. You need to use the button in order for it to power down. And if you try after the fact, it won't always work. SO. . . I hooked up a transistor to a GPIO, and I made an additional call in Meleu's service that tells my GPIO->Transistor to "PUSH" the power button, like tapping Mausberry on the shoulder and waking it up to watch it's own GPIO pin for the Pi to power down. This works, but we lose software reboots (because the service does not know the difference between a reboot and a shutdown).
-
Wow! Ok thanks for that summary. I was reading along in the other threads but I didn't quite understand the complexities but writing it out as one explanation makes sense. I could live without the reboot feature.
I'll keep an eye out as you continue development. I would like to get the case too. The idea of leaving it plugged in and using a switch for power and shutdown would be a nice change. Being able to do that makes it seem more like a "real" mini console.
-
@riverstorm Agreed. Everything that has been learned/developed to date makes me very confident in using that case for a nice console system. I know others are way ahead of me, but my focus has always been the arcade. This will be a different direction, and the Nespi seems like a good place to land.
I really don't mind soft reboot either. Any shutdown/restart through software ends up being a complete shutdown on my system and I am just fine with that. It works nicely, it is safe, and I will do the same thing with the Nespi. The addition of a reset button is nice, as I will wire this up to a separate GPIO as others have and simply use it to close out of emulators. In that sense, it is not exactly how Reset worked on the NES, but it will be nice to have a dedicated exit for folks who might not remember the hotkeys.
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.