How to control your robot with an Android phone

What it does?

This walkthrough demonstrate how to control an Arduino based robot from your Android cell phone. Different remote modes can be realized.

  • Directy from your phone
  • With a web browser
  • With Google Talk
  • With another Android phone

 

What is needed?

I will only describe Arduino based robots here. Other robots like Roomba, Lego will be supported. But this is not in the scope of this article.

Hardware:

  • an Arduino based robot.
  • a Bluetooth modem, f.e. Sparkfun Bluetooth Mate
  • an Android phone with Android OS Version 2.2 or Version 2.1  (without video streaming). Older versions are not supported!

Software:

  • Arduino sketch cellbots.pde
  • Cellbots application from Android store
  • Google account for downloading the application and using Google Talk
  • Bambuser account for video streaming from cell phone to the internet

How to adapt your robot

This describes the steps to change the cellbots Arduino sketch to run on your robot.  The sketch can handle different  driven robots. The string 'driveType'  needs to be modified to select the needed motor drive type.

  • 'servo'. For robots with hacked (continous rotating) servos.
  • 'motor'. For robots with  dual h-bridge like L293 without PWM capabilities.
  • 'dfrobot'. For robots with DFrobot motor controller shield with PWM capabilities

Adding your own drive type is straight forward. Just add your own string and add the initialisation and driver code to the sketch.

 

Direct Mode

This is the easiest way to remote control your robot. The Android phone acts as a remote control. You can choose from 4 modes to control your robot.

  • D Pad mode. Only full speed
  • Accelerator Mode. Move your phone in the direction the robot should move
  • Joystick mode. More sensible control with PWM to control the robot wih different speeds.
  • Voice mode. Speak a command into the cell phones microphone and the robot will execute it.

Brain Mode

In brain mode, the Android phone will resist on your robot. Or just lay down the phone nearby the robot. It is possible to stream the cell phone video to a PC or to the Internet (with Bambuser).

 

Remote Control with a web browser

You can control the robot within your local network with a web browser including live video stream.First you will need to create a shared cellbot profile. This can be done by a long press on an existing cellbot direct control profile. You will see a

 

Remote Control with Google Talk

To control the robot with Google Talk you will need to download  the web_client HTML page and modify it with your Bambuser account name to get a live video stream. You will need a second Google account for your robot.

Note: At the moment I don't get a coonection between Google Talk and my robot. Don't know why. It works only one time for me, but the next it didn't work no more, without changing something.

 

Remote Control from another Android phone