go away spammer

Author Topic: [Solved] l293d problem  (Read 5567 times)

0 Members and 1 Guest are viewing this topic.

Offline greasemonkey94Topic starter

  • Jr. Member
  • **
  • Posts: 29
  • Helpful? 1
[Solved] l293d problem
« on: January 29, 2011, 10:15:21 AM »
Hello,

While im waiting for my microcontroller to arrive, i thought ill get my motor circuit ready and fired up.
Im using the l293dne. Im assuming its pin for pin compatible with l293d.

Here are the parts im using

1 12V 900 mAh NiCd battery pack from an RC toy.
2 12V 250mA stall current DC motors.
1 l293dne.
there is a 7805 voltage regulator that provides 5V logic voltage for the l293dne.




There is the pinout diagram im using.

I first tried it with just 1 motor and just to be on the safe side, im using 5v for the motor voltage as well.
I tried the motor with a 5v supply and it works.
Here are the connections i made

Pin 1- +5V
Pin 2- +5V
Pin 3- Motor
Pin 4- GND
Pin 5- GND
Pin 6- Motor
Pin 7- not connected to anything
pin 8- +5V
Pin 16- +5V

rest of the pins are not connected.

The +5V regulator works perfectly and supplies 5.03V which is measured using a multimeter.

Pins 2,7,15,10 should be supplied with a high pulse from the microcontroller to turn the motors. I connected the enable pin to +5V. Since i didnt have my controller,  I connected
pin 2 directly to +5V which i thought was essentially the same thing as providing a high signal, But nothing happened, the motor stayed still. .Then i connected pin 13 and 12 to gnd and still nothing happened?

1)Am i doing something wrong??
2)Can i connect pin 2 directly to +5V to simulate a high signal from the microcontroller?
3)Is there something wrong with the chip? is it damaged or something like that?

sorry for the long post, I tried to give all the details possible.

Thanks for the help.
« Last Edit: January 29, 2011, 09:39:02 PM by greasemonkey94 »

Offline waltr

  • Supreme Robot
  • *****
  • Posts: 1,944
  • Helpful? 99
Re: l293d problem
« Reply #1 on: January 29, 2011, 10:34:35 AM »
You do need pin 7 connected.
Look at the logic table in the data sheet and ensure that none of the signals need to be low instead of high.

Offline greasemonkey94Topic starter

  • Jr. Member
  • **
  • Posts: 29
  • Helpful? 1
Re: l293d problem
« Reply #2 on: January 29, 2011, 11:35:53 AM »
Thanks for the reply,

How should i connect pin 7??
For it to be low do i just connect to ground?

Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,165
  • Helpful? 111
    • Webbot stuff
Re: l293d problem
« Reply #3 on: January 29, 2011, 01:48:39 PM »
Pin 7 should be the opposite of pin 2, so if pin2=+5v then pin7=Gnd. Swap them over ie pin2=Gnd and pin7=5v then the motor will turn the other way. By using PWM to pin1 then you can use this to set the speed - but connect to +5v for now to say 'full speed'.

EDIT: if pin 2 and pin 7 are the same level - then it will cause the motor to brake. If you are using WebbotLib and Project Designer then add your device in Project Designer as the L293 (3 pin) - as there are 3 pins per motor - and it will do all the PWM stuff for you,
« Last Edit: January 29, 2011, 01:59:29 PM by Webbot »
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline greasemonkey94Topic starter

  • Jr. Member
  • **
  • Posts: 29
  • Helpful? 1
Re: [Solved] l293d problem
« Reply #4 on: January 29, 2011, 09:40:26 PM »
Thanks to both of you, its solved ;D.
I needed to connect pin 7 to gnd :-[.

 


Get Your Ad Here