Control a motor with a Tablet and an Arduino Uno

Written by: admin@makezilla

Control your inventions with Android Tablets! This tutorial goes through a demo of getting an Android tablet to send serial commands to an Arduino board and having the board turn a motor on and off.

Step 1: Things You will Need

  1. Android (4+) tablet with a USB port.
  2. Arduino Uno Board
  3. DC 5V Stepper Motor (This demo uses Kootek® DC 5V 4-Phase 5-Wire Arduino Stepper Step Motor with ULN2003 Driver Test Module Board)
  4. 6 male-female cable wires
  5. A USB cable to connect the Arduino and Android Tablet

Step 2: Wire up your Arduino Uno Board to the Motor

For motors the typical signal pins are 8,9,10 and 11 so we will use those.

Arduino / Motor Driver Wiring Table

5v +
8 1N
9 2N
10 3N
11 4N

Step 3: Program the Arduino

  1. Download and install the Arduino SDK.
  2. Download the MotorControl Arduino Code available here:
  3. Connect your arduino to your computer and upload the code.
  4. (Optional) To confirm it is working, open a serial monitor window (Ctrl+Shft+M) at a 9600 baud rate. Type motoron to start the motor andmotoroff to turn it off.

Step 4: Make an App for the tablet.

  1. Download the Android SDK and Eclipse (if you don't already have it) and set the tablet to debug mode.
  2. Clone the Motor Control App source code from here:
  3. Install on to your tablet and run.
  4. Connect the tablet and the Arduino Uno Board through USB. (If the Arduino does not turn on then it is not recieving power through the usb- It will need to have its own power cable plugged in)