-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
DRV8833/8836 has two options, how to recuperate motor inductive current during PWM-off state. Currently, the library uses recuperation through body diodes back into the power line capacitors through the driver output MOSFETs body-diodes. This mode is not very good for regulation, because motor current is not linearly dependent on PWM duty.
I strongly recommend to use the other recuperation mode, when bottom MOSFETs of full-bridge short the motor and keep the current circulating. Then is the average motor current proportional to the duty cycle.
Modifications needed:
- Change line 82 to ledcWrite(_in2Pin, _pwmMaxDutyCycle);
- Change line 88 to ledcWrite(_in1Pin, _pwmMaxDutyCycle);
(I am not sure right now, whether this will cause as side effect also reverse motor rotation, need to verify before modification)
Metadata
Metadata
Assignees
Labels
No labels