CORTEX: A 3DOF Robotic Arm Controller Software
Introduction
Controlling a robotic arm using simple potentiometers is easy, but making it move to specific coordinates requires Inverse Kinematics. CORTEX is a Python-based software solution designed to control 3-Degree-of-Freedom (3DOF) robotic arms with precision.
Developed by Nazib Abrar and Md. Raihanul Haque Rahi, this project aims to bring both forward and inverse kinematics to almost any 3DOF robot arm. It also features computer vision capabilities for object detection and coordinate sorting.
Key Features
- Forward Kinematics: Manual control of joints using a graphical interface.
- Inverse Kinematics: Coordinate-based control (X, Y, Z) to move the end-effector to precise locations.
- Object Detection: Uses image processing to detect objects and sort them based on coordinates.
- Writing Mode: Transforms the robotic arm into a plotter to reproduce text and simple line art.
- Smooth Movement: Implements sine function algorithms to ensure fluid motion of servos.
How It Works
The system is divided into two main parts: the PC Software (Python) and the Microcontroller Firmware (Arduino).
The Python software (built with Tkinter) calculates the necessary joint angles using inverse kinematics equations. It then sends these angles to the Arduino via Serial communication. The Arduino reads this data and drives the servo motors to the required positions.
Hardware Used
- Arduino Uno (or compatible microcontroller)
- 3x MG995 Metal Gear Servo Motors
- 1x SG90 Micro Servo (for the gripper)
- 5V Power Supply (External)
- 3D Printed Arm Chassis
Software & Code
The core logic handles the trigonometric calculations required for the arm to reach a specific point $(P_x, P_y, P_z)$.
Python Dependencies:
import tkinter as tk
import serial
import math
import cv2 (OpenCV for object detection)
The Graphical User Interface (GUI) allows users to switch between "Manual Mode" (sliders) and "Automatic Mode" (coordinate input). In "Pick and Place" mode, the software utilizes a camera to identify an object's location and automatically calculates the path to retrieve it.
Demonstration
You can view the full demonstration of the writing mode and pick-and-place functionality here:
For the full source code and documentation, visit the GitHub Repository.