# Which USB interface for Android device I can use for motor driver

I am new to robotics, I will be controlling DC motors from Android device through USB

For this I have selected L298N motor controller(After watching YouTube videos ) And got some DC motors

I have no idea how do I connect this to Android device via USB cable

Help appreciated

PS: All I know is programming android

What you want cannot be simply done by using an Android device and a USB cable. You will need a micro controller to process the instruction sent from your mobile device and then control the motor movement.

The android device will communicate to the arduino using say Bluetooth(although there are many other alternatives you can select), the arduino will process your instruction sent over bluetooth and then as per your logic it will drive the motor.

To control L298N a single motor using L298N you will use the input terminals 1&2. These will be connected to your micro controller. The motor terminals will be connected to the Output 1 & 2. Check this image of a micro controller being connected to a motor driver.

L298N is usually used for motors which have a higher current requirement, thus you will also have to look for alternate power supply arrangements too.

P.S. If your motors don't require a lot of power you may consider using L293D which is simpler to use than L298N.

• Thanks, means I should connect Android device=>Arduino=>Motor controller=>DC motor? This way can android program directly control the motor movement? Nov 22, 2015 at 14:16
• I have to write 2 programs to control dc motor java for android & then programming c++ arduino Nov 22, 2015 at 14:30
• @NitinSawant Yes Nov 22, 2015 at 15:12

You can control DC motors from an Android device without a separate micro controller. The two ways I've seen this done are through a USB to parallel printer cable or through a headphone jack. Read more about these approaches at http://terakuhn.weebly.com/phone_usb_controller.html and https://makezine.com/projects/make-34/smartphone-servo/ respectively. However, I'm not familiar with the L298N motor controller so I'm not sure if you could use that with either of these approaches.