go_away

Author Topic: L293D connected to Arduino  (Read 2587 times)

0 Members and 1 Guest are viewing this topic.

Offline cooldogTopic starter

  • Supreme Robot
  • *****
  • Posts: 751
  • Helpful? 4
  • be nice to nerds, one day they will be your boss
L293D connected to Arduino
« on: December 17, 2010, 09:42:16 PM »
Hey guys,

So ill get right down to the point.
I cant seems to find the answers to my questions on google about the L293D motor driver.

I want to connect 2 motors to the chip, then hook the chip to the Arduino. the Logic Voltage is going to come from the Arduino and the motor power is going to come from a 9V battery.



So i get that Pins 2, 7, 10, 15 are for controlling the motor and have to go to the Arduino, and that Pins 3, 6, 11, 14 are for the motors.

But what i don't get is:

What are the "enable" pins for? what what do i have to put to them.
What GND's go where? Because the Vss has to have a ground for the logic voltage, and the motor battery has to have a ground. So what Grounds go where?
Do i have it right that Vss is my logic voltage (5V) and Vs is the motor battery?(9V)

Thanks alot,
cooldog
robot will rule the world and i will be building them
-admin

favorite web sites
http://www.societyofrobots.com/
http://www.instructables.com/

Offline rbtying

  • Supreme Robot
  • *****
  • Posts: 452
  • Helpful? 31
Re: L293D connected to Arduino
« Reply #1 on: December 18, 2010, 01:02:21 AM »
All grounds should be common (connected together).  Enable pins are +V_logic for on, and ground for off.  You can PWM these for speed control.

Offline dunk

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 1,086
  • Helpful? 21
Re: L293D connected to Arduino
« Reply #2 on: December 18, 2010, 04:43:07 AM »
hi Cooldog,
the first place to look for this sort of thing is the component's Datasheet.
every component produced has a datasheet and most of them show you a few typical application examples.

on page 9, figure 5 of http://focus.ti.com/general/docs/lit/getliterature.tsp?genericPartNumber=l293&fileType=pdf&track=no
you can see a diagram of what you are trying to do.


also as rbtying says,
you always need to connect all the GNDs together.
this is true for all digital electronics unless you are trying to do something weird.
the GND is the common reference point from which the positive voltages are derived so it must be the same at all points on your circuit.


dunk.

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: L293D connected to Arduino
« Reply #3 on: December 18, 2010, 06:00:19 AM »
Hi,

Enable pins [...] You can PWM these for speed control.
Using the enable pins for PWM is not a good solution, as they are much slower than the input pins, where the PWM ought to go - to the lower switching element in the bridge, to be precise.
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline cooldogTopic starter

  • Supreme Robot
  • *****
  • Posts: 751
  • Helpful? 4
  • be nice to nerds, one day they will be your boss
Re: L293D connected to Arduino
« Reply #4 on: December 18, 2010, 06:47:31 AM »
okay thanks alot guys, i just needed to clear that up.
robot will rule the world and i will be building them
-admin

favorite web sites
http://www.societyofrobots.com/
http://www.instructables.com/

Offline cooldogTopic starter

  • Supreme Robot
  • *****
  • Posts: 751
  • Helpful? 4
  • be nice to nerds, one day they will be your boss
Re: L293D connected to Arduino
« Reply #5 on: December 18, 2010, 07:27:42 AM »
Can you check my schematic then? i think i figured it out.

robot will rule the world and i will be building them
-admin

favorite web sites
http://www.societyofrobots.com/
http://www.instructables.com/

Offline VegaObscura

  • Robot Overlord
  • ****
  • Posts: 153
  • Helpful? 6
Re: L293D connected to Arduino
« Reply #6 on: December 18, 2010, 08:44:33 AM »
Can someone explain why IC chips tend to have multiple GND pins?  Would it be so hard to connect them all internally and have just one GND pin?

Offline rbtying

  • Supreme Robot
  • *****
  • Posts: 452
  • Helpful? 31
Re: L293D connected to Arduino
« Reply #7 on: December 18, 2010, 11:56:56 AM »
Hi,

Enable pins [...] You can PWM these for speed control.
Using the enable pins for PWM is not a good solution, as they are much slower than the input pins, where the PWM ought to go - to the lower switching element in the bridge, to be precise.

Using enable pins reduces the number of PWM outputs you need, and OP is using an Arduino, where the PWM pins are randomly arranged around the board: four PWM outputs to the IC could easily become messy.

Offline waltr

  • Supreme Robot
  • *****
  • Posts: 1,941
  • Helpful? 98
Re: L293D connected to Arduino
« Reply #8 on: December 18, 2010, 01:05:59 PM »
Can someone explain why IC chips tend to have multiple GND pins?  Would it be so hard to connect them all internally and have just one GND pin?
There are various reasons. On the L293 the 4 GND pins are for transferring heat out of the chip (heat sinking) as well as providing a separate, low impedance path for the motor currents which can be quite high and have high frequencies.
A separate ground connection for the internal logic allows for a PCB layout that separates the current path for the motor and the logic. These would be connected together a one point but near the power supply. This to prevent the high motor currents for interfering with any of the low current logic.

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: L293D connected to Arduino
« Reply #9 on: December 21, 2010, 03:35:46 AM »
hI,

Can you check my schematic then? i think i figured it out.
Seems fine, except you have to figure out how to get DC through C1  ;)

I'd imagine that placing C1 between power and ground would make your life a lot easier.
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: L293D connected to Arduino
« Reply #10 on: December 21, 2010, 03:41:09 AM »
Hi,

Hi,

Enable pins [...] You can PWM these for speed control.
Using the enable pins for PWM is not a good solution, as they are much slower than the input pins, where the PWM ought to go - to the lower switching element in the bridge, to be precise.

Using enable pins reduces the number of PWM outputs you need, and OP is using an Arduino, where the PWM pins are randomly arranged around the board: four PWM outputs to the IC could easily become messy.
Oh well, that's a wiring problem and should be solved by good wiring techniques. It's not ground for making bad design decisions.

Besides, there's no need for extra PWM's here, as you'd just AND the PWM signal to the regular output.
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

 


Get Your Ad Here