I have an L6203 H-bridge connected to a brushed DC motor, and today I was testing the worst-case voltage drops across my 1Ω current sensing resistor with the motor stalled. My setup is as basic as it can get, with 5V 490Hz PWM driving IN1.
When I looked at the sense resistor voltage on a scope, I noticed huge artifacts right on both the rising and falling edge of the PWM waveform. I looked closer and the artifacts were current oscillations at about 20MHz, with amplitudes on par with the eventual maximum current draw (~3A). They grew with duty cycle and were also consistent between cycles. Below is an oscillation at the rising edge:
Compare to the signal over a whole pulse:
My probe are grabbers, hooked across one of the two sense resistors in parallel.
I have a hunch that this is a byproduct of the bootstrap capacitors interacting with the motor windings, because the ringing reminds me of an RLC oscillator. However, I'm confused that the amplitude would change with the duty cycle, almost in an anticipatory way. I suspect that it has something to do with the charge differences on the capacitor leftover from the last cycle, but that's beyond my understanding of the L6203 ends.
I'll be hooking this into a microcontroller ADC, and that -6V spike looks very unfriendly. Is this a byproduct of the charge pump as I suspect, and can/should I do anything about it?