After shutdown ATXraspi does not cut power [SOLVED: bad wires, SD]

Started by Rahul, December 27, 2021, 08:13:55 AM

Rahul

I have got ATXraspi R3 and have wired it up as per the videos and have the scripts running fine. However, on shutdown ATXraspi doesnot cut the power fully.

On pressing the momentary switch, the following sequence happens:
1. Pi goes into shutdown and the shutdown LED (Red) is turned-on, with slow blinking LED on the switch itself.
2. BootOK LED goes low (dim-lit) and Pi shuts off completely after its fast blinking green LED. This happens in under 10 seconds.
3. Shutdown LED turns off after a few more seconds & BootOk LED remains low (dim-lit).
4. LED on momentary switch is fully lit. Full power cutoff never happens. The only way out is to force-off and then start Pi normally with the switch.

Note:
1. BootOK is lit solid bright green after Pi boots
2. shutdowncheck script is running, confirmed with below::
pi@raspberrypi:~$ ps aux | grep shut
root       486  1.4  0.1   7900  2904 ?        S    13:06   0:01 /bin/bash /etc/shutdowncheck.sh



is there anything that doesn't seem right?? I need to have full power cut off after shutdown.

Felix

Rahul,

This is a bit out of sequence, not sure if in reality it's exactly like this, so please clarify:

2. BootOK LED goes low (dim-lit) and Pi shuts off completely after its fast blinking green LED.

Are you 100% sure the board is running the SHUTDOWN and not the REBOOT? (this should correspond to the shutdown script).
This is indicated by the RED LED (SHUTDOWN) staying ON until the power should be cutoff, and well after the BOOTOK goes LOW. It should NOT turn off any sooner than power is expected to be cut off.

Can you measure the voltage on the BOOTOK signal, and on the 5VOUT that powers the Pi?

Rahul

2. BootOK LED goes low (dim-lit) and Pi shuts off completely after its fast blinking green LED. Confirmed, Bootok goes low and then Pi fast blinks green LED

100% sure of the shutdown sequence, shutdown LED stays on until the pi downs (rapid green flashes on pi) and stays on for a little while longer then goes off.

I have encountered a couple of different scenarios when the input voltages are varied slightly.

Case1:  Vin - 5.0v, Vout 4.92v: In this case, after the shutdown is initiated, full power cut-off doesn't happen.
Case2: Vin - 5.2v, Vout 5.0v: In this case, after the shutdown is initiated, the pi starts to shutdown but reboots midway.

I have uploaded videos for both the cases on google drive, so that you can review and let me know of any issues

LINK: https://drive.google.com/drive/folders/1Vi6fjrtRsu9lVGJmjeYaRokcMjrpQ0lw?usp=sharing


Felix

Thanks for posting the videos. IMO I think from what I see the ATXRaspi might be OK, and there might be something else. In your setup LEDs continue to be ON/HIGH which is not normal.
I assume the Power button is a momentary and corresponds to the default jumper setting on the back of the ATXRaspi. This is explained in the guide. If you have a momentary button with default jumper settings then there is nothing of concern.

I see you're using the other AUTO-OFF wiring to the 5th leftmost pin on the top header. I wonder what happens if:
1) you disconnect that wire entirely
2) if you GROUND it/pull it LOW.

I would test the ATXRaspi functionality on its own without the Pi. This is easy and lets you know for sure if ATXRaspi is behaving as expected.
You can test the ATXRaspi functionality by disconnecting the LOAD (Pi) (or just plug in a LED to simulate a LOAD). Then simulate a power ON/BOOTOK by wiring the BOOTOK to the 5V input (make BOOTOK HIGH). Then initiate a shutdown from the button, and simulate the successful Pi/OS shutdown by disconnecting the BOTTOK from 5V (make BOOTOK LOW) - at this point the button should blink fast for a few seconds and cutoff the LOAD and all LEDs should also be OFF.

Rahul

Thanks for your reverts! I did try both disconnecting soft-btn completely and connecting it to the ground. And in both cases, there was no change in shutdown behaviour.

As suggested, I disconnected Pi and attached a dummy load (LED), and proceeded as you mentioned and ATXRaspi performed exactly as expected. It cut-off power completely after BootOK pin was pulled low by disconnecting it from 5V input.

I then proceeded with reconnecting Pi and decided to pull out bootok pin, after pi had shut down, during the ATXRaspi shutdown sequence.

Case: Softbtn pin diconnected
Outcome: Everything worked as expected, after pi had shutdown, bootok pin wire was pulled out and power was cut-off completely.

Case: Softbtn pin connected
Outcome: With the softbtn pin connected. ATXRapi rebooted Pi even after bootok was pulled out

