Summary:
This article is to make a gesture controlled a robot or car. It will help you in building a gesture based 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 Gesture 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:
When we start thinking about building a Robot first thing which will come to mind is the control of that Robot. In those days, we used wired remote controls to control the robot which is bit complicated and there may be meshed in wires which can become the worst part. Nowadays, we are exposed to Android devices which are powerful mobile computers and they become more and more popular smartphones used worldwide. Because the Java programming language is used in the Android, getting started with the Android API is easy and the API is open and allows easy access to the hardware components. It also provides numerous communication interfaces like USB, Wi-Fi, and Bluetooth, that can be used to connect to our projects.
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.
Fig. 2: Block Diagram of Gesture Controlled Arduino Robot
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 Nonprogrammers those who don’t know the JAVA language. The app shown below has buttons and all the buttons give 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 accelerometer 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. 3: Screenshot of Application Design of the Android App designed for Gesture 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. Note: RX of Arduino should be connected to TX of Bluetooth module and TX of Arduino should be connected to RX of Bluetooth module.
Code description:
In the loop section, we are using a switch case to move the robot according to the commands received from the android application.
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: Screenshot of Arduino Code used for controlling Gesture Controlled Arduino Robot
Downloading the android application and connecting to 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 .
Application Download
Fig. 5: Screenshot of User Interface of Android App used to manoeuvre Gesture Controlled Arduino Robot
Note the name of your device , in this case, it is “HC-06″. After pairing with the robot, go to the “GESTURE-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 tilt your phone to move the robot respectively, tilting the phone in forward will move the robot in forward and etc.
You may also like:
Circuit Diagrams
Project Video
Filed Under: Electronic Projects
Filed Under: Electronic Projects
Questions related to this article?
👉Ask and discuss on EDAboard.com and Electro-Tech-Online.com forums.
Tell Us What You Think!!
You must be logged in to post a comment.