This repository contains the complete engineering files for a 4-Degree-of-Freedom (4-DOF) Robotic Arm System, featuring a gesture-controlled master-slave architecture.
4-DOF Robotic Arm is an open-source printed circuit board by Mkhalaf203, from the Mkhalaf203/4-DOF-Robotic-Arm repository on GitHub. It is a 2-layer board of 156 × 89.4 mm with 24 parts on 46 nets, routed with 170 tracks and 22 vias.
It is built around the ESP32-S2-DEVKITC-1. Its parts include 13 capacitors, 7 connectors and 1 IC. It belongs with the ESP32 boards of this library.
This repository contains the complete engineering files for a 4-Degree-of-Freedom (4-DOF) Robotic Arm System, featuring a gesture-controlled master-slave architecture. The system uses two ESP32 microcontrollers communicating wirelessly via ESP-NOW, closed-loop PID joint control with encoder feedback, custom KiCad electronics, and a hybrid mechanical structure featuring 3D-printed cycloidal gearboxes and rigid aluminum links.
Calibration: At startup, it reads the gyroscope Z-axis for 500 iterations to calibrate the yaw bias.
Sensor Fusion: Reads raw accelerometer and gyroscope data from the MPU6050 at a 200 Hz update rate ($dt = 5\text{ ms}$).
Kalman Filtering: Calculates roll and pitch through a custom 2-state Kalman filter, integrating gyroscopic velocities and correcting drift using gravity vectors.
Taring: Pressing both the Gripper Open and Close buttons simultaneously resets the reference frame, setting current pitch, roll, and yaw as zero ($0^\circ$).
Transmission: Packages joint target values (base, shoulder, elbow, servo_angle) and sends them to the slave's MAC address using the ESP-NOW protocol.
PID Position Control: Runs a discrete-time PID calculation for each axis independently:
$$u(t) = K_p e(t) + K_i \int e(t)dt + K_d \frac{de(t)}{dt}$$
Tuned parameters: $K_p = 1.0$, $K_i = 0.01$, $K_d = 1.4$, with anti-windup clamping ($[-3000, 3000]$) and a deadband threshold of 20 encoder counts to prevent motor chattering.
Telemetry & Modes: Updates the OLED display every 200ms. In ESP-NOW mode, it contrasts target positions against current encoder positions. Pressing the Mode switch toggles it to Joystick Mode, enabling direct manual control via the integrated joystick and buttons.
📁 Repository Structure
The repository is organized into four main directories:
This repository contains all the code and hardware files for an autonomous air hockey table system. The system uses a 2-axis gantry controlled by an ESP32, with real-time vision and inference running on either a laptop…
Dispositivos de Entrada: Joystick analógico (2 GDL) para tracción, pulsadores de acción y MPU6050 (Acelerómetro/Giroscopio) para seguimiento de gestos de inclinación.
rusefi - GPL internal combustion engine control unit
24 parts1.2k
Questions
How big is the 4-DOF Robotic Arm PCB?
It measures 156 × 89.4 mm and has 2 copper layers, 1.6 mm thick.
What parts does the 4-DOF Robotic Arm use?
24 parts, built around the ESP32-S2-DEVKITC-1. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.
Where can I download the 4-DOF Robotic Arm KiCad files?
From the Mkhalaf203/4-DOF-Robotic-Arm repository on GitHub, at the commit this page was made from: the board is hardware/schematic_and_pcb/4dof_robotic_arm.kicad_pcb and its schematic hardware/schematic_and_pcb/4dof_robotic_arm.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Can I use the 4-DOF Robotic Arm design in my own project?
Its repository states no licence, so its author keeps all rights: ask Mkhalaf203 before reusing the design.