I have a electronics project (32x32 pixel LED panel) with a Raspberry PI as a computing unit.
This device has a self made PCB with holds 2 voltage regulators, one for the onboard micro controller (Atmel ATmega8), and another for the raspberry pi which is switched by the micro controller. Furthermore there is a big 15 amps relay for the LED panel power supply (it draws about 13.5 amps at full white and full brightness). This relay is controlled by the MCU, too.
I've added five more buttons to the device chassis to do input on the led display. These are connected to the MCU too, because it was easier to create the circuit. It is a odered PCB so I do not want to change the cicuitry.
So when I plug the power in, then the MCU starts and waits for pressing the standby button. If its pressed, voltage regulator for the Raspberry PI boots up.
Now my problem
The 5 buttons on the powerboard are transmitted via the MCU to the UART from Raspberry PI. simple binary format. Every change of the button states (including standby button) it is transmitted via UART and is used by my LED applications.
But if the Raspberry PI is shutting down (better until its safe to remove power) it should send a single byte via UART so the MCU can switch of the power supply for the Raspberry PI. HOW do i realize that?
I've read about using
acpid set a single GPIO port to signal its safe. but i want to use the already connected UART. And if it is possible i want to use the standby button to safe shutdown the Raspberry PI.
Changing the software, LED application and changing transmission format is no problem. But I do not want to change the PCB and circuits. Further is through the MCU realized on crash/hang that I can force off the device by holding down the standby button for about 8 seconds.
Maybe someone had already done something like this. But i didn't find anything like this.