Can I connect a motor driver shield to a breadboard which is connected to an arduino?

This is my first ever project with an Arduino and as such I am very inexperienced. I'm trying to connect a ps2 controller to an Arduino to control the motors. I have an L293D motor driver shield (i know I should have gotten a regular motor driver), a breadboard and an Arduino Uno R3.

The Motor Driver diectly goes over the Arduino UNOR3 Board.

1 Like

yeah its just that the pins the motor driver occupy i need to connect the ps2 controller to

If that's true then it doesn't matter how you connect it, it's not going to work.

Which pins do you want to use with the PS2 controller and why? Which other pins could the motor shield use?

First, it uses these pins, second im not too sure how to answer that.

is there a different controller i could connect to this? what methods do i have of controlling motors if i connect the l239d ontop of the arduino

1. What is ps2 controller? How many IO pins or what type of communication protocol (I2C, UART, SPI) you need for it. We will chcek if that pins could be found even the Motor Driver is plugged on UNO.

2. How many Motors you want to connect with the Driver? Are they DC Motors or Servo Motors of type SG90?

Can I connect a motor driver shield to a breadboard which is connected to an arduino?

No,
because it won't fit on the breadboard because of the distance between the pins marked in red.

PS:
image

What Arduino library do you use with the gamepad?

When I saw your diagram, I thought maybe it uses SPI interface, and that's why those pins must be used.

But then I searched for an Arduino library for PS2 gamepads, and the library that I found does not use SPI, and can use any 4 digital pins:

Have you tried this library? Is it the one you use? If so, you can configure it to use any digital pins, including A0-A5 analog pins, which can also be used as digital pins.

Your motor shield has connections for the A0-A5 pins:
L293D-Motor-Driver-Shield-Reset-LED-Resistor-Array-Proto

On this page it says

Six analog pins (A0 to A5), as well as 5V and ground connections, are provided in the bottom right corner. You can populate these with headers, making them useful for connecting various sensors.

You could use some of these connections for your PS2 controller.

1 Like

I cant use pins A0 to A5 as they point down and plug into the arduino. Would buying just a regular l293d driver, plugging it into a breadboard and then connecting the ps2 controller to the arduino work?

Doing this then using the A0-A5 pins slots that are now free to connect the ps2 controller? edit yes thats the library i plan to use

That's why you can use them! Look at the picture I posted and read the link and you will understand.

You can use the following L298 Motor Driver (Fig-1):


Figure-1:

Sorry, im a little confused whats going on here

Sorry im still having a bit of trouble following


I have circled the connections in red. You can connect your PS2 controller to these. The shield connects them to the A0-A5 pins of the Uno. The connections immediately above them provide 5V and ground. You need to solder some male or female headers to these connections. Alternatively you could solder wires directly to these connections, but that might not be very robust and could result in damage to the shield if the wires are violently pulled, which is a possibility given that the Uno is on board a vehicle and the hand-held controller is, well, in your hands!

I would recommend you avoid using A4 & A5 if possible because these these pins are also the SDA &SCL pins of the Uno's i2c interface and could be very useful for adding more components in future like extra I/O pins, sensors, displays etc.

Oh okay thank you very much I will try that

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.