I have a electronics project (32x32 Pixel led panel) with a raspberry pi as computing unit. This device has a self made PCB with holds 2 voltage regulators, one for the onboard micro controller (atmel atmega 8), 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 curcuit. 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 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. 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. Virtual Keyboard?
changing the software, led application and changing transmission format is no problem. but i do not want to change the pcb and cicuits. 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.
kind regards Tom