After frying a Rpi with this montage 6 months ago:
I followed advice from kind users here and modified the wiring to this back in February:
It has been working fine for 6 months and suddenly yesterday, this montage fried a Rpi again, probably due to a short circuit or maybe PWM failure pushing back current in GPIO.
Now looking for advice on how to protect GPIO on the Rpi. Diode or any other economic solution... PLEASE BE EXPLICIT AND VISUAL IN YOUR ANSWER as I'm a visual learner. If it requires rewiring please draw it or a particular component added, then please name it.
PWM module I'm using:
The Rpi is powered/grounded via a 12V to USB (5V/3A) converter module, which is wired directly to the 12V battery:
Now thinking of replacing the above PWM modules with OPTOCOUPLER isolated ones like the LR7843 (max 30V/161A) which seems to address the flash back current problem that I suspect is happening with the current cheap PWM modules (which do not have an optocoupling feature).