0
\$\begingroup\$

So Im using a L293 H bridge driver, to manage a DC Motors Speed and Direction.
In every tutorial I see online people use the 1A and 2A inputs as the direction management inputs and the enable port as the Speed management, being the speed controlled by the PWM duty-Cycle.This should work because in the data sheet when EN=0 it is depicted as Free-Running motor Stop.
However my teacher explained it in class as using the 1A and 2A ports both connected to different PWM sources and with this control the direction and speed, like 50% 50% the motor is stopped and 60%40 % the motor goes in the direction of the 60%.
I've developed my whole project around the first option and my teacher doesn't really answer emails. Is the first option really not viable or can use it?
I can't test this so im really just guessing now, because of quarantine we don't have the motors.I'm using a PIC32 to develop the code.
Thanks

enter image description here

\$\endgroup\$
1
  • \$\begingroup\$ using EN for speed control can be an advantage because you are not "putting brakes on" during the "off" portion of the PWM cycle \$\endgroup\$
    – jsotola
    May 2 '20 at 23:08
1
\$\begingroup\$

Driving the EN pin in PWM while driving A1 and A2 in opposite directions will provide the desired speed control as you had originally planned. To create a full stop you can drive both control pins low while keeping EN high. This will act as an electric brake by shorting the motor to itself through Gnd.

Using A1 and A2 in opposing duty cycles would also work on paper, but this is really creating a tug of war effect where the motor is being driven backwards rather than having a real "off" PWM state.

As an illustration: if your PWM frequency was unreasonably low (like 1Hz) you would see the motor run back and forth, but it would eventually trend in one direction in a "two steps forward, one step back" pattern (not ideal). Also if the 50% duty cycle is not perfectly balanced (or if there is driver imbalance inside the IC) you will see the motor creep in one direction rather than stay stopped.

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

If you use en as PWM you motor will go and free by PWM. so it more efficient to move without braking and consume less current produce less heat.

But if you are in Control system class. PWM on A1 A2 will produce 0V and Vcc2 by PWM so you can get average voltage to use as input for DC motor model. PWM on En can not get average voltage because the it produce Vcc2 and High impedance state.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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