Control a robotic arm with 3 joints remotely using the ESP32 microcontroller and the Arduino IoT Cloud platform. This project allows you to move the robotic arm's base, hand, and gripper through a simple cloud dashboard.
- Remote Control: Move the base, hand, and gripper using a web or mobile dashboard.
- Arduino IoT Cloud Integration: Real-time updates and easy access from anywhere.
- Simple Wiring: Just three servos and an ESP32 board.
- Expandable: Add more features or sensors as needed.
- ESP32 Development Board (e.g., ESP32 DevKit v1)
- 3x Servo Motors (SG90 or MG90S recommended)
- Robotic Arm Kit (or custom 3D printed parts)
- Jumper Wires
- Breadboard (optional, for prototyping)
- 5V Power Supply (for servos, recommended to power separately from ESP32)
- Arduino IDE (latest version recommended)
- Arduino IoT Cloud Account
- Please check if the Arduino Create Agent app is running in your device.
- Libraries:
ESP32Servo
(install from Library Manager)- Arduino IoT Cloud libraries (auto-installed when setting up the Thing)
Follow these steps to set up your ESP32 robotic arm with the Arduino IoT Cloud: https://docs.arduino.cc/arduino-cloud/guides/overview/
- Go to Arduino IoT Cloud and sign in or create an account.
- Click on Devices in the sidebar.
- Select Add Device > Set up a 3rd Party Device > ESP32.
- Select the Board type (eg: 'ESP32 Dev Module' or 'DOIT ESP32 DEVKIT V1')
- Click on Things > Create Thing.
- Link your newly added ESP32 device to the Thing.
Add the following variables (make sure to set the variable types and update permissions as shown):
Name | Variable Name | Type | Update By | Description |
---|---|---|---|---|
base | base |
int | Dashboard | Base rotation (0-180 deg) |
hand | hand |
int | Dashboard | Hand angle (0-180 deg) |
grip | grip |
bool | Dashboard | Gripper open/close (true/false) |
- For each variable, click Add Variable, fill details, and select the on change event trigger.
- Create a new dashboard and add widgets:
- Slider for
base
(0-180) - Slider for
hand
(0-180) - Switch/Toggle for
grip
- Slider for
- Link each widget to its corresponding variable.
DIRECT PROGRAMMING METHOD:
- The
.ino
andthingProperties.h
files are respectively generated when the sketch for the the Thing is set up. DO NOT EDIT THEthingProperties.h
FILE. - Replace the main
.ino
file content with the providedRobot_Arm.ino
sketch directly in the IoT cloud sketch tab. - Install the
ESP32Servo
library via the Library Manager. - Select the correct board and port in the setup tab.
- Upload the code to your ESP32.
DOWNLOAD CODE METHOD:
- Download the automatically generated
.ino
file andthingProperties.h
from your Thing. - Replace the main
.ino
file content with the providedRobot_Arm.ino
sketch in the Arduino IDE. - Make sure
thingProperties.h
is in your project folder. (DO NOT EDIT THIS FILE) - Install the
ESP32Servo
library via the Library Manager. - Select the correct board and port in the Arduino IDE.
- Upload the code to your ESP32.
ESP32 Pin | Servo Function |
---|---|
13 | Base Servo |
12 | Hand Servo |
14 | Gripper Servo |
Note: Connect all servo power lines to 5V (external recommended) and grounds together with ESP32 GND.
- Power the ESP32 and servos.
- Open your Arduino IoT Cloud dashboard.
- Move the sliders and toggle the grip switch to control your robotic arm in real time!
- Add more servos or sensors by expanding the code and dashboard.
- Integrate with voice assistants or automate actions using Arduino Cloud automations.
This project is licensed under the MIT License.
- Inspired by the Arduino IoT Cloud documentation and the ESP32Servo library.
For questions or suggestions, open an issue in this repository. Do share your thoughts!