1

Two of the pins on the l293d are labeled VS and VSS. Apparently they are both power. Here it shows VS being supplied with 12V, while vss is receiving 5V. Here, it shows both receiving 6V from the same source of 4AAs. What are each of these for? Also, in the second link, he shows wiring to the ground on the arduino, why is that? Wouldn't he be able to do the same by wiring to the negative terminals on the batteries?

a sandwhich
  • 392
  • 5
  • 16

1 Answers1

3

One is logic power (pin 16 (20 for SMD) at top right,should be 5v or whatever your logic level is), the other is motor power (pin 8 (10 for SMD), bottom left, can be from 4-36v and should be whatever your motor needs).

This means you can run your motors at different voltage, and also isolates power spikes from the motor supply from the logic.

Have a look at the bipolar stepper motor example circuit here: http://www.tigoe.net/pcomp/code/circuits/motors/stepper-motors (The circuit says SN754410NE, that device is just a higher power version of the L293).

Christopher Biggs
  • 1,486
  • 7
  • 7
  • Is it necessary to differentiate the two power sources if you have a smoothing capacitor like the one in the second link? Also the l293d only has 16 pins, so by 10 and 20, would you be referencing 8 as 10 and 16 as 20? – a sandwhich Apr 04 '11 at 23:15
  • Whoops, the L293 has 16 pins in PDIP. The SMD version is 20 pin. – Christopher Biggs Apr 05 '11 at 00:34
  • If you have well regulated power and you're running your motor at the same level as logic, combining the pins is fine. – Christopher Biggs Apr 05 '11 at 00:35
  • And I am assuming the logic is referring to allowing the l293d to operate. So, could I use a 6V battery pack as the power source for pin 8 and then just wire the 5V from an arduino to the logic? Thank you. – a sandwhich Apr 05 '11 at 00:41
  • Also, why does he include the ground rail from the arduino in the circuit? – a sandwhich Apr 05 '11 at 00:51
  • And one last question, how does putting a smoothing capacitor in between the 6V and the ground smooth out the voltage spikes that would damage the l293d? – a sandwhich Apr 05 '11 at 03:05
  • All the logic has to have a common ground, otherwise 5v out from the arduino might not look like 5v in at the L293. This is true in any logic interfacing. The L293's design requires also that the motor supply shares a common ground with the logic. It *is* possible to make fully isolated H-bridges, but with *this* chip, use a common ground. – Christopher Biggs Apr 05 '11 at 22:47
  • To be absolutely clear, connecting 5v+GND from arduino to logic power, and connecting 6v battery to motor power (and GND) will work. This is how the chip is intended to be used. Also, here is some more info on decoupling capacitors: http://electronics.stackexchange.com/questions/2272/what-is-a-decoupling-capacitor-and-how-do-i-know-if-i-need-one – Christopher Biggs Apr 05 '11 at 22:52
  • Ok. So he creates this common ground that is shared by both the motor and logic by adding both the ground for the batteries and the arduinos ground. If the decoupling capacitor is stuck directly between the battery pack + and -, how does it protect the voltage spikes from going to the arduino ground? – a sandwhich Apr 05 '11 at 22:58
  • I just built the circuit shown in the image below and it ran correctly this time. There isn't a smoothing cap, is that ok? If not, where should I add it? http://dl.dropbox.com/u/10949404/P1010132.JPG – a sandwhich Apr 06 '11 at 21:29