The setup:
I'm trying to build a pinball machine, powered by a STM32F3DISCOVERY. I'm using some TLC5916IN (
http://www.farnell.com/datasheets/1831407.pdf) to control the lights. I took a 30V DC power supply from an old machine to use. The flippers are wired with one side connected to the +30V, and the other side connected to the buttons (just a regular set of contacts) in the cabinet, which is then connected to the ground. I have new 1n4007 flyback diodes across all of the solenoids, and a 47uF electrolytic capacitor across the power supply (69K7949,
http://www.illinoiscapacitor.com/pdf/seriesDocuments/CKH_CKE%20series.pdf). My LEDs and the TLC5916INs run off a 3V wall plug, which I have put 0.1uF and 0.01uF ceramic capacitors across, in addition to the ones in the plug itself. The 3V ground of the LED controllers (open drain) connects to the 30V ground (I need a common ground because I also have MOSFETS controlling some other solenoids), and then I have ~1' wires running from there to each of the power supply grounds (which I believe is how a 'star ground' should be?).
What happens:
I have the 3V and 30V on, but the CPU isn't connected, so the LED controllers don't receive any signals, and all the LEDs stay off. When I flip, very often, some of my LEDs will randomly turn on (or sometimes off, once they're already on). With the CPU on, I occasionally get random 'phantom' input firings while flipping, on inputs that are connected directly to the CPU, even when I verify 100% that my input's contacts are open. This only happens when I activate coils like the flippers or bumpers that are controlled just by switches to ground. When I fire solenoids via MOSFETs with the CPU, I don't have any issues.
I also have some input shift registers, that I use to periodically check switches that aren't momentary. I was getting phantom inputs very occasionally from them too, so I put decoupling capacitors across their power pins, which 'seems' to have fixed that. I do not have any decoupling capacitors on my LED chips currently, but I have been hesitant to just do that, because that wouldn't address my phantom direct input problem (not like I can put more capacitors across my CPU). Getting random fake pulses makes me suspect that something is wrong with my protection, it seems to me that it shouldn't be happening if I've designed everything right, and it may be causing other damage I'm not seeing, so even though I could just decouple the LED chips and buy some more shift registers to use instead of direct inputs, I'd rather solve the problem, unless it turns out that this is normal...