A real-time teleoperation system that uses a sensor-equipped cyber glove to remotely control a Dobot robotic arm. The system captures hand movements and finger positions through flex sensors and an IMU, transmitting the data wirelessly via MQTT to control a robotic gripper with precision.
- Overview
- Features
- System Architecture
- Hardware Components
- Software Components
- Circuit Diagram
- 3D Printed Components
- Installation
- Usage
- MQTT Communication
- Directory Structure
- Dependencies
- License
The Cyberglove Teleoperation system enables intuitive remote control of robotic manipulators through natural hand movements. The system consists of:
- Cyber Glove: A wearable device with flex sensors that measure finger joint angles (0-107 degrees) and an MPU6050 IMU for hand orientation tracking
- ESP32 Microcontroller: Processes sensor data and transmits it via MQTT protocol
- MQTT Broker: Handles wireless communication between the glove and robot controller
- Robot Controller: Python-based controller that receives commands and operates the Dobot robotic arm
- Feedback System: Provides force feedback via servos and tactile feedback via vibration motors
- 5-Finger Joint Angle Tracking: Independent measurement for thumb, index, middle, ring, and little fingers
- Hand Orientation Tracking: Real-time roll, pitch, and yaw angles using MPU6050 IMU
- Second-Order Butterworth Filter: Applied to sensor readings for noise reduction
- 20-Sample Moving Average: Additional smoothing for potentiometer readings
- Real-Time Teleoperation: Low-latency control via MQTT protocol
- Workspace Limitation: Safety constraints (195-270mm radial workspace, 0-150mm vertical range)
- Gripper Control: Open/close gripper based on finger position
- Web Interface: Real-time visualization of joint angles and orientation via WebSocket
- Force Feedback: Servo motors provide resistance when gripping objects
- Tactile Feedback: Vibration motors simulate touch sensations
- Visual Feedback: Web-based dashboard showing all sensor values
The system uses a distributed architecture with the following components:
┌─────────────────┐ ┌──────────────┐ ┌─────────────────┐
│ Cyber Glove │ │ MQTT │ │ Dobot Robot │
│ (ESP32) │◄───────►│ Broker │◄───────►│ Controller │
│ - Flex Sensors │ WiFi │ │ WiFi │ (Python) │
│ - IMU (MPU6050)│ │ │ │ - pydobot │
│ - Servos │ │ │ │ - paho-mqtt │
│ - Vibrators │ │ │ │ │
└─────────────────┘ └──────────────┘ └─────────────────┘
│ │
│ │
▼ ▼
┌─────────────────┐ ┌─────────────────┐
│ Web Interface │ │ Robot Actions │
│ (WebSocket) │ │ - Move (X,Y,Z) │
│ - Joint Angles │ │ - Grip/Release │
│ - Orientation │ │ - Workspace │
└─────────────────┘ └─────────────────┘
| Component | Model/Type | Quantity | Purpose |
|---|---|---|---|
| Microcontroller | ESP32 | 1 | Main processor for sensor reading and communication |
| IMU | MPU6050 | 1 | Measures hand orientation (roll, pitch, yaw) |
| Flex Sensors | Analog Potentiometers | 5 | Measure finger joint angles |
| Servo Motors | Standard Servo | 2 | Provide force feedback (thumb & index) |
| Vibration Motors | DC Vibration Motors | 2 | Provide tactile feedback |
| 3D Printed Parts | PLA/ABS | Multiple | Mechanical structure and sensor mounting |
Analog Input Pins (Flex Sensors):
- GPIO 36: Thumb sensor
- GPIO 39: Index finger sensor
- GPIO 34: Middle finger sensor
- GPIO 35: Ring finger sensor
- GPIO 32: Little finger sensor
Servo Control Pins:
- GPIO 25: Thumb servo
- GPIO 33: Index finger servo
Vibration Motor Pins:
- GPIO 2: Thumb vibration motor
- GPIO 4: Index finger vibration motor
IMU Interface:
- GPIO 21: SDA (I2C Data)
- GPIO 22: SCL (I2C Clock)
- GPIO 5: Interrupt pin
Status LED:
- GPIO 17: System status LED
- File:
Cyber Glove/Project_iot_cyber_glove/cyber_glove_release_sw/cyber_glove_release_sw.ino - Functions:
- Reads 5 flex sensors with second-order Butterworth filtering
- Processes MPU6050 IMU data using DMP (Digital Motion Processor)
- Hosts web server for visualization (port 80)
- WebSocket server for real-time updates (port 81)
- Controls force and tactile feedback systems
- File:
ESP32/Mosquitto_Write/Mosquitto_Write.ino - Functions:
- Reads 4 potentiometer values (X, Y, Z, Gripper)
- Applies 20-sample moving average filter
- Maps sensor values to 0-127 range
- Publishes data to MQTT topic
ESP32/Potentiometerdatareadevery 5 seconds
- File:
Dobot/PahoFinal.py - Functions:
- Subscribes to MQTT topic for glove data
- Maps sensor values to robot workspace coordinates
- Enforces workspace constraints (195-270mm radial, 0-150mm height)
- Controls Dobot arm position and gripper state
- Uses pydobot library for robot communication
Dobot/FinalWspc.py: Alternative workspace configurationDobot/PahoFinal2.py: Alternative MQTT implementationPahoConnect.py: MQTT connection testing utility
The system uses calibration offsets for accurate angle measurement:
// Joint Angle Offsets (raw ADC values)
const float ind_off = 878.0; // Index finger
const float mid_off = 785.0; // Middle finger
const float rng_off = 1179.0; // Ring finger
const float lil_off = 950.0; // Little finger
const float thb_off = 895.0; // Thumb
// Joint Angle Ranges (raw ADC values)
const float ind_range = 1794.0;
const float mid_range = 1708.0;
const float rng_range = 1684.0;
const float lil_range = 1845.0;
const float thb_range = 1958.0;
// Angular range in degrees
const float delta_ang = 107.0;The cyber glove uses custom 3D printed parts for mechanical structure and sensor mounting. STL files are provided for both right-hand (default) and left-hand configurations.
Finger Mechanisms:
bottom holder.STL/top holder.STL: Main mounting bracketsmid_ring_ind_finger link.STL: Link mechanism for index, middle, ring fingersmid_ring_ind_finger cover.STL: Protective coverlittle finger link.STL/little finger cover.STL: Little finger mechanismthumb attachment.STL/thumblink.STL: Thumb mechanismthumb upper holder.STL/thumb lower holder.STL: Thumb mountingthumb cover.STL/thbl2cvr.STL: Thumb protective covers
Sensor Mounts:
finger tip version1.STL: Fingertip sensor housingtip with mot.STL: Motorized fingertiprachet_joint.STL: Ratcheting joint mechanismrachet link.STL/rachet link cover.STL: Ratchet link assembly
Electronics Housing:
pcbholder.STL: PCB mounting bracketcover plate.STL: Electronics coverslider2.STL/slide1_1_1.STL/slide_1_1_2.STL: Adjustment sliders
Left-Hand Version:
All parts are available in mirrored versions in the STL_Files_Left_Hand/ directory.
- Material: PLA or ABS
- Layer Height: 0.2mm
- Infill: 20-30%
- Supports: Required for some parts
- Print Orientation: Follow guidelines in
STL_Files_Left_Hand/Readme cyber glove prints.pdf
-
3D Print Components
- Print all required STL files from the
Cyber Glove/cyber glove/directory - Use appropriate material (PLA/ABS) with 20-30% infill
- Refer to
STL_Files_Left_Hand/Readme cyber glove prints.pdffor printing guidelines
- Print all required STL files from the
-
Assemble Cyber Glove
- Mount flex sensors in finger mechanisms
- Install MPU6050 IMU on the back of hand
- Connect servos for force feedback
- Install vibration motors
- Wire all components to ESP32 according to pin configuration
-
Connect Dobot Robot
- Connect Dobot arm to computer via USB (typically
/dev/ttyUSB2on Linux) - Ensure robot is powered and initialized
- Connect Dobot arm to computer via USB (typically
Install required libraries in Arduino IDE:
# Arduino Libraries needed:
- WiFi (built-in)
- PubSubClient
- ArduinoJson
- WebSocketsServer
- ESP32Servo
- MPU6050 (I2Cdev library)Configure WiFi and MQTT:
// In cyber_glove_release_sw.ino or Mosquitto_Write.ino
const char* ssid = "YOUR_WIFI_SSID";
const char* password = "YOUR_WIFI_PASSWORD";
const char* mqtt_server = "YOUR_MQTT_BROKER_IP";Upload firmware to ESP32.
Install Mosquitto MQTT broker:
# Ubuntu/Debian
sudo apt-get update
sudo apt-get install mosquitto mosquitto-clients
# macOS
brew install mosquitto
# Start the broker
mosquitto -vOr use a cloud MQTT broker:
broker.mqtt-dashboard.combroker.emqx.io
Install Python dependencies:
pip install pydobot paho-mqttFor Dobot robot, you may need additional setup:
# Linux: Add user to dialout group for USB access
sudo usermod -a -G dialout $USERConfigure Python script:
# In Dobot/PahoFinal.py
broker_address = "YOUR_MQTT_BROKER_IP" # e.g., "192.168.1.100"
port = "/dev/ttyUSB2" # Adjust for your system (COM port on Windows)mosquitto -v- Power the ESP32 (via USB or battery)
- Wait for WiFi connection (check Serial Monitor)
- Note the IP address displayed
Open a browser and navigate to the ESP32's IP address:
http://[ESP32_IP_ADDRESS]
The interface displays:
- Real-time finger joint angles
- Hand orientation (roll, pitch, yaw)
- Force feedback status
- Tactile feedback status
- Control buttons for feedback activation
cd Dobot
python PahoFinal.pyThe script will:
- Connect to MQTT broker
- Move Dobot to home position (234, 0, 75, 0)
- Subscribe to glove data
- Begin real-time teleoperation
- Move your hand to control robot position
- Finger movements map to X, Y, Z coordinates
- Close fingers to activate gripper
- System enforces workspace constraints for safety
| Glove Input | Robot Output | Range |
|---|---|---|
| X-axis finger angle | Robot X position | 195-270mm |
| Y-axis finger angle | Robot Y position | 195-270mm |
| Z-axis finger angle | Robot Z position | 0-150mm |
| Gripper sensor | Gripper state | Open/Close |
| Hand roll/pitch/yaw | (Future: Wrist orientation) | ±180° |
- Publisher: ESP32 Cyber Glove
- Topic:
ESP32/Potentiometerdataread - Subscriber: Python Robot Controller
- Message Format: 4-byte character array
[X, Y, Z, Gripper] - Update Rate: Every 5 seconds
- QoS Level: 0 (At most once)
Message: [dx, dy, dz, dg]
dx: X-axis value (0-127)
dy: Y-axis value (0-127)
dz: Z-axis value (0-127)
dg: Gripper value (0-127)
- dg ≤ 63: Grip closed
- dg > 63: Grip open
# Sensor to robot workspace mapping
xa = (dx * 270) / 127 # Map to 0-270mm
ya = (dy * 270) / 127
za = (dz * 150) / 127 # Map to 0-150mm
# Workspace validation
radius = sqrt(xa² + ya²)
if 195 <= radius <= 270 and 0 <= za <= 150:
# Valid workspace - execute movement
device.move_to(xa, ya, za, r, wait=True)Cyberglove-Teleoperation/
├── Cyber Glove/
│ ├── Project_iot_cyber_glove/
│ │ ├── cyber_glove_release_sw/ # Main cyber glove firmware
│ │ ├── robot_gripper_release_sw/ # Gripper control firmware
│ │ ├── Readme.pdf # Hardware documentation
│ │ ├── presentation_HW_SW_architecture.pdf
│ │ └── system_schematic.pdf # System wiring diagram
│ └── cyber glove/ # 3D model STL files (right hand)
│ ├── bottom holder.STL
│ ├── top holder.STL
│ └── [... other STL files]
├── STL_Files_Left_Hand/ # 3D model STL files (left hand)
│ ├── Readme cyber glove prints.pdf # Printing instructions
│ └── [... mirrored STL files]
├── Dobot/
│ ├── PahoFinal.py # Main robot controller
│ ├── PahoFinal2.py # Alternative implementation
│ ├── FinalWspc.py # Workspace utilities
│ └── FinalWspc2.py
├── ESP32/
│ ├── Mosquitto_Write/ # MQTT publisher (simple version)
│ ├── Mosquitto_Write2/
│ ├── Mosquitto_Read/ # MQTT subscriber test
│ ├── CloudWriteAvg/ # Cloud MQTT implementation
│ ├── CloudReadAvg/
│ ├── Serial/ # Serial communication test
│ └── Test_Array/ # Array data handling test
├── PahoConnect.py # MQTT connection tester
├── Documentation.docx # Project documentation
├── LICENSE # MIT License
└── README.md # This file
- ESP32 Development Board (WROOM-32 or similar)
- MPU6050 6-axis IMU
- 5x Analog flex/potentiometer sensors
- 2x Servo motors (for force feedback)
- 2x Vibration motors (DC motors)
- Dobot Magician robotic arm
- WiFi network
- 3D printer for mechanical parts
Arduino Libraries:
WiFi
PubSubClient (MQTT)
ArduinoJson
WebSocketsServer
ESP32Servo
Wire (I2C)
I2Cdev
MPU6050 (DMP)
Python Packages:
pydobot>=1.3.0
paho-mqtt>=1.5.0
System Requirements:
Arduino IDE 1.8.x or higher (or PlatformIO)
Python 3.6 or higher
Mosquitto MQTT Broker 1.6 or higher
- Open
cyber_glove_release_sw.ino - Read raw ADC values with fingers straight (offsets)
- Read raw ADC values with fingers fully bent (ranges)
- Update calibration constants:
const float ind_off = YOUR_VALUE; const float ind_range = YOUR_VALUE; // Repeat for all fingers
Run the MPU6050 calibration sketch and update:
mpu.setXGyroOffset(YOUR_VALUE);
mpu.setYGyroOffset(YOUR_VALUE);
mpu.setZGyroOffset(YOUR_VALUE);
mpu.setZAccelOffset(YOUR_VALUE);Adjust robot workspace limits in PahoFinal.py:
# Radial workspace (mm)
if 195 <= sqrt <= 270:
# Adjust these values based on your robot
# Vertical workspace (mm)
if 0 <= za <= 150:
# Adjust these values based on your robotESP32 not connecting to WiFi:
- Verify SSID and password
- Check 2.4GHz WiFi network (ESP32 doesn't support 5GHz)
- Monitor serial output for connection status
MQTT messages not received:
- Verify broker is running:
mosquitto -v - Check broker IP address in both ESP32 and Python code
- Test with mosquitto_sub:
mosquitto_sub -t "ESP32/Potentiometerdataread"
Dobot not responding:
- Check USB connection and permissions
- Verify port in Python script (e.g.,
/dev/ttyUSB2,COM3) - Ensure pydobot is installed correctly
Inaccurate sensor readings:
- Recalibrate flex sensors
- Check for loose connections
- Verify power supply stability
- Adjust filter parameters if needed
- Add hand orientation control for robot wrist
- Implement bilateral force feedback
- Add multiple robot support
- Develop smartphone app for monitoring
- Add gesture recognition for complex commands
- Implement machine learning for motion prediction
- Add VR/AR visualization
- Support for other robot platforms
Contributions are welcome! Please feel free to submit pull requests or open issues for bugs and feature requests.
This project is licensed under the MIT License - see the LICENSE file for details.
- MPU6050 DMP library by Jeff Rowberg
- pydobot library for Dobot control
- Eclipse Paho for MQTT implementation
For questions or support, please open an issue in the GitHub repository.




