How can I reduce L6472 Stepper Motor Noise due to harmonics?
I have a motor control PCB with x6 L6472PD stepper motor drivers on. 2 of the drivers are being used to drive NEMA17 "hybrid stepper" linear actuators that move a module along a linear guide. The two drive systems are laid out identically, and conveniently the same module can be driven by either the "left" or "right" driver.
Normally our system works perfectly well, but we have observed that on approximately 5% of PCBs, the module vibrates loudly when being moved at about 300-400 sps. There is no particular pattern of "left" or "right". Intriguingly, the module in question does NOT vibrate if is driven from the opposite driver.
Through a series of experiments, I have narrowed down the effect to the driver circuit in particular, to eliminate cabling. I can move an affected PCB through different hardware setups, and the vibration characteristic will always follow the driver circuit.
Using a current probe, I have obtained plots of the current output of an affected driver circuit and compared to a healthy driver circuit. In the time domain, the most observable difference is an ~3% difference in timing, which I have put down to the tolerance of the internal oscillator.
EDIT2: I now am running both motor drivers from the same common oscillator. This removes the timing differences, but the noise and harmonics (described below) remain.
In the frequency domain however, there is a very noticeable difference between the two waveforms. The FFT trace below shows a primary peak at 100 Hz, corresponding directly with the step frequency of 400 sps (4 steps = 1 wave period). In the affected module both odd and even harmonics are present, whereas for the healthy module, only odd harmonics are present.
I have experimented with the control system values not to much effect. The pitch of the vibration reduces with reducing RUN current, but is still significantly louder on an affected versus an healthy driver circuit.
The control settings for the driver are:
TON_MIN = 4 µs
TOFF_MIN = 21 µs
TOFF_FAST = 10 µs
FAST_STEP = 16 µs
TSW = 48 µs
SLEW = 0 (320 V/µs)
CURR_RUN = 968 mA
I have tried varying each of these parameters by ±10 µs without any noticeable affect on the vibrations.
Any ideas what is causing my harmonics? Or if the harmonics are even related to the audible vibrations I'm getting?
EDIT: Motor driver schematic segment (missing connectors):
We are driving with 24V