L293D motor controller brake problem.

Go To Last Post
13 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello,

I have a microcontroller attached to a L293D. The L293D is then attached as a standard HBridge to a small DC motor. Enable is tied high, I can drive the motor forwards and backwards just fine. But if I try to brake the motor (by, for example, raising both input lines to the motor high), it just coasts.

If I tie the two motor lines together I get the proper braking effect, so its appearently not the motor.

I also do get high voltage on both the motor leads.

It appears that the driver is preventing current flow between the two sides of the motor somehow (perhaps some kind of isolation?).

Anyone have any ideas what I might be doing wrong? Can I use the L293D to do this?

Forgive my naivety when it comes to electronics, Im still learning (hence the project).

Tyler

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You are correct about the isolation. The device is only able to source or sink current from the power rails to your load, not short out the load.

The reason is that all of the power you wanted to dump from your motor in order to stop it would need to be dissipated by the driver IC. Now imagine that your motor were being driven at the device maximum ratings of 36V @ 600mA. If you wanted to suddenly stop that motor, you would have to dump 21W of power. A lot more than the package rating of 4W.

What you could do instead is drive a relay so that it connects your motor terminals to a power resistor in order to do the braking when you require. Failing that, there may be other drivers on the market that will have the braking features you are looking for.

Sacha.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The L293D iuses bipolar junction transistors, which aren't very good switches in the reverse direction. So even if the logic allowed, there's no way to turn them on.

You can get motor driver chips with the brake function, but they'll have MOSFETs. The energy needs to be accounted for; but it doesn't have to go into the driver chip. If your on-resistance is low enough, most of the kinetic energy is converted to heat in the motor windings.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for the responses. Makes sense.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I didn't know this!

Does the same hold true for the L298N?

I used to assume the L293D was just a lower power version of the L298N - are there any other differences to catch the unwary?

Thanks.
DW.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If you were pwm-ing the h-bridge, you could brake by application of a little reverse polarity

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I performed braking by using reverse polarity on the motor and I was surprised at how well it worked. I believe variable PWM at reverse polarity worked best.

Miker

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello,

one advantage of breaking with PWM is that not all of the power has to be turned into heat but pushed back into the powersupply.
Usefull with battery powerd cars.

Klaus

Klaus
********************************
Look at: www.megausb.de (German)
********************************

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The L298 is basically a higher powered L293.
A MOSFET version is the L6202.

In the simple case described above, the energy is not pushed back into the power supply. To recycle the energy requires additional circuitry.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

mneary,

does this mean that the L298N cannot do the "braking" function by tying both inputs high, or both low? This contradicts what I had always believed!

If I've understood you correctly, the L6202 is capable of braking in this way.

I had been wondering whether, in my own design, I should PWM the enable line, or keep the enable high and PWM the input lines. Given what you've said so far, I guess it does not matter which. Does anybody have any further thoughts on this, please?

I'm sure this is all simple stuff that I really ought to already know, but I've never found a good book on the subject. My understanding comes from piecing together clues I've picked up from magazines, and by discussing with other electronics enthusiasts. If anybody can recommend a good book that covers all this stuff, I'd be most grateful.

Regards,
DW.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello,

PWM enable or data

if you PWM the enable:
then the bridge output is more like a currentsource, relatively high impedance. That means little change in torque results in big change in revs. or the other way round: With PWM the enable you can better control the torque than the revs per minute

with PWM the input:
then the bridge output is more like a voltagesource, low impedance.
If you like to control the revs per minute use this. Torque is here relatively high.

Breaking with l293 with both low sides driven:
with its built in bipolar transistors and diodes i assume you have more than 1V on breking condition at your motor. The most (>0.7V) at one transistor (with the diode conducting), the rest on the other transistor.

With a FET bridge you have about 0V at your motor, because the FET is very low ohmic in both ways.
Maybe this causes bad breaking with L293.

Only a suggestion....

Klaus

Klaus
********************************
Look at: www.megausb.de (German)
********************************

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If you add external diodes, the L293 and L298 can do braking. The diode drop and on-voltage of an output stage are your limiting factors, and the output stages are darlington (more than a volt). The braking performance can be disappointing, since the braking disappears completely before the motor has stopped (due to the bias voltages on transistor and diode).

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Klaus / mneary,

Thanks for the useful information. I realise now I do not understand these devices as well as I thought!

Tyler,

I apologise for my hijacking your thread. I hope you have had some success with your project. All the best!

Regards,
DW.