Driving Two DC Motors With an L293D and an Arduino

by NassimBouyacoub in Circuits > Arduino

931 Views, 1 Favorites, 0 Comments

Driving Two DC Motors With an L293D and an Arduino

micro-DC-motor1.jpg

The L293D is a double H-bridge, which means it can be used to control four separate motors (in one direction) with its four channels. By connecting the outputs appropriately, it is possible to form two h-bridge. It is thus possible to control two separate motors, in both directions and independently of one another (which is the case of our tutorial).

What We Need

Arduino Uno ( available here)

L293D ( available here)

Jumpers ( available here)

Breadboard ( available here)

Deux Moteurs DC

The Diagram

5e01a9_cbf5b775d6f8429aad7fd2e7f2a95d82mv2.jpg
5e01a9_b590856f07d84d94aaf8e1551b70d53emv2.jpg

First of all you need to know what are the pins of the L293D

Finally the Code

the code allows you to go back and wait for a second then move forward and wait another second and then turn right and wait one more time then turn right and it starts again.

code here: http://destyy.com/w3CLF1