Genius... that was the thing to do. I unplug the solenoids, and the buttons go back to working fine... on screen as well.
Glad you were able to run the test - I think that means it's pretty solid that it's some electrical noise feeding back from the solenoids, then.
It isn't quite clear to me why adding a second PC PSU will have them share the same ground, but I suppose I don't need to understand that
.
I just learned this bit of trivia myself in the course of this project, actually - it was a surprise to me as well! It turns out that ATX PSUs by spec always have the 0V rail (the black wires on the DC side) electrically connected to Earth ground - the green wire in the AC wire to the wall outlet. You can observe this with a simple continuity tester and see that the black wires are all connected to the metal case of the PSU and to the ground wire in the power plug. So if you have two or more ATX PSUs in the cab, all of the black wires in all of them will end up tied together through the outlet plugs. They do it this way in part for safety reasons, and in part for the sake of standardization so that everyone making PC parts can count on everyone else doing it the same way.
Anyway, you can get real isolation if you use a non-ATX power supply with a floating ground. These will generally be in plastic cases rather than metal cases. You can even convert an ATX case to floating ground (you can find advice about this on the internet if you hunt around), although I wouldn't be comfortable doing that without transplanting it into an insulated plastic case.
I am going to take a look to see if I can find a 12V and 5V PSU and my local shop. I know they have 12V and they have 5V I'd like to get both together if such a thing exists. And then can you explain to me how I am isolating things? Am I providing the Power Board's 5V and 12V inputs from one PSU and the KL125Z expansion board's 5V and 12V inputs from a different one, is that the ideal setup?
Yep, exactly. In practical terms, I think it comes down to this:
1. PC Power Supply -> "PC PSU" connector (JP7 on the main board)
2. Isolated Second Power Supply -> "2ND PSU" connector (JP10 on the main board)
3. All solenoids and other high-power devices connect to the *second* power supply's (+) supplies for the appropriate voltages (e.g., +12V for your 12VDC solenoids).
4. And basically nothing other than the expansion boards should connect to any of the PC Power Supply terminals.
I think that covers the bases - let me know if anything's unclear or I missed anything.
Oh, one more detail: if you need multiple "second power supplies" to get all of the voltages you need - e.g., a 12V unit, a 5V unit, and a 24V unit - that's fine. You just have to connect all of their grounds together. The exception, of course, is that you don't connect any of them to the main PC power supply ground. That stays separate.
Here's how this all works inside, in case you're interested...
On the boards, everything that's electrically connected to the "PC Power Supply" is in one group of circuits, and everything that's connected to the "2nd power Supply" is in a second group of circuits. The two groups share absolutely no wiring on the boards. The only communications between the two circuit groups is through the optocouplers. These are basically optical relay switches - they let one side control current on the other side without any electrical contact between the two sides, using light to communicate across the gap.
If you use a single power supply, or use two ATX PSUs that have shared grounds, you don't get the full benefits of the isolation, but it doesn't do any harm to the boards, either. The boards don't care if the two sides of the optocouplers happen to share a common ground - they'll work the same either way. It just loses the benefits of full isolation to do so because it provides a path outside of the boards for these noisy power spikes to travel around between all the different circuits.
Edited by mjr, 07 April 2016 - 04:43 AM.