Sometime ago I was told to use a diode across a brushed motor so this diode could protect my circuit (including my arduino) against really high voltages that could be generated inside the motor when it is told to stop.
I studied it and it made a lot of sense, the diode would make that high voltage to be dissipated in only one direction cause if voltage would be applied in other direction it would not go inside diode but inside the motor, making it spin :)
Great, but today I was told to use a capacitor at VIN (12V) and GND of my A4988 driver which I am using to run a stepper to protect the chip if someone tries to spin the motor manually. Why a capacitor and not a diode? And why should it be placed in parallel with VIN and GND? Shouldnt I use it in the 4 wires that comes out of my servo to protect against high voltage?
I was told also to not turn my stepper manually when it's connected to the driver cause it could damage it. I know that for sure cause I already damaged 3 drivers without knowing I was causing that problem. After I placed the capacitor I turned manually the stepper and the driver didnt die. Why?