I am trying to deal with current being rejected by a H-bridge when doing dynamic braking of a motor: to control the amount of braking, the PWM duty cycle adjusts the time the motor spends coasting (all transistors off) vs being short-circuited (both high transistors on).
When coasting, the braking current still flowing goes through the H-bridge's body diodes and tries to make its way to the supply, but it is unidirectional. So I've added 3 Zeners in series to take care of transients, but I would like to redirect the bulk of the power dissipation to a power resistor, so I've added one. Without associated chopper, I don't mind the inefficiency.
After adding in the resistor, very regularly within 10ms for example, I have hundreds of amps flowing from the supply (dark blue) - and 10A through the Zeners (green). These spikes always occur when the high transistors are switched on.
Where do these spikes come from and how to remove them (a diagram would be nice if relevant)?
P.S: DC brushed Motor parameters: R=10 Ohm, L=50mH, backEMF=40V, motor current (outU to outV)=1A decreasing down to -2A in 10ms. PWM duty cycle is 50%.
Edit: This spike goes through all transistors AND diodes of the lower half to ground! What's happening?
Edit 2: Adding a 10uF capacitor in parallel of the H bridge solved it - but I am still curious about why this happened.
.model
statements) \$\endgroup\$