Kindly advice.

thanks for all the help!
.

Felix

Sounds like something's amiss and the BOOTOK pin is not being correctly pulled LOW on the Pi side. It that does not happen, then ATXRaspi will not cut power off. Check your script is running and it pulls down the BOOTOK.
The SOFT-BTN signal should be left disconnected (no wire attached to ATXRaspi) until this is sorted out.

Rahul

Hello & Happy New Year 2022,

For last couple of days, I must admit I have been bit struggling to get to test ATXRaspi with erratic behaviour. Turns out to be wiring issue, used thicker guage wires for 5V and GND.

Now, I have been able to successfully test power-on, shutdown and force-cutoff features of ATXRaspi. However, reboot isn't still working.

Reboot Sequence:
1. Long pressing momentary switch to initiate reboot (quick blink on momentary switch).
2. Bootok and shutdown (this comes up momentarily) LEDs are turned low
3. Pi shutsdown. Red LED on Pi comes back ON
4. After a while, flashing on momentary switch ends and is lit solid.
5. No Activity on Pi

Kindly advice. Thanks!




Felix

Ok, glad you figured out that cheap wiring is not working so well and causing all kinds of false problems.

So now, you're trying reboot. From what you're describing (the fast pulse on the power LED), the ATXRaspi is doing exactly what it should.
However from your other steps, it sounds to me like your Pi is not executing a reboot, but a shutdown instead:

3. Pi shutsdown. Red LED on Pi comes back ON
4. After a while, flashing on momentary switch ends and is lit solid  <---- because ATXRaspi waits about 1 minute for the Pi to boot back up (BOOTOK = HIGH/GREEN)
5. No Activity on Pi  <---- sounds like your Pi has shutdown instead

So check that the script is executing correctly. The problem is likely on the Pi side/script this time. Although, if you haven't changed the script at all I would expect it to work correctly.

Rahul

Oaky, I tried a few things are here are the updates for the reboot issue:

1. I have now modified the shutdownirq.py script to write log messages to a file with datetime stamps. The script is working as expected and on reboot initiation from ATXRaspi correct block of code is getting executed. Please see below:

=========== 2022-01-03 06:36:59.572087=================
   ATXRaspi shutdown IRQ script started: asserted pins (7=input,LOW; 8=output,HIGH)
   Waiting for GPIO7to become HIGH (short HIGH pulse=REBOOT, long HIGH=SHUTDOWN)...
=======================================================
============ 2022-01-03 06:39:08.948441==================
            REBOOT request from GPIO7, recycling Rpi ...
=======================================================

However, Rpi does not reboot but shuts down.

2. After, force shutdown and turn-on, I initiated reboot command from the shell and again Pi shut down and did not reboot.
3. Next, I disabled the shutdownirq script in rc.local and turned everything off. Connected Bootok to +5v input and turned on ATXRaspi, assuming there was something wrong with the script. Again, I initiated a reboot from the shell but Pi would shut down and not start again.
4. Lastly, I disconnected ATXRaspi from Rpi and powered Pi from Type-C jack, and now reboot from shell worked fine.

Not sure why reboot isn't working when Rpi is connected to ATXRaspi.

Felix

So far: script works, ATXRaspi does what it's supposed to. Pi doesn't.

Never seen anything like this. Except when thin wires or poor connections are used, perhaps the Pi can act erratically but even then, to do a shutdown when you ask for a reboot? That's a first for sure, or that's some finicky Pi. I know of no issue powering the Pi through the GPIO (vs the USB), the command line should act no different.
Wires seems to have solved your first problem, I would check that again.
Not sure what else to suggest.

Rahul

Hello Felix,
I tried to reimage OS on the SD card and finally everything worked as expected. All the functionality of ATXRaspi is working as expected. thanks for all the help!!

Now, I procceded with softbtn shutdown functionality using system service. However, this seems not to be working correclty.
1. shutdown command initiated from shell
2. Pi starts to shutdown. After few moments shutdown LED is lit and slow blinks are enabled on the switch.
3. However, Bootok remain high and after wait timeout shutdown LED is turned off and swtich is solid lit again

Any ideas what could be the issue??

Also, another thing that I have noticed is when softbtn pin is connected to GPIO pin the swtich functionality is completed unresponsive.

Felix

That whole soft shutdown function is supposed to "press" the button for you, that's it.
It sounds like the softshutdown script is running too late (?), and it's not asserting the softshutdown GPIO (at all? or at the right time?).
BOOTOK is not supposed to remain HIGH, or else ATXRaspi will think the Pi never shutdown properly.