This is from "Figure 5. Bidirectional DC Motor Control" of L293D motor controller datasheet:
Since the last three columns are all labelled "Fast motor stop" there seems to be no "Free-running motor
stop" in bidirectional use of L293D.
My thought was that the same label "Fast motor stop" implies the same time needed to stop if at same speed. I decided to test this and to my surprise it was not true. In addition I tried two other methods to stop and now all 4 show different time to stop behavior.
These are the bitlash functions used:
> boot
bitlash here! v2.0 (c) 2013 Bill Roy -type HELP- 956 bytes free
> ls
function stop3 { a9=0; d10=!d10; d13=1};
function stop4 { a9=255; d10=!d10; d13=1};
function stop2 {a9=0; d13=1};
function stop1 {d10=!d10;d13=1};
function startup { pinmode(8,1); pinmode(9,1); pinmode(10,1); d8=0; a9=0; d10=1; d13=0 };
>
The steps I did for the 4 tests were (200 is not full speed, behavior is dependent on the speed):
- boot
- a9=200
- wait until motor is at speed
- stopN
These are the 4 youtube videos:
I used http://rowvid.com frame by frame analysis. Since the Arduino Pro mini blue LED gets turned on when stop command is executed I determined that time, and then single stepped to the frame where wheel move completely stopped. This is the result:
stop1 1.76 4.16 d=2.40
stop2 3.35 5.99 d=2.64
stop3 2.54 5.26 d=2.72
stop4 2.95 4.75 d=1.80
So it turns out that stop4 does the hardest stop, turning on full speed and then setting 1A=2A. The worst is stop3, setting speed to 0 before setting 1A=2A.
It seems that the active motor break is best with full speed.
Is there anything else that can probably further decrease the motor stop time?
Hermann.