Slight change of plans..
All while putting the cabinet together, I kept thinking about the power sequencing board, relay board, and the somewhat untidy way it was put together. On top of that, I thought it was wasteful to have lit buttons that all just stay lit all the time. I decided to rip the power boards back out, wire each button light separately, and make a combined button light board and power sequencer.
New power board layout. The 2×14 header at the top is for a ribbon cable to the controller buttons. Below that are 4 SN7407 open collector drivers, since the total power draw can be way more than what the microcontroller, a PIC18F4550, can sink.
New custom power board in place, much better! There is one power relay to spare.
The software to control the lights uses a lot of tables to display all kinds of running patterns on the buttons. However, this only starts after the console has been idle for a couple of minutes. I am generating an ‘activity signal’ from the button pad whenever the most common stick movements or button pushes occur. This was a problem, since the Ultimarc Ipac 2 controller that I am using (https://www.ultimarc.com/ipac1.html ) does not generate such a signal. I did not find a reliable way of creating the signal from within the RetroPie software, so I ended up creating it by capturing the grounding of the buttons through an array of 1N4004 diodes and making the activity signal an active low in software. Works great!