0
\$\begingroup\$

First real project in many years so please accept my apologies of this is a silly question.

I want to use the L293 to drive a motor (or 2). Using a raspberry pi which I have done using the add on Gert board for the raspberry pi and the single h bridge it supports.

Now to start with I have

2 X 12v motor. The raspberry pi needs 5v to power it. And the Gpio pins on the pi are 3v and what I want to control the motors via PWM.

Question is how to wire up the L293 to the power.

12volt goes to vcc2 to power motors.

But vcc1, should this be 5v or the 3volt from the raspberry pi? Or should I have 5volt to vcc1 and the 3volt from the Gpio pins for control. And what about the grounds? Idealy don't want to be pulling any more from the Pi's 3volt rail than needed.

I'm never sure exactly what the vcc1 is for? To power the l293 circuits? as a reference voltage?

Sure this is a basic question but be greatful for some guidance.

\$\endgroup\$
0

1 Answer 1

3
\$\begingroup\$

VCC2 is the motor voltage, you got that right.

VCC1 is the logical supply voltage. You would like that to be 3.3V, because that is the level at which you are controlling the chip, but the datasheet specifies a minimum of 4.5V, so you'll have to tie it to 5V.

This means that the logic 1 level are somewhat lower than the chip was designed for, but according to the datsheet it accepts > 2.3V as 1 (with VCC1 = 5V), so it will probably work.

\$\endgroup\$
5
  • \$\begingroup\$ So then would I need to ground, 12,5 and 3.3 rails all on the chip? \$\endgroup\$
    – DevilWAH
    Apr 11, 2015 at 18:19
  • \$\begingroup\$ (assuming chip=l293) : Why 3.3? \$\endgroup\$ Apr 11, 2015 at 18:25
  • \$\begingroup\$ Because if the raspberry pi Gpio pin goes high and is connect to pin 2,7,10,15. It is high at 3.3v. And this is where my lack of understanding will show, but does it not need a ground? \$\endgroup\$
    – DevilWAH
    Apr 11, 2015 at 18:34
  • \$\begingroup\$ Of course it needs a ground. And 5V for VCC1. ANd the motor voltage for VCC2. And the logic inputs from the Pi. \$\endgroup\$ Apr 11, 2015 at 20:15
  • \$\begingroup\$ When i comes to the logic do i have to apply a state to both pins 2 and 7? I thought a high state was just a voltage above 2.3v, but am i correct in thinking that logic 0 state is ground and logic 1 is any thing above 2.3? So applying 5volt to pin 2 will not work on its own, unless pin 7 is ground to pull it low? \$\endgroup\$
    – DevilWAH
    Apr 21, 2015 at 8:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.