SCARA Robot

Explore a Selective Compliance Assembly Robot Arm (SCARA) system for learning, simulating, and validating high-speed pick-and-place, assembly, and 3D trajectory control algorithms.

Robotics SCARA Pick & Place Kinematics Stepper
Overview Theory Architecture Source Code Pinout Examples

Overview

Step straight into the world of industrial automation and advanced robotics with a virtual, selective compliance assembly robot arm. Engineered around two parallel revolute joints for planar positioning and an independent linear axis for vertical motion, this 3-Degree-of-Freedom system bridges the gap between theoretical math and physical reality.

Driven by high-precision stepper motors across its articulated links, the SCARA arm allows you to experiment directly with high-speed pick-and-place routines, joint angle control, and spatial workspace geometry. Complete with hardware limit switches for reliable homing and safe boundary detection, plus real-time path plotting to visualize trajectories, it serves as an invaluable testbed for mastering kinematics, spatial mapping, and precise assembly automation.

Key Features

  • 3-Degree-of-Freedom SCARA robot architecture
  • Dual parallel revolute joints (Inner Arm $\theta_1$ and Outer Arm $\theta_2$)
  • Independent vertical linear stroke axis ($Z$-axis $d_3$)
  • Inner arm and outer arm link structure
  • High-precision stepper motor joint actuation
  • Hardware limit switches for joint and stroke boundary detection
  • Zero home point and homing calibration support
  • Over-rotation prevention mechanisms
  • Interactive live path plotting
  • Toolhead trajectory visualization
  • Workspace reachability analysis
  • Forward and inverse kinematics support

SCARA Structure

SCARA Robot Motion Structure
Joint 1
Inner Arm
θ₁
→
Joint 2
Outer Arm
θ₂
→
Toolhead
X / Y
+
Z Axis
d₃

Applications & Use Cases

  • High-speed pick-and-place assembly prototyping
  • Fundamentals of SCARA forward and inverse kinematics training
  • 3D path planning and planar workspace analysis
  • Educational mechatronics and control theory experiments
  • Stepper motor synchronization and axis control experiments
  • Homing sequence and limit switch safety calibration
  • Simulation of industrial robotic assembly lines on a 3D scale
SCARA Control Flow
Target Position
→
SCARA Kinematics
→
Joint Control
→
Stepper Drivers
→
Toolhead

Theory

A SCARA robot uses two parallel revolute joints to position the toolhead in the X-Y plane and one independent linear axis to control vertical Z movement.

SCARA Forward Kinematics

X-Y-Z Position
θ₁
+
θ₂
→
X / Y
+
d₃
→
X / Y / Z

X Position

x = a1 * cos(theta1)
  + a2 * cos(theta1 + theta2);
                

Y Position

y = a1 * sin(theta1)
  + a2 * sin(theta1 + theta2);
                

Z Position

z = d3;
                

Architecture

The SCARA system contains two revolute stepper driven joints for planar movement and one linear stepper driven Z axis.

Controller
→
GPIO0
→
Joint 1

GPIO0
→
Joint 2
→
X / Y

GPIO1
→
Z Axis
→
Toolhead

Joint Control Signals

  • ENABLE — Enables the stepper motor driver
  • DIR — Controls motor direction
  • STEP — Generates active-high step pulses
  • HOME — Detects the home position
  • END — Detects the end limit

Source Code

Example GPIO configuration for the SCARA robotic system.

// GPIO0: Outputs on bits 0,1,2,5,6,7
// Inputs on bits 3,4

WRITE_REGISTER(0x40000000, 0xE7);


// GPIO1: Outputs on bits 2,3,4
// Inputs on bits 0,1,5,6

WRITE_REGISTER(0x40000400, 0x1C);
                

SCARA Forward Kinematics

x = a1 * cos(theta1)
  + a2 * cos(theta1 + theta2);

y = a1 * sin(theta1)
  + a2 * sin(theta1 + theta2);

z = d3;
                

Pinout

GPIO register mapping for the two revolute joints and the vertical Z-axis.

GPIO0

Bit 0
J1_ENABLE
Bit 1
J1_DIR
Bit 2
J1_STEP
Bit 3
J1_HOME

Bit 4
J1_END
Bit 5
J2_ENABLE
Bit 6
J2_DIR
Bit 7
J2_STEP

GPIO1

Bit 0
J2_HOME
Bit 1
J2_END
Bit 2
Z_ENABLE
Bit 3
Z_DIR

Bit 4
Z_STEP
Bit 5
Z_HOME
Bit 6
Z_END
Bit 7
Unused

Register Addresses

GPIO0 MODE
0x40000000
GPIO0 IN
0x40000004
GPIO0 OUT
0x40000008

GPIO1 MODE
0x40000400
GPIO1 IN
0x40000404
GPIO1 OUT
0x40000408

Examples

Example exercises for the SCARA robotic system.

  • Move Joint 1 through its -135° to +135° range
  • Move Joint 2 through its -150° to +150° range
  • Control vertical Z-axis movement
  • Perform joint homing using HOME switches
  • Detect END limit switch positions
  • Move the toolhead to a target X/Y position
  • Move the toolhead to a target Z height
  • Perform pick-and-place trajectories
  • Analyze the SCARA workspace