Create an Android Controlled Robot Using the Arduino Platform
Ever wanted to make an Android controlled robot or car? Control your RC car with a smartphone? Or wanted a tutorial about connected devices and getting started with it? Now you can do that with this simple DIY hack that even provides you with a free Android application, thus it doesn’t require you to have any experience in Android application programming. Download the free application to your phone and start controlling your robot. Have fun with this DIY hacking tutorial!
- Arduino / Arduino Clone or make your own custom Arduino board.
- Two continuous rotation servo motors like this: Continuous rotation servo
- A 5v TTL -UART Bluetooth module like: JY-MCU BT_BOARD (Cheaper) or Bluesmirf Gold/Silver
- Ball caster
- Two robot wheels like this, select wheels after checking if they fit in the servo: Robot wheels
- Chassis, usually a small acrylic board will do.
- Four AA Duracell batteries and battery holder.
- Arduino IDE
- Eclipse for android programming (optional, not required). For instructions on installing and setting up the environment, read How to install android and eclipse and tutorials to begin learning Android programming even though you don’t require it for this project.
How Does it Work?
The Android application controlled robot communicates via Bluetooth to the Bluetooth module present on the robot. While pressing each button on the application, corresponding commands are sent via Bluetooth to the robot. The commands that are sent are in the form of ASCII. The Arduino on the robot then checks the command received with its previously defined commands and controls the servo motors depending on the command received to cause it to move forward, backward, left, right or to stop. Thus allowing us to create an Android controlled robot. Basic block diagram:
Assembling the Components for the Android Controlled Robot
Take the piece of acrylic board and stick the servo motors to the left and right edges using hot glue/super glue. Then attach the ball caster. On the top side, stick the Arduino board using double sided tape, do the same for the battery holder.
Setting up the connections for the Android Controlled Robot
Setup the hardware connections with the Arduino and the servo motors. The continuous rotation servo motors are those kinds of servo motors that cannot be controlled or set at a particular angle, unlike normal servos. Servos have three wires coming from them: Red- Power, Black -Ground, White/Yellow- PWM /PPM Signal. The left servo motor (white/yellow wire) is hooked up to Arduino digital pin 9 and the right servo motor (white/yellow wire) Arduino digital pin 10. The black wires of both the motors are connected to Arduino GND and the Red wires to the positive terminal of the battery holder. Connect the RX pin of the Bluetooth module to TX pin (digital pin 1) on the Arduino and the TX pin on the module to the RX pin on the Arduino (pin 0). Connect Vcc and Gnd of the module to the Arduino. Connect the negative terminal of the battery holder to Arduino GND. The connections will look like this: