Introduction: Face Tracking Arduino Robot
our new project on robotics based on arduino ...
face tracking arduino robot using two servo motors with arduino...
, in this project we are going to implement face detection by blending in the power of Arduino and Android. In this project, the mobile camera will move along with your face with the help of servos. The advantage of using the Android Mobile Phone here is that you do not need to invest on a camera module and the whole image detection work can be done in the phone itself, you do not need your Arduino connected to your computer for this to work. Here we have used Bluetooth Module with Arduino to communicate with Mobile wirelessly.
The Android application used in this project was created using Processing Android, you can either directly install the application by downloading the APK file (read further for link) or put on your programming app.
By the step of this tutorial you will have a Mini Tilt and Span Robotic Arm that could track your face and move along with it...
now lets go...
Step 1: Components
1:-arduino(Arduino Uno R3 with USB Cable)
5:-hc-05/hc-06 bluetooth module(Robo India RI-106 Hc-05 Bluetooth Module)
*************(if you want to buy this product from amazon with low price,plz click on this components)
Step 2: Circuit Diagram
at 1st..we have to do..
(left and right )servo is connect to 3pin of arduino
(up and down) servo is connect to 5pin of arduino..
bluetooth connection:-we have used bluetooth module hc-05
vcc is connect to +5v
and gnd is connect to gnd
rx pin of bluetooth is connect to 11pin of arduino
tx pin of bluetooth is connect to 12 pin of arduino.
thats easy connection......
Step 3: Setting Up Your Android Application
1:-download the zip file.
2:-take the apk file in your android phone and install it.
3:-Power on the circuit shown above.
4:-If you have named it something else other than “HC-05” change it back to HC-05 since only then the application will work.
5:-Pair with your Bluetooth module with the password “1234” or “0000”.
6:-Now, launch the Application in portrait mode. You should see your camera screen and also “Connected to: HC-05” on the top of your screen.
7:-Try moving your camera over a face and a green box should appear on top of it and its position will also be displayed on the top left corner of your screen as shown below.
Step 4: Uploading the Code
1st copy the code below.. then paste to arduino..
#include //header to drive servo motors
#include // import the serial library
SoftwareSerial cam_BT(12, 11); // RX, TX
int ledpin=13; // led on D13 will show blink on / off
int BluetoothData; // the data given from Computer
//lets declare the servo objects
int pos1 = 40;
int pos2 = 90;
//**Initial position of all four servo motors**//
cam_BT.begin(9600); //start the Bluetooth communication at 9600 baudrate
cam_BT.println("Ready to take commands");
Serial.println("Face tracking programming by CircuitDigest.com");
//***Function for each Servo actions**//
void call(int motor, int num1, int num2) // The values like Motor number , from angle and to angle are received
case 1: // For motor one
Serial.println("Executing motor one");
if(num1num2) // Anti-Clock wise rotation
for ( pos =num1; pos>=num2; pos-=1)
////////JUST DUPLICATE FOR OTHER SERVOS////
case 2: // For motor 2
Serial.println("Executing motor two");
for ( pos =num1; pos>=num2; pos-=1)
if(Serial.available()>0) //Read whats coming in through Serial
Serial.print(" selected Number-> ");
Serial.print(" , ");
Serial.print(" degree , ");
Serial.println(" degree ");
if (cam_BT.available()) //Read whats coming in through Bluetooth
Serial.print("Incoming from BT:");
if (flag ==1) call(gmotor,gnum1,gnum2); //call the respective motor for action
if (BluetoothData==49) //Turn Left
if (BluetoothData==50) //Turn Right
if (BluetoothData==51) //Turn Up
if (BluetoothData==52) //Turn Down
flag=0; BluetoothData=0; }
Step 5: Result
follow this link on you tube for how to build this projects easily...
so..this is our projects of our channel s_r tronics on you tube...
subscribe our channel...and likes also,do comment in inbox..