Introduction: App Controlled Robotic Arm (Blynk)

About: I'm passionate about building, coding, and space science. Join me as I collect data from near space, build experimental rocket motors, and overengineer solutions to simple problems.

Control your robotic arm with an Android phone for less than $4 using the Blynk app.

After I 3d printed and assembled my EEZYbotARM robotic arm, I needed an effective and easy way to control it. The best method I found was to control it wirelessly using Blynk and my Android device. Blynk is an application for both IOS and Android that connects to your Arduino project via bluetooth, wifi, or ethernet. Check out their website here: Blynk. This is a super easy build. Let's get started!

Watch the build and the robot in action here:

Step 1: Parts and Programs

Needed Hardware

Robotic Arm - This can be any robotic arm. Buy one, print one or build your own. I printed the EEZYbotArm which I would highly recommend.

Arduino Board - I used an Uno, any Arduino compatible board will work.

$4-$25 depending on quality.

4xAA Battery Pack- The Arduino can't provide enough power for all four servos we plan to control. So we use this as an outside power source.

$2

4 SG90 Servos- I used these cheap micro servos. You should use the servos that fit with your robotic arm.

$1.70 each x four servos = $6.80

HC-05 Bluetooth Module- This will allow the wireless connection.

$3

Android Phone- You probably have one of these in your closet. It needs to be able to download apps. No cell service is required.

Breadboard- Used for ground and power connections.

$4

Jumper Wires- For lengthening the servo wires.

$1

Needed Software

Arduino IDE

Blynk App

Needed Libraries

Software Serial

Blynk Library

Step 2: Schematic

Arduino ------- HC-05

D10 ----------- TX

D11 ----------- RX

GND ---------- GND

5V ------------- VCC

Arduino ------ Base Servo

D6 ------------ Signal

Arduino ------ Forward Servo

D7 ------------ Signal

Arduino ------ Up Servo

D8 ------------ Signal

Arduino ------ Claw Servo

D9 ------------ Signal

4AA Battery Pack ------ Servos (All)

Positive ------- Positive

Negative ----- Negative

Arduino ------ 4AA Battery Pack

GND --------- Negative

Step 3: Servos

A servo is a precise motor. We can tell it the exact degree we want it to turn. Learn more about servos here: What is a servo. We are using four servos in this project, but some simple changes to the code can allow you to control more or less servos. The servos are very easy to hook up. Servos have three wires each. The darkest wire is ground or negative. The red, middle wire is power or positive. The yellow wire is signal. Connect the darkest wire to the ground of the breadboard. This is the long section with a blue minus at the top. Connect the red wire to the positive part of the breadboard. Finally, the signal wire for each servo will be connected to the Arduino directly. Attach the signal wires of the four servos to pins D6 through D9.

Step 4: Adding Bluetooth

Bluetooth is a way to transfer information over short distances. Bluetooth doesn't require cell service or internet to be used. In this project, we use the HC-05 unit. Learn more about Bluetooth here: What is Bluetooth. The HC-05 talks to the Arduino using serial communication. The same way the Arduino sends and receives information from the serial monitor. Bluetooth will allow a wireless connection between the Android phone and robotic arm over a short distance.

Step 5: Building the Blynk App

Download the Blynk app from the Google Play store or the Blynk website here: App Download ensure you download for Android as Apple doesn't allow iPhones to be connected to Arduino via bluetooth. Once the app has been downloaded, you will need to create an account. When creating an account register with a real email. Your app will be emailing you your auth token, needed to control the robot.

Follow the steps below to set up your app or watch the video here:

Click "Create New Project".

Name your project. This can be anything, I named mine "roboarm".

Click under "Choose device" where it says "ESP8266".

Scroll through until you reach Arduino Uno.

Click the OK button.

Click under "Connection Type" where it says "WiFi".

Scroll through until you reach "Bluetooth".

Click the OK button.

Click "Create Project".

Click the nut icon.

Click "email" - this will send your auth code to your email. You will need this when coding.

Click anywhere on the dotted screen a secondary screen will appear.

Choose Slider L.

Repeat the process to make three more sliders.

You should now have four sliders.

Click on your first slider.

A secondary screen will appear.

Name the slider "Base" by clicking on where it says "Slider".

Click where it says "Pin".

Select Virtual and then select V3.

Next to where it now says V3 you should see a 0, a line then a 1023 - This represents the range of the slider.

Click where it says 1023 and change it to 180 - A servo can turn 180 degrees.

Click "OK".

Name the next slider "Forward".

Set it as pin V4 and change the range to 0-180.

Click "OK".

Name the next slider "Up".

Set it as pin V5 and change the range to 0-180.

Click "OK".

Name the final slider "Claw".

Set it as pin V6 and change the range to 0-90 - the claw should only open 90 degrees to avoid breaking.

Click "OK".

Click on the dotted screen again and then scroll down on the secondary screen.

Select Bluetooth.

Once the Arduino is ready, we will need to connect the HC-05 bluetooth module to the app.

Congrats, you just made your custom app!

Step 6: Upload the Code

The code uses both the Software Serial and Blynk libraries. Links to both can be found on the parts and programs step. The Blynk library walks you through the installation process. Read this to learn how to install the Software Serial library Install A Library. We use the Software Serial library so that the HC-05 bluetooth module can be connected to pins 10 and 11. The Blynk library allows the Arduino to interact with the Blynk app. The code needs one quick change before it can be uploaded. Your auth token from the app you made needs to be included into the code. When you create your app, Blynk will send you an email with the auth token. Copy and paste it into the code in the line below.

char auth[] = "e7c17d6a8ae446cab9975d01d35e46af";

Once you have made this change, you are ready to go! Plug in your Arduino board, select the correct port and click upload.

Step 7: Putting It All Together

Power on your Arduino. Open up your app and click on the bluetooth module. It will then search for a bluetooth device. It should then show "HC-05" select this and it will prompt you for a password. The password should be 1234. If that does not work, your password is 0000. Once the password in correctly entered, it should say the HC-05 is connected. Make sure both the Arduino is powered and the battery for the servos is on. Click the play button in the top right of your app and you're ready to go!

You now have a way to control your robotic arm wirelessly with an app you created. Show your friends your new robot. Please leave your questions and comments below and vote if you enjoyed!

Microcontroller Contest 2017

Participated in the
Microcontroller Contest 2017

Design Now: In Motion Contest

Participated in the
Design Now: In Motion Contest

Robotics Contest 2017

Participated in the
Robotics Contest 2017