I already replaced the switch
Why? Did you confirm it was broken? If not (read: you were just guessing), why replace the switch, why not any of the other 100 or so parts in above picture?
How can I detect the problem?
First, get a global view of what's what, and how parts are connected. By following the wiring, and reading the markings on those drivers.
Then:
measure! Voltages, in particular. Currents, if necessary, and where possible without too much effort. Measurement results will tell you what goes in where, and where that electric power goes (and where it does
not go
).
And indeed - even for a homebrew that's a mess.