Summary:
This article is to make an android controlled robot or car. It will help you in building an android controlled robot without any experience in android app development by providing you the free android app. This app consists of touch and voice controlling interface of your robot. It is simple to start with downloading the app to your phone/tablet and start building your robot by following steps.
Fig. 1: Prototype of Android Phone based Voice Controlled Arduino Robot
Description:
Prerequisites & Equipment:
You are going to need the following:
-
An Arduino Board or Arduino clone(Here is a guide if you need)
-
Two DC Motors.
-
A 5v TTL -UART Bluetooth module.
-
Robot chassis and wheels which suit your chassis size and motor size.
-
Arduino IDE for the programming.
Working Principle:
The communication between the robot and the android application is carried over by the Bluetooth link between the phone’s Bluetooth and the Bluetooth device in the Robot. The ASCII commands are sent from the phone to the Robot which in turn checked by the Arduino for the control of the wheels according to the commands to move the robot in the desired direction.
Application Design:
The Android app developers generally use JAVA language, but this Android app can also build without knowing the Java language. This app was developed in the online Development Environment which is developed by MIT called “App Inventor”. This app inventor is specially designed for Non-programmers those who don’t know the JAVA language. The app shown below has buttons and all the buttons gives different bytes in the output that has to be sent to the Arduino using Bluetooth for processing. For eg. If we press forward button, the Bluetooth Module will give 1 byte at its output, which is received by the Arduino to process the byte and take necessary action. The app consists of the option to use the Voice Command of the Android phone or to use the buttons to control the Robot. You can find tutorials related to the App inventor in its website.
Fig. 2: Screenshot of Application Design of Android App used to control Voice Controlled Arduino Robot on MIT App Inventor
If you want to edit the application according to your use, here project file of the Application. You can upload this project and utilize it.
Hardware assembly:
Make the circuit as is given by the circuit diagram. Make the robot assembly with your selected parts and connect the motors to the circuit. Optocouplers are used to safeguard the Arduino from High voltage risks.
Fig. 3: Image showing Arduino circuit mounted on Voice Controlled Robot’s body
Note: RX of Arduino should be connected to TX of Bluetooth module and TX of Arduino should be connected to RX of Bluetooth module.
Loading software for Arduino:
If you are new to Arduino you can start with here. You have to start with the Arduino IDE (Integrated Development Environment) from Arduino . Download the code from below link and upload it to the Arduino board.
PLEASE NOTE : SINCE THE BLUETOOTH MODULE IS CONNECTED TO THE SERIAL PINS OF THE ARDUINO, THE MODULE SHOULD BE REMOVED OR POWERED OFF WHILE UPLOADING THE CODE TO THE ARDUINO. THE MODULE CAN BE CONNECTED ONCE THE UPLOAD IS COMPLETED.
Screenshot of Arduino code:
Fig. 4: Image showing Arduino code used to receive voice commands for controlling the Arduino Robot
Downloading the android application and setting up the Bluetooth:
To download the android application to your phone, download the application file from below link and copy the apk file to your phone and then install it. Check whether allowing installation of non-Market apps in one of the settings tab is checked with tick mark. Once you have installed the application, the next step is to connect with your Bluetooth module from your phone. For this, you need to power the Arduino and Bluetooth module and then turn ON the Bluetooth on your phone and make it visible to other devices. After that, search for new devices in Bluetooth, you can find your Bluetooth module from the list, enter the pairing code which is usually ‘1234’ or ‘0000’when prompted .
Note the name of your device, in this case, it is “HC-06″. After pairing with the robot, go to the “EG-ROBO” application and touch the Bluetooth button to select the paired device now the color of the Bluetooth button will be changed for a successful connection. After that the phone will get connected to your robot, and by clicking the respective buttons, the robot will move accordingly. You can also click the voice button for the voice control of the robot. Voice commands are given in the following table.
Application Download
Fig. 5: Screenshot of User Interface of the Android App used in controlling Arduino Robot by passing Voice Commands
Control |
Voice command |
Forward |
‘Go’ |
Backward |
‘Come’ |
Left |
‘Left’ |
Right |
‘Right’ |
Stop |
‘Stop’ |
NOTE: Make sure that you are connected to the internet since voice control uses Google voice Api to get the voice to text result.
Circuit Diagrams
Project Video
Filed Under: Electronic Projects
Filed Under: Electronic Projects
Questions related to this article?
👉Ask and discuss on Electro-Tech-Online.com and EDAboard.com forums.
Tell Us What You Think!!
You must be logged in to post a comment.