5
\$\begingroup\$

my problem is the following: I am using two DRV8842 H-bridge ICs to control 2 different brushed DC motors, my intention is to use a PI controller for the current loop. The schematic looks like this: Schematic Motor Driver and low side current sensing

and the pcb layout: Motor Driver Board

For the current sensing i am using the INA301 chip from texas instrument for low side sensing and a shunt resistor of 30 mOhm. To measure the current i use an ADC interrupt at the middle of the PWM pulse in order to take a measurement each time the transistors are closed. I noticed that for low duty cycle my current readings were higher than those when i increased the duty cycle (PWM frequency 20 KHz). When i checked the voltage signal in the resistor and after the INA301, i noticed there were oscillations in the signal as shown in the picture: Current Signal for 10% duty cycle

The blue signal is measured directly at the shunt resistor terminals. And the input signal to the ADC looks like this for the case of 10% and 50% duty cycle:

Current PWM with 10% duty cycle Current PWM with 50% duty cycle

The blue signals are the resistor voltage amplified by the INA301 and low pass filtered with a RC filter with cutoff frequency of ~1.3 MHz. As i am sampling at the middle of the pulse, for low duty cycles i read this peak value and not the steady state value. For a brushed DC motor i would have expected a current signal with a sawtooth like form, what could be causing this oscillations? Maybe my pcb layout is bad and has parasitic inductance and capacitance or is it due to the PWM modulation and i need to use some snubber circuit? Any ideas on what could be wrong or how to solve it will be appreciated. Thank you all in advance!

Regards, Emmanuel

\$\endgroup\$
2
  • \$\begingroup\$ Brushed DC motors are extremely noisy and draw large amounts of current in short bursts. You will likely need a lower cutoff frequency on your filter. Also, if it doesn't already have them, make sure you add three capacitors directly to the motor (between the terminals and between each terminal and the shell). \$\endgroup\$ Commented May 18, 2018 at 16:09
  • 1
    \$\begingroup\$ To me like this looks like something couples capacitively to the current sensing signal path. It only happens after a slight delay relative to the yellow trace (the logic level PWM input), because the driver has a propagation delay. Try replacing the motors with a non-inductive dummy load (resistor), do you still see those spikes? I bet you do. \$\endgroup\$
    – jms
    Commented May 18, 2018 at 16:12

3 Answers 3

1
\$\begingroup\$

The spike at the very beginning is the reverse recovery current of the diode. This is completely normal with switching power supply topologies. This is why leading edge blanking is used when using current mode control. The leading edge blanking ignores a predefined portion of the current, so that it doesn't get a false overcurrent detection. Free wheeling diodes will not fix this issue because it's the body diodes that are causing this to happen.

If you did have a voltage spike due to the inductive load of the motor, it would be when the switch turns off and not when it first turns on like yours is. There isn't really much you can do about it besides just making sure the components you're using can handle that really short current spike.

\$\endgroup\$
0
\$\begingroup\$

A wild stab in the dark - your oscilloscope probe does not use one of these: -

enter image description here

Switch mode power supplies are notorious at generating pulsing magnetic fields that can easily be picked up if you only used this: -

enter image description here

It's easily proven - connect earth croc clip to target board earth and connect probe tip to exactly the same spot - what do you see?

\$\endgroup\$
2
  • \$\begingroup\$ I agree regarding the ringing in the first waveform, but in the others the spike is on the order of 5us long. Isn't that effect a bit long to be caused by bad probing / impedance mismatches? \$\endgroup\$
    – jms
    Commented May 18, 2018 at 16:43
  • \$\begingroup\$ Yes, using that type of probing method is a good way to reduce noise, but that current spike at the beginning isn't a noise artifact. That's your diode reverse recovery current spike. \$\endgroup\$ Commented Aug 26, 2021 at 20:54
0
\$\begingroup\$

I might have missed something, but I don't see any freewheeling diodes in the design. I think what you're seeing is a voltage spike from the inductive effect (L*di/dt) of the DC motor coils.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.