ESP32-Powered Robot arm control with Blynk app

Hello and welcome back. In this project, we will learn how to make a WiFi-controlled robot arm using the ESP32 board. For that, I used the Blynk Cloud to control this robot arm easily. I used the 4DOF robot arm kit for this project. You can buy it at a cheap price from our shop. In this setup, I used four servo motors to move the arm joints. Then, I created a simple Blynk interface using sliders to control each motor. So, you can fully control this robot arm using your phone.
Also, you can control it using a computer from anywhere in the world. For this project, I also designed a custom PCB with JLCPCB to make the wiring part neat and easy to connect everything. If you want, you can also make a simple web server using the ESP32 board. That way, you don’t need Blynk and can control the robot arm through your browser. If you’re a beginner with Blynk Cloud, please use this link to learn more.
Ok, let’s do this project step by step. The required components are given below.
- Robot arm kit x 1 — Our Store / Amazon
- ESP32 DEVKIT V1 board — Our store / Amazon
- Servo motor x 4 — Our Store / Amazon
- Male header x 1 — Our Store / Amazon
- Female header x 1 — Our store / Amazon
- Barrel jack socket x 1 — Our store / Amazon
- 100-ohm Resistor x 1 — Our Store / Amazon
- 3mm LED x 1 — Our store / Amazon
Disclosure: These Amazon links are Affiliate links. As an Amazon Associate, I earn from qualifying purchases.
Step 1
Firstly, let’s identify the components used in this project.







Step 2
Secondly, let’s order the PCBs for this robot arm control project.


- Click the “Instant Quote” button and upload the Gerber file, which you can download from the link below.
- Gerber file – Download
- For this project, I ordered five Purple PCBs. Next, select the build time and shipping method. Finally, click “Save to Cart” and complete the payment.




Step 3
Thirdly, unbox your PCB package and check the quality.




Step 4
Now, solder the components one by one onto the PCB.



Step 5
Ok, now let’s build up the robot arm. For that, follow the steps in this article.
- Robot Arm — Click on me
Step 6
Next, connect the ESP32 board to the PCB. After that, connect all the servo motors to their correct pins on the PCB.
- S1 — Base servo
- S2 — Left servo
- S3 — Right servo
- S4 — Finger servo



Step 7
Afterward, connect the ESP32 board to your computer. Now, let’s set up the Blynk Cloud to control this robot arm.
- First, go to the Blynk website and log in to your account. If you don’t have an account yet, create a new one using your email. Then, create a new template for this project. I named mine “Robot Arm”.


- Now, create four datastreams for controlling the motors. For that, use the details given below.
- Virtual Pin –> Name — servo 1 / PIN — V0 / MIN — 0 / MAX — 180
- Virtual Pin –> Name — servo 2 / PIN — V1 / MIN — 0 / MAX — 180
- Virtual Pin –> Name — servo 3 / PIN — V2 / MIN — 0 / MAX — 180
- Virtual Pin –> Name — servo 4 / PIN — V3 / MIN — 0 / MAX — 180





- Next, create a dashboard. For that, I used four slider widgets. Then, click the gear icon on each widget one by one and select the datastreams we created earlier. Also, make sure to turn off the “Send value on release only” checkbox for smoother control. Finally, click the save button.








- Then, click the Device tab and create a new device. For that, select the template we created earlier. After that, you’ll see the Blynk device info such as the Auth Token, Template ID, and Device Name.




Step 8
Next, copy and paste the following program into the Arduino IDE.
- Code and Gerber file — Download
#define BLYNK_TEMPLATE_ID "**************" // <-- Replace with your actual Template ID
#define BLYNK_TEMPLATE_NAME "************" // <-- Replace with your actual Template Name
#define BLYNK_AUTH_TOKEN "***************" // <-- Replace with your actual Auth Token
#include <WiFi.h>
#include <BlynkSimpleEsp32.h>
#include <ESP32Servo.h>
// WiFi credentials
char ssid[] = "**********";
char pass[] = "**********";
// Servo objects
Servo servo1, servo2, servo3, servo4;
// Current angles
int angle1 = 90, angle2 = 90, angle3 = 90, angle4 = 90;
BlynkTimer timer;
void setup() {
Serial.begin(115200);
// Attach servos
servo1.attach(13);
servo2.attach(12);
servo3.attach(14);
servo4.attach(27);
// Set all servos to 90° (neutral)
servo1.write(angle1);
servo2.write(angle2);
servo3.write(angle3);
servo4.write(angle4);
// Connect to Blynk
Blynk.begin(BLYNK_AUTH_TOKEN, ssid, pass, "blynk.cloud", 80);
}
// Smooth movement function
void smoothMove(Servo &servo, int ¤tAngle, int targetAngle) {
if (currentAngle == targetAngle) return;
int step = (targetAngle > currentAngle) ? 1 : -1;
for (int pos = currentAngle; pos != targetAngle; pos += step) {
servo.write(pos);
delay(10); // Adjust for smoothness
}
currentAngle = targetAngle;
}
// Blynk controls
BLYNK_WRITE(V0) {
int value = param.asInt();
smoothMove(servo1, angle1, value);
}
BLYNK_WRITE(V1) {
int value = param.asInt();
smoothMove(servo2, angle2, value);
}
BLYNK_WRITE(V2) {
int value = param.asInt();
smoothMove(servo3, angle3, value);
}
BLYNK_WRITE(V3) {
int value = param.asInt();
smoothMove(servo4, angle4, value);
}
void loop() {
Blynk.run();
timer.run();
}- Now, copy and paste the Blynk details into the code. Then, enter your WiFi SSID and password to connect the ESP32 board to the internet.



- Then, select the correct board (ESP32) and the port in the Arduino IDE. After that, click the Upload button to upload the code to your ESP32 board.



Step 9
Now, let’s set up the Blynk mobile app. For that, download and install the Blynk app from the App Store or the Play Store. Then, log in to your account and select the template we created earlier on the web dashboard.
- Next, open the widget box and add four sliders to the dashboard. Then, you can customize them as you.

- Now, click each widget one by one, select the correct datastream, and turn off the “Send on release” option. You can also change the colors to match your style.


Step 10
Next, remove the USB cable and connect a stable 5V DC power supply to the robot arm. Then, you can control your robot arm using either the Blynk mobile app or the web dashboard.


ESP32-Powered Robot arm control with Blynk app