Let's Make Robots!

H-bridge braking with L293(D)

I discovered how much braking power a Solarbotics GM9 can have when you short the terminals. I need that stopping power to make a robot that is suspended from a wire, wound around a spool, powered by a GM9.

But I also need to be able to power the motor in either direction. My platform of choice is the Picaxe 28 project board with a L293D motor driver chip.

How do I tell the L293 to short the terminals of the motor? I tried
high 4 high 5 ' both inputs high
and
low 4 low 5  ' both inputs low
but my motor will not brake.

Must I use the enable/disable pin on the L293D as well? Or should I get rid of this chip and get one without the internal flyback diodes (L293 without D)? Is a relay in order to tie the terminals together outside the main circuit?

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

The spec sheet is available here.

There are some modes that should allow braking, depending on how you have your motors connected. Check out Figure 5 under the Application Information section. You should be able to use 1/2 of the L293D to drive each motor forward, revers, or "fast stop".

Should be braking with both high ... are you using PWM on the enable?

;)

This is the famous board as seen on Start here.

So I am guessing the Enables are hard wired to V+

From manual 3:

... unless it is a real mess in my head ... cause I remember vaguely something about braking done with fast switching between directions :/

OK Smoke cleared the mess a little:

- braking the way you mentioned only works if the motor was turning

- to just hold the position find the right delay between switching back and forward

TinHead got it right. There is a way to active drive and brake the motor in every direction, even brake in stop condition, called four-quadrant control. These technique is often used in servo motors, to hold the motor on its position. You can do this with the L293D too. You need a PWM signal and an inverter for each motor. Input1 gets the PWM signal, Input2 the inverted PWM signal. Enable can be tight to VCC. At a PWM of 50% the motor will stop and actively brake (switching fast forward and backward). From 0..49% PWM the motor will drive in one direction (0% = fastest), from 51..100% in the other direction (100% = fastest). The motor will keep the constant speed, even when you robot runs down a steep ramp, it will not get faster.

That is the simplest trick I know. Here is a schematic:

I already experimented a bit without the circuitry. When the terminals are shorted, the motors is much harder to turn over. When I remove the little jumper (shorting my connector) the motor will turn very lightly.

I'm thinking the L293D is not shorting good enough. It probably causes some resistance or other kind of voltage drop.

... the coils must be charged by turning to be able to brake (something related to induction or so).

Just try the other way with fast switching of directions.

TH is exactly right, electromagnetic braking of this type is strictly dynamic braking. The braking force is related to the rate of change of magnetic flux inside the coils, and that in turn is related to the speed at which the motor rotates.

If your motor speed is zero there is no braking effect. For a given driving torque there will be a certain motor speed that will cause a braking torque to be generated that matches that driving torque, and thus the motor will go no faster than this speed, which must always be >0RPM.

In short, dynamic braking like this works well above a critical speed, but is virtually useless below that speed. You can use it to slow down quickly but you'll need something else altogether to actually provide a holding torque that keeps the motor stationary.