I've got an L293D Motor Driver chip powered by 4.5v via some batteries and am trying to send high signals via the GPIO library in Python to control a motor, however this does not seem to work. My code is simply (pin 4 being GPIO 4 -- physical pin 7, my input pin):

import RPi.GPIO as gpio
gpio.setup(4, gpio.OUT)
gpio.output(4, gpio.HIGH)

Now, this works for a single LED, but doesn't when I connect a wire (as the input) from pin 2, 7, 10 or 15 (the inputs).

The chip and motors do work, as if I manually take the inputs to high/low, they turn appropriately.

I presume it is not working because of the power supply voltage differences -- the motor circuit might not recognize the lower HIGH voltage from the Pi as being HIGH...?

What can I do to make this work?

L293D pinout:

enter image description here


2 Answers 2


It's always worth double checking the connections if a circuit doesn't work.

Remember that you also need to connect a Pi ground to an external device you want to control from a Pi GPIO. WIthout the ground there will be no return path for the control signal.


You need common ground as @joan says. A pull-up resistor may be needed if the driver chip isn't grok king 3v3 as "high". Test the motor driver with 3v input with a jumper lead.


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.