TI L293DNE Half H-Bridge Braking

Apr 23, 2005 5 Replies

Hi

This is my first robot project using a uC ( excluding Mindstorms ). I am a newbie and am interfacing a PIC 16F876A ( programmed in CCS C code ) to a Texas Instruments L293DNE half H-Bridge driving a Tamiya twin-motor gearbox. I have worked out the PWM and speeds and directions, and how to coast to a stop OK.

Is it possible to brake using this configuration, or only possible to brake using one motor? If I send two HI signals simultaneously on either side of the L293D does this basically fry the chip?

Cheers

Dale

Hi



This is my first robot project using a uC ( excluding Mindstorms ). I am a newbie and am interfacing a PIC 16F876A ( programmed in CCS C code ) to a Texas Instruments L293DNE half H-Bridge driving a Tamiya twin-motor gearbox. I have worked out the PWM and speeds and directions, and how to coast to a stop OK.



Is it possible to brake using this configuration, or only possible to brake using one motor? If I send two HI signals simultaneously on either side of the L293D does this basically fry the chip?



Cheers



Dale


DS:

First. Good choice of initial components -- 'F876A, Tamiaya Twin Gear, and L293D. I wish more people would start at this small scale.

Yes, you can brake with the L293D. Just assert both sides of the motor to the same level (i.e. both 1 or both 0) with the enable pin asserted. This most definitely does *not* fry the chip.

Do not worry too much about motor braking. If you stop pulsing the motor, your platorm will stop in a hurry. This is because the Tamiya motors are small and heavily geared. You can verify this by just grabbing the wheel and trying to back drive the motor; it is not easy.

Lastly, the L293D specs. say that you must have Vmotor > Vlogic. Since Vlogic = 5V, Vmotor >= 5V. The Tamiya motors are 3V motors. What this means is that you really do not want to run the motors full tilt with 100% at 5V. Instead run them at 60% at 5V to get an "average" voltage of 3V. If you accidentally run them at 100% at 5V they sound horrible and wear out faster, but no smoke. (I know this from experience ;-)

Have fun,

-Wayne

You didn't say if you are building your own controller or using something off-the-shelf, but those tamiya motors are "extremely" noisy electrically [cheap motors tend to be this way], so you definitely need some extra filtering. I found that a snubber - series R-C filter across the motor with R = 10-100 ohms and C = 0.47 uf - worked good. Also, read the section about the "main capacitor" at the battery terminals of the h-bridge ...

formatting link
The 4QD site has a huge amount of valuable information about designing motor controllers.

- dan michaels

formatting link
=======================

Hi everyone

Thanks for your help chaps.

I was wondering what voltages the Tamiya motor could run at, and found nothing on Tamiya's website. However, the motor has a label "Mabuchi Motor", and sure enough - there is a an excellent spec sheet for the motor! It looks like a FA-130RA-18100 or FA-130RA-14150:

formatting link
The L293D drops ~2V across it, so with 100% duty cycle @ 5V the voltage measured across the motor terminals is ~ 3.2V. Apart from a decoupling capacitor, I guess I don't need a voltage regulator if only 5V is input to the L293D TTL and motor Vin?

Upon previous advice from others, I have already soldered a 0.1uF monolithic ceramic blue-cap across each motor's terminals to help reduce noise from the motors. So I guess I could wire a series resistor @ each motor's power inputs to achieve the RC circuit as suggested?

By the way, I picked up a couple of motors that could replace the Tamiya motors at Dick Smith electronics:

formatting link

and also available @ ( with some specs ):

formatting link

Hi Dan

Thanks for your advice!

The article section on "Main Capacitor" was very interesting. I don't yet fully understand it, but will do this year as I progress through my electrotechnology course.

I don't exactly understand what you mean about building my own controller or an off the shelf job, but I am using a PIC16F876A and a Texas Instruments L293DNE with built in clamp diodes and overheating/overcurent protection. I am programming the PIC myself to control the motors.

The voltage levels of the two DC motors ( nominal ~3V ) are controlled with the 2 PWM ( pins RC1 & RC2 )modules onboard the PIC and connected to the respective ENABLE pins of the L293DNE.

The direction of each motor is controlled by two pins each on Port C.

I recently bought a 'scope from Parallax, and I will use it for the first time soon. Can you suggest what sort of parameters I should be measuring for the motors?

Cheers

Dale

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required