It's most likely a interaction of the inductance value of the motor winding and the basic PWM switching frequency being used by the PWM analogwrite function. There have been posts around here on how to change the PWM switching frequency by using different values in the timer registers.
So you might experiment with raising the PWM switching frequency to see if you can improve on the situation.
Here is one thread that might help get you started:
The post states that other items in the micro will be effected by changing the frequency.
Is there a pin that is better than others for this change. I.e. if I make pin 6 match x setting. Will it have less effect on the overall chip than pin 3...
Also, for the ultimate code. I am currently using the mstimer2 hex file for a more exact interupt based delay.
What kind of havok am I looking at causing. When I make these changes.
What kind of havok am I looking at causing. When I make these changes.
Well why don't you just try a quick test with your changing as see if it solves the motor ringing problem? If it helps then you can move on with integration.
Lets us know one way or another about the ringing.
Modifying timer 1 should, I think, only effect analogwrite and servo commands that utilize timer 1, pins 9 and 10. I don't think it effects any other Arduino core software like millis() as they stick to using timer 0. However any user contributed software library you might use would have to be checked out to see if it utilizes timer 1.
Perhaps more knowledgeable software gurus around here can verify that?