NesPi Case Power Problems
-
@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.
-
@caver01 said in NesPi Case Power Problems:
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.
I read that somewhere and thought that's a nice optional use of the reset button. I agree I mainly focus on the old arcade games. :)
-
@caver01 Hehe ;) Good explaination sir.
I worked on the NESPi hack and I'm able to perform prober software shutdowns but you have to modify
/opt/retropie/emulationstation/emulationstation.sh
file.There is a line that removes
/tmp/es-shutdown
file - I added a&&
and create annother file to/dev/shm
and check this with meleus script and then I'm able to differ between reboots and shutdowns ;)
As the shm-partition is a RAM-drive we do not care about file cleanups ;)The modification with a simple diode, instead if transistors works like a charm. But I think this will only be usefull if you use the Mausberry switch.
Regards
cyperghost -
@cyperghost I was using the es-shutdown as a trigger at one point, but wont that get overwritten during updates?
Also, can you point me to where you wired just a diode? That seems a lot easier that all of the careful soldering of a transistor!
-
@caver01 Yes... that's the only caveeat but you can rebuild it from time to time... afaik it will only be overwritten if you update ES only.
We talked about this issue and if you can live with a missing reboot option it's okay. But personally I need a proper reboot option for testing purposes and with just one line you can solve this ;)The diode is connected to
Pie GPIO output o------------------->|--------------o Mausberry power switch ground
This simulates a buttonpress and saves the Pie from backpowering!You asked me in this topic, too so you see I stick to my outfindings ;)
-
@cyperghost Ha ha ha. Yes. I remember now. I may have to give this a try. Seems so simple.
-
my power light is on faintly when its actully off and even when its unplugged , very odd
-
@caver01 disconect hdmi cable ;)
-
-
@xflesk said in NesPi Case Power Problems:
@caver01 disconect hdmi cable ;)
yup thats was it, never thought the HDMI was giving it some power but obviously it was
thanks
-
I wanted to add some findings to the power issues on this case. I followed @iggy 's solution in another thread and it was super successful.
I had both a Canakit adapter 2.5a and a Pi Hut 2.5a power supply. I don't know if some of it is just bad luck or manufacturing, but I had power issues even scrolling through my game list ( which is a video preview list, not just screenshots/box art).
I decided to solder new larger 22 awg pos & neg input power wires (the ones from the power input/buttons board on the case that runs to the other board which sits under the usb/ethernet circuit board). Replacing these wires cured my lightning bolt issues. It seems that the other wires are fine for voltage but as many speculated, the main power input wires were not thick enough and too much current/voltage was lost after running through the power/reset button board. All seem so be well and am even playing N64 games without any voltage issues. This is with a gampade and a keyboard plugged in, with wifi on, and a third wireless input (ps3 controller ) all being active at once.
Hope this helps.
-
Still having the issue where a power down followed by pressing the power button the light stays on just dim, of course unplugging the HDMI kills the light but why do I have to unplugg the HDMI cable everytime to make the light turn off after shutting off the NESPI case
-
@valhalla_pi that is normal in power down mode. The Pi is just sleeping. Unless you are using a mausberry circuit or similar hardware that truly cuts the power, this low power hibernation is as good as you can get.
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.