Bluetooth Joystick Pan/Tilt Controller

8,271

46

9

Introduction: Bluetooth Joystick Pan/Tilt Controller

About: fb @ geeameal

By Jay Amiel Ajoc
Gensan PH

Good day! This'll help you build your own pan & tilt platform controlled from a smartphone via Bluetooth.

What you'll need:

Hardware
1. Arduino Uno
2. HC-05 Bluetooth Module
3. 2 Servo Motors (SG-5010) or any servo
4. Aluminum Sheets
5. Epoxy or Bolts & Nuts
6. 5V power source (powerbank)
7. Camera (optional)
8. Boost converter (optional, to power the camera)

Software
1. Arduino IDE
2. SketchUp (if you intend to 3D print the platform)
3. MIT App Inventor

Step 1: Building the Pan & Tilt Platform

For the pan & tilt platform, head over to this site and download the SketchUp file:
https://grabcad.com/library/pan-tilt-mechanism

OR

You may trace the patterns above onto an aluminum sheet.

Make the necessary cuts/holes.

You may need a bit of force to bend the sheets to the desired angle.

After that, glue the servo motors in place using epoxy.

Or you may use bolts & nuts to make it look neater.

Step 2: Developing the Android APP Using App Inventor 2

For the android app, I have a step-by-step video about it on YouTube.
STEP-BY-STEP VIDEO CLICK HERE.

OR

You may just download this:
JOYSTICK APK

Step 3: Uploading the Arduino Code

Plug in your Arduino board and upload this code.

#include <Servo.h>

Servo panServo, tiltServo;

void setup() {

panServo.attach(9);

tiltServo.attach(6);

Serial.begin(38400); }

void loop() {

if(Serial.available()>= 2 ) {

unsigned int servopos = Serial.read();

unsigned int servopos1 = Serial.read();

unsigned int realservo = (servopos1 *256) + servopos;

Serial.println (realservo);

if (realservo >= 550 && realservo <750){

int servo1 = realservo;

servo1 = map(servo1,550,750,10,170);

panServo.write(servo1);

Serial.println(servo1);

delay(10);

}

if (realservo >= 250 && realservo <450){

int servo2 = realservo;

servo2 = map(servo2,250,450,170,10);

tiltServo.write(servo2);

Serial.println(servo2);

delay(10);

}

}

}

Step 4: Wiring Diagram

Step 5:

Photography Contest 2017

Participated in the
Photography Contest 2017

Microcontroller Contest 2017

Participated in the
Microcontroller Contest 2017

Robotics Contest 2017

Participated in the
Robotics Contest 2017

Be the First to Share

    Recommendations

    • Battery Powered Contest

      Battery Powered Contest
    • Plywood Challenge

      Plywood Challenge
    • Plastic Contest

      Plastic Contest

    9 Discussions

    0
    ErwinM5
    ErwinM5

    Question 2 months ago

    i can open the joystick app , can you help my please

    0
    ErwinM5
    ErwinM5

    Question 2 years ago

    The joystick apk does not work, the connection with the bluetooth works but it does not happen when you move the red circle

    The video is to fast for me

    Can you help me please

    Kind regards

    0
    ramsinghm
    ramsinghm

    2 years ago

    Hey I want to make 2 joysticks one for 2 servos anther ine for another two servos please help me how can I do

    0
    oscarlorente7
    oscarlorente7

    2 years ago

    Hey! How is your HC-05 module configured? Baud rate? Parity bits?

    Thanks.

    0
    geeameal
    geeameal

    3 years ago

    Please vote! Ty guys! :D

    0
    DIY Hacks and How Tos

    Cool. This would be a great way to make an automated webcam for a diy weather station.

    0
    geeameal
    geeameal

    Reply 3 years ago

    Thanks!

    0
    snoop911
    snoop911

    3 years ago

    How would you create an android app that continuously gets the status from an arduino and then displays it?

    0
    geeameal
    geeameal

    Reply 3 years ago

    what exactly do you want to build sir?