Closed DoomyDoomer closed 4 years ago
Yeah, a working power on was a good step :) Hoping that >100k is doing the trick for the power off now.
I've hit another issue it seems. I decided to charge the battery while trying out different resistors and realized that now as soon as the USB charger is attached, the Pi comes right on with the 2k resistor in place. It really seems like this circuit just isn't going to work for my PSU :( Too many variables.
Also, I tried 220k and 330k resistors on pin 7 and no change.
That's all really strange to be honest....and I am very sorry, that it does not work for you. But did you look into https://github.com/Helder1981/OneForAll it seems to be something like retroPower, but for the RetroPSU.
Very strange indeed but it's ok and you have nothing to be sorry about. I really appreciate you spending so much time with me trying to troubleshoot this. I actually have Helder's OneForAll installed and running. Funny enough, the gpio-shutdown pin 7 line in the boot config breaks support for the battery monitoring even though nothing is interfering with SDA and SDL, which it uses. Just another headache I can't solve at the moment.
Quick update. I did find another circuit from "Othermod" and apparently Helder uses a modified version for his MintyPi build:
As far as I know SPI and I2C are disabled per default on raspian (Retropie is based on it as far as I know. Don't know, if they are activating it). You have to activate it in the raspi-config in the "Interfacing" menu.
You are correct but I have activated those in the config.txt but his AllForOne installer does this automatically just in case. If I remove the gpio-shutdown overlay, the monitoring comes back to life. Just another wrinkle :)
And you should delete retroPower, if you are using OneForAll. It interferes with SPI and I don't know, if this can be a problem for OneForAll.
Good call, I plan to remove it. OneForAll does not have safe shut down for a switch by default. It does however have a monitor that shuts down if the battery hits a certain voltage.
I just saw in the readme the config option "SHUTDOWN_DETECT". Sounds like this is a safe shutdown by driving a GPIO low. Connect the switch between a GPIO which is pulled high per default (GPIO 7 for example :D) and ground. Insert the GPIO 7 into the config option and now, pressing the switch should shutdown the system. If I understand the readme correctly. But I think it won't disable the PSU?
Right, exactly. You still need a circuit to pull EN to GND to shutdown the PSU. I actually have another circuit I built before trying out yours which used a dual diode and duel mosfet, which triggers the shutdown but does not disable the PSU. I've been chasing the dream of a safe shut down for a long time but I just can't grasp it!
One last question, did you test to completely disconnect the custom circuit, to test, if the PSU still does only stay powered off with a 2k resistor (want to make sure, that the circuit itself is interfering with this functionality)?
Because you told me, that anything higher would power it on directly, I think, that connecting the USB is pushing the voltage just enough to switch EN to HIGH. This indicates that we have to use a lower resistor.
I am just refusing to give up now :D
One more thing: I just created a Discord server (do you have a Discord account?). This is getting very chatty and it would be better to talk there.
I was going to suggest the same thing. It looks like that invite is invalid.
Hope this one works :)
Closing this. Further discussion on Discord.
This isn't really an issue but more of a help request. I'm trying to apply your shutdown circuit to Helder's RetroPSU, which is similar to Adafruits PowerBoost 1000c. It has an EN pin that functions just like the PowerBoost. The problem I'm running into is once the "power" button is pressed, the system halts at "reboot: System halted", meaning it's ready to be rebooted/shutdown but the circuit doesn't seem to send the EN pin to ground to shut down the boost. If I short EN to GND manually, it shuts down. I've triple checked the circuit and I've wired it correctly. The Pi is running on RetroPie with SPI on and your other config.txt values. I manually installed WiringPi as well since it's a dependency on the retropower application. Any help you can offer is appreciated.