Introduction: How to Build an L293D Motor Board Controller for Arduino
I am working on a small robot that can be controlled by an Arduino using wireless communications. But I was discouraged by the number of wires running from the Arduino and the breadboard. So I decided to reduce the number of wires by making my own motor controller board. The result was promising, it reduced the number of wires by half.
I wanted to control 4 small DC motors, so I opted for the L293D chip. I used two of those chips to control 4 motors, each chip can control 2 DC motors.
I will explain in details how to connect the two chips together to run 4 DC motors.
Step 1: Materials You Need for This Project
- 2 L293D IC chips
- 2 DIP IC Sockets
- Pin Headers
- PCB board
- 2 Screw terminals 4 pins each
- Solder Iron
- And lots of patience (picture not included)
Step 2: Lets Understand How to Wire a Single L293D Chip
The pictures are done by me with the help of Firtzing and a photo editor.
The first picture shows how the L293D pins are numbered.
Start by connecting all the pins that need the 5V from the Arduino, connect pins 1, 16 and 9 together then connect them to the +5V (Vcc) on the Arduino. (picture 2 - red wiring)
The next step is to connect the ground pins together. Connect pins 4, 5, 12 and 13 together then connect them to the GND pin on the Arduino. (picture 3, black wiring)
Next you want to connect the motor pins. Pins 3 and 6 control one motor (motor A) and pins 14 and 11 control the second motor (motor B). (The 4th picture)
Now connect the Pins 2 and 7 to the digital pins on the Arduino, they will used to send commands to Motor A. And pins 10 and 15 should also connect to the digital pins on the Arduino to control Motor B. (Picture 5)
What is left is to power up the chip. In order to do so, connect pin 8 to the external power source's +ve end,
AKA battery (on my robot, I used 4 AA Batteries = 6V), then connect the -ve end of the power source to the GND on the Arduino (common ground).
Step 3: How to Connect Two L293D Chips
Armed with the knowledge of the previous step, we will connect two L293D chips together to control 4 motors, A, B, C, and D using a single power source or battery.
We will connect all the pins that need +5V from the Arduino together then connect them all to the VCC on the Arduino.
We will do the same thing for the ground pins. Connect them all together 8 pins in total and use one wire to connect them to the GND pin on the Arduino.
To connect the Power, first connect pin 8 from the fist L293D to pin 8 on the second L293D then connect them to the +ve end of the battery then ground the battery on the GND pin on the Arduino.
Step 4: Make the Board
Place the components on the board without soldering anything.
When you are satisfied, turn it around and start soldering.
It will get confusing and overwhelming, but to help you out, draw the pin connections on a piece of paper backwards. Then go over the drawing few times to make sure it is accurate. Then start soldering according the drawing you made.
And make sure to label the board.
The bottom of the PC board looks like spaghetti, but these are wires that are hidden and it makes a cleaner finish on the robot.
I hope this helps someone