Hmmm.
While there are more complicated ways to fix the problem of the voltage spike, a diode across the coil is a simple and cheap method. From TI:
From Nick Gammon:
This forum:
Circuit Cellar:
Dave really does a great job of demonstrating the effectiveness of the flyback diode:
Of course, the @molindz should do whatever is best.
1 Like