Closed douw closed 2 years ago
I think the delay is there as an attempt to guard against "shoot through", which essentially creates a short circuit that destroys the motor controller very quickly. Here's an example of people discussing it when designing their own H-bridge:
It is important to ensure that the two mosfets on the same half-bridge are never on at the same time. This condition called “shoot through”, shorts the power supply and will likely damage the mosfets. The IR2109 half bridge driver chip contains logic to prevent this condition from occurring. It outputs the PWM signal to the high mosfet gate while sending an inverted version of the signal to the low mosfet gate. To be certain that shoot through does not occur during the transient, it also adds a 540ns dead time where both signals are low.
Understood, thanks.
The BTS7960 chip already has a dead-time feature built in (section 4.4.2 of the datasheet) so the delay here isn't needed.
That's interesting. Do you know from experience that it works? The datasheet also claims over-current and over-temperature protection, and yet these devices cook quite easily while being operated within their voltage and current specifications.
Not an issue. Why does the TurnRight and TurnLeft methods include a line that writes 0 to the output, and the microsecond delay? Won't that slow the motor down on repeated calls to change the speed?