A Flyback diode is hooked up throughout the coil contacts of the relay to ensure that the back current has a course to drift while the coil is switched on and rancid. Inductive hundreds together with a coil in the relay create unexpected voltage spikes while the deliver modern-day is interrupted. This adds extra protection to the MCU. The diagram underneath shows a way to connect a flyback diode throughout the coil contactors of the relay.