3
\$\begingroup\$

I have the following Schematic Breadboard

When i turn

GPIO 17: high
GPIO 22: high
GPIO 27: low

or

GPIO 17: low
GPIO 22: high
GPIO 27: high

nothing happens, what have i done wrong?

I have verified that all GPIO 17, 22 and 27 work by connecting them to a Diode and a 330 ohm resistor and they light up correctly.

Also if i connect the battery directly to the motor it starts spinning as expected.

(Any idea how i can debug this, i have tried to check all connections with a multimeter without finding anything wrong)

i have tried with both a L293DNE and a chip that just says L293D.

http://fritzing.org/projects/raspberry-pi-zero-l293d

\$\endgroup\$
24
  • 2
    \$\begingroup\$ The L293, L298, etc are terrible choices for low voltage systems. Use an FET driver. \$\endgroup\$ Commented Mar 5, 2018 at 20:54
  • 2
    \$\begingroup\$ Tips on using an L293D on low voltages (basically don't) \$\endgroup\$
    – Andy aka
    Commented Mar 5, 2018 at 21:06
  • 1
    \$\begingroup\$ @Sparky256 presumably the pi is power the logic side of the L293, as distinct from the motor side. \$\endgroup\$ Commented Mar 5, 2018 at 22:24
  • 1
    \$\begingroup\$ @ChrisStratton. That is understood Chris. It shows up on the diagram. But it sure seems like the OP missed a connection somewhere. \$\endgroup\$
    – user105652
    Commented Mar 5, 2018 at 22:30
  • 1
    \$\begingroup\$ I used 20 kpa of L293D for a design in 1991 and it was an inefficient chip that'd had its day back then. But costs were critical and there was nothing cheaper. Fortunately, there's plenty of cheap and better alternatives these days. Look at something like DRV8837 H Bridge, which will run off 6 V, drive 1.8 A and has 0.56 R output resistance for under a quid a go. Not a DIP package but you can solder short flying leads on its 8 pins. \$\endgroup\$
    – TonyM
    Commented Mar 5, 2018 at 22:34

1 Answer 1

1
\$\begingroup\$

Run En1 (l293D pin 1) to PWM pin (pin 12 / BCM18)

Then switch pins 17/27 as you are using a PWM module after enabling it https://blog.oddbit.com/post/2017-09-26-some-notes-on-pwm-on-the-raspb/ c

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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