The above is identical to the circuit in **broken link removed** except that I added a few diodes. I coloured each one differently because I feel as if at least one is mandatory from microcontroller burnout due to sudden reverse voltage spikes.
I read somewhere that if power is suddenly removed from a circuit then that circuit is supposed to produce a large reverse voltage and a "flyback" diode is supposed to prevent that from happening?
The power is from a regulated power supply.
So my question then is which diodes (based on the ones I added to the circuit) should I use at minimum to prevent ESD/EMI and are the 1N400x series acceptable here?