Building a motorized Linear Pan Rig with ESP-32 C3 Supermini, NEMA 17 and CNC shield.

A belt-driven linear rig with pan axis, built on 2020 aluminium v0-slot extrusion, GT2 Belts, dual NEMA 17 steppers, CNC Shield, and an ESP32 C3 Supermini

← Back to Projects
Embedded & IoT Completed Sep 2026
Building a motorized Linear Pan Rig with ESP-32 C3 Supermini, NEMA 17 and CNC shield.
Role

Design & Engineering Lead

Timeline

September 2026

Stack Tags
ESP32 Arduino 3D Printing Stepper Motors CAD Design Belt Drive GT2 Timing Belt Stepper Motor Embedded systems Electronics Firmware

Overview & Problem Statement

The rig moves horizontally along the 2020 aluminium extrusion and adds a pan axis, both driven by nea 17 steppers through 3D-printed GT2 pulleys Power comes from an external 12v supply feeding the CNC shield

System Architecture & Technical Approach

STEP/DIR/EN pins are jumpered from the ESP32-C3 Supermini directly to the CNC shield driver sockets. Everything structural is 3-D printed; T-nuts and cap screws handle mounting

System architecture / wiring diagram for Building a motorized Linear Pan Rig with ESP-32 C3 Supermini, NEMA 17 and CNC shield.

Hardware & Software Implementation

// Dual-axis motion control — ESP32-C3 SuperMini + CNC shield (driver breakout mode)
// Linear axis + pan axis, both driven via STEP/DIR through AccelStepper

#include <AccelStepper.h>

#define LINEAR_STEP_PIN 4
#define LINEAR_DIR_PIN  5
#define PAN_STEP_PIN    6
#define PAN_DIR_PIN     7

AccelStepper linearAxis(AccelStepper::DRIVER, LINEAR_STEP_PIN, LINEAR_DIR_PIN);
AccelStepper panAxis(AccelStepper::DRIVER, PAN_STEP_PIN, PAN_DIR_PIN);

void setup() {
  linearAxis.setMaxSpeed(800);
  linearAxis.setAcceleration(400);

  panAxis.setMaxSpeed(400);
  panAxis.setAcceleration(200);
}

void loop() {
  linearAxis.runToNewPosition(2000);
  delay(500);
  panAxis.runToNewPosition(400);
  delay(500);
  linearAxis.runToNewPosition(0);
  delay(500);
  panAxis.runToNewPosition(0);
  delay(500);
}
Part Qty Notes
NEMA 17 2 One on linear axis one for pan axis
CNC Shield 1
ESP32-C3 Supermini 1
12v External power supply 1
2020 v-slot extrusion 1 Length depends on desired travel
GT2 Belts
GT2 Pulley 20 Teeth
3D printed mounts
T-nuts
Jumper cables

Key Challenges & Technical Trade-offs

The CNC Shield here works as a driver breakout board.

Results, Impact & Performance Metrics

Both axes move smoothly and hold position accurately across repeated test runs. The linear axis travels the full extrusion length without the belt skipping.

The pan rotates cleanly through its test range with no detected step loss.

We use essential cookies for security (CSRF protection) and optional preference cookies (like dark mode). We don't use tracking or advertising cookies. Read our Cookie Policy.