(Inviting @cleoqc and @mitch.kremm to the conversation.)
I have noticed an interesting artifact once I powered up Charlie with a boost-supply attached:
Note the following facts:
-
The boost supply on my robot powers up the entire robot as soon as the +12v supply is plugged in, (or an external battery is turned on), as it is wired across the +12v connector, and the +5v from the Raspberry Pi “back-feeds” the GoPiGo board, turning it on too.
-
After shutdown, and after the GoPiGo would have powered off the Raspberry Pi, the Pi is still energized, though not running.
-
Because the Raspberry Pi is still energized during shutdown, things can still happen even after the GoPiGo board thinks things are done.
-
The Raspberry Pi is programmed to send a signal, (or de-assert a signal), when the programming for that functionality believes the board has shut itself down.
-
This occurs using either GoPiGo O/S and/or a curl’d installation over Raspbian Buster Legacy.
- I have not tried this with Bullseye, neither have I tried it with any other O/S, (such as Ubuntu with a curl’d install).
- I have not tried this with Bullseye, neither have I tried it with any other O/S, (such as Ubuntu with a curl’d install).
-
This was tested using a Raspberry Pi 4. I have not tried it with any other version of the Raspberry Pi.
Note the following video that I took of Charlie with an external 12v supply powering the +5v boost. You can duplicate this with batteries if you have an external 5v supply powering the Raspberry Pi while an energized battery is plugged into the GoPiGo power connector.
Note:
-
I press the button to begin a shutdown sequence.
-
The power LED blinks red as expected.
-
The activity light flashes as the system is shutting down.
-
The power LED begins flashing purple - this occurs when the system reaches the “Reached Target ‘Power Off’” if you monitor the shutdown messages on an attached monitor.
- This is the point when the GoPiGo robot shuts off power if no external source is being applied.
- Because external power IS being applied, the power LED begins flashing purple.
-
Note that after the power LED begins flashing purple, the green activity LED on the Raspberry Pi board continues to flash.
-
After several seconds, it stops flashing and about 15 - 20 seconds later an attached monitor goes into the “No Signal” state.
My conclusion is that the GoPiGo may be removing power from the Raspberry Pi before the operating system is fully shut down.
Unfortunately, I have not been able to determine exactly what processes might be occurring after that point, but if they involve writes to storage, that could be a Bad Thing.
Viz.:
https://www.mediafire.com/file/2235k53b6tolxa2/VID_20220411_225021666.mp4/file
If you want to duplicate this, you can do so by powering up your 'bot using both batteries AND an external 5v source by following these steps:
-
Verify that the battery power source is supplying power to the 12v connector, and the robot is ready to be powered up via the button. (Don’t press the button!)
-
Verify that the robot is not powered up and the Raspberry Pi is not running.
-
Apply power to the Raspberry Pi’s 5v connector.
-
Verify that the GoPiGo robot begins the power-up sequence as if the button had been pressed.
- The robot should completely power up, the power LED should turn green, the eyes and antenna light should light, (if programmed to do so), and any other programmed startup activities, (such as servo activity, speaking, moving, etc.), should complete in a normal way.
- If a monitor is attached and is displaying startup messages, all startup processes should complete normally as if the power button had been pressed.
- Wait for the robot to come to a completely powered-up and stable state before continuing.
-
Paying careful attention to the green activity LED and the GoPiGo power LED, press the power button on the GoPiGo board to begin the shutdown sequence.
- Verify that the normal pattern of shutdown activities occur as programmed for your particular robot. If a monitor is attached and is showing shutdown messages, verify that the robot reached the “Power Down” target state.
- Verify that the normal pattern of shutdown activities occur as programmed for your particular robot. If a monitor is attached and is showing shutdown messages, verify that the robot reached the “Power Down” target state.
-
Note the activity of the Raspberry Pi’s green activity LED after the GoPiGo power LED begins flashing purple.
What say ye?