Gauge stepper motor control directly from Photon, do I really need flyback diodes?

I am using a Photon directly connected to a small gauge stepper motor (very similar to Adafruit x27.168) driving it with the stepper.h lib and it works brilliant… so far. But then I read something about that is good practice to have flyback diodes to protect the particle. And my question is do I really need that and if so how do I connect those and how to select? It is a bi-polar motor and coil resistance is about 260 ohm.

If it’s “very similar to Adafruit x27.168” then you should heed the warning

Whenever you have a inductance (coil) which gets switched off very quickly (which digital PWM does) you should protect your equipment against the voltage spikes produced (induced) by the collapsing magnetic field.

This datasheet of a motor driver shows how to connect flyback diodes.

1 Like