I am new to Raspberry Pi and I'm trying to connect my Raspberry Pi 4 to an L293D motor driver shield. I have scourged the internet for circuit diagrams but I have only found either L293D IC or L298N but nowhere for the L293D motor driver shield.

Till now the only thing I have figured out is the 4 motor connections (M1, M2, M3, M4) where the motors are supposed to go, and the power supply where I'm supposed to connect the batteries. I am at loss for the rest of it.

A circuit diagram or what pin from the shield goes where in the Pi would be super helpful. Thanks!

Attaching an image [ignore the connection from driver to RPi]. Current connection

  • Can you please share the details of which pin from motor shield is connected to which pin of raspberry pi Commented Apr 18, 2021 at 13:09
  • hi @mohitmayank were you able to fix this? Commented Jun 13, 2021 at 12:10
  • 1
    @Lakshay No I decided to ditch L293D in favour of L298N. L293D is built for Arduino and isn't really convenient to integrate with RPi. Commented Jun 13, 2021 at 18:10

3 Answers 3


The most helpful link on that I found is this one: https://business.tutsplus.com/tutorials/controlling-dc-motors-using-python-with-a-raspberry-pi--cms-20051.

The diagram below shows essentially how the L293D works:

L293D Working Diagram

However, I strongly recommend you use an L298 motor driver instead because the amps out for the L293D is maxed at 600mA (the stall current is much more for dc motors) which might not be enough for the geared motors that I see in the picture, in addition to the fact that the voltage drop on the L293D is much more in comparison to the L298 which would not allow the dc motors to run at full capacity (torque & rpm).

  • 1
    Thanks for your reply. I was particularly asking for connections from the motor driver shield to Pi and not the IC. Thanks for your advice, will buy L298N and try out with that. However, I was following this blog which suggested L293D motor driver. Commented Jul 5, 2020 at 18:05
  • 1
    I am currently working on a similar project that uses the exact same geared motors, and after trying several times I can say safely that L293D motor drivers are utterly useless when you want to use them for a project like a car which will be under load for most of the time, because of their extensive voltage drop and their 600mA current output cap. Commented Jul 6, 2020 at 4:27

Finding the proper connections will only be the start of your journey. You will then have to write the software to control the Arduino shield from the Pi. Unless you are an experienced software engineer I would not pursue connecting the shield to the Pi.

Here is a post I made when I connected the shield to the Pi.

Connect Arduino motor shield to Pi

If I were you I'd pull one of the (socketed) L293Ds from the motor shield and put it in a breadboard. The L233D wiring needed is much simpler.

  • I'd be able to put it on a breadboard if I were not building a robot. Also, coding shouldn't be an issue but looks like it's best and easier to get a L293D or L298N driver and chuck this motor shield. Thanks for your help! Commented Jul 6, 2020 at 12:21

Have you tried cayenne? It's free software for raspberry pi and you can control raspberry pi gpio pins without any code. I use tinker cad to simulate circuits before I actually try them. Hope this helps! (Ps. Just Google cayenne and you should see it.)

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.