pboon09
Institute of Field Robotics (FIBO), KMUTT

RP Plotter, a 2-DOF Robotic Arm with Revolute and Prismatic Joints

January 2025 – May 2025

Overview

A studio project from FRA262 Robotics Studio 3, done by a team of six. The client brief asked for a 2-DOF vertical plotter arm with one revolute and one prismatic joint that draws letters and patterns and reports to the client base system over MODBUS in real time.

  • The arm carries a plotter head of up to 500 g.
  • It fits inside \(300 \times 300 \times 1{,}000\) mm.
  • It uses brushed DC motors only.

Each joint runs cascaded position and velocity loops on an STM32 Nucleo G474RE.

My part was to lead the electrical system, with my teammates helping, to do all of the control, and to help assemble the hardware.

Drawing mode test

Hardware

ControllerST Nucleo G474RE with an STM32G474RE chip
MotorsTwo 12 V ZGX45RGG brushed DC gearmotors, 400 RPM on the prismatic joint and 150 RPM on the revolute joint
Motor DriverCytron MDD20A, 2 channels, 20 A continuous
EncodersTwo AMT103-V Incremental Encoders
HomingTwo FC-33 photoelectric modules on the prismatic axis, one PR12-2DN proximity sensor on the revolute axis
Power220 V AC to a 12 V 20 A supply for the motors and a 5 V 5 A supply for logic and sensors
ProtectionFuse, breaker, solid state relay and an emergency button that cuts motor power but not the controller
DriveBelt drives on both joints, a linear rail on the prismatic axis, and a counterweight on the revolute axis
Structure40 by 40 mm aluminium profile with steel plates and shafts

System

ControllerSTM32 Nucleo G474RE, one board for both joints
Control RateInner velocity loop at 1,000 Hz, outer position loop at 100 Hz
SoftwareSTM32CubeIDE, MATLAB Simulink with Simscape Multibody, SolidWorks
CommunicationMODBUS RTU slave on USART2, with the base system as master
Operating ModesPoint mode from the base system GUI, and joystick jog mode

Process

  1. Set the requirements

    The brief fixed the mechanical, performance and electrical requirements, and the team checked each one at the end.

  2. Size the motors and shafts

    Hand calculations set the minimum torque and speed for a 1 kg load, and the ZGX45RGG gearmotor met them. A shaft equation and bearing life checks sized the shafts and bearings.

  3. Design the mechanics

    A belt-driven revolute axis with a counterweight and a belt-driven prismatic axis on a linear rail. Finite element analysis checked the base plate and the structure.

  4. Build the electrical system

    • 220 V AC through a fuse, a breaker and a solid state relay to the 12 V and 5 V supplies.
    • An emergency button that cuts motor power but leaves the controller on, and four pilot lamps.
    • Custom boards for the Nucleo, the joystick and the sensors, connected to the cabinet by LAN cables.
  5. Write the control software

    C libraries on the Nucleo cover motor drive, encoders, PID, filters, trajectory and communication.

    • A position PID feeds a velocity PID on each axis, with reference and disturbance feedforward.
    • A trapezoidal trajectory limits speed and acceleration, and a Kalman filter gives the velocity without the lag of a low-pass filter.
    • A backlash compensator adds a correction at each change of direction.
  6. Talk to the base system

    The Nucleo acts as MODBUS slave. The heartbeat, the pen button and the limit switch status were tested against the base system GUI.

Results

The arm followed all six setpoints on each joint, and the size and position error requirements were met.

Table 1. Requirement Status

RequirementTargetResult
Size\(300 \times 300 \times 1{,}000\) mm\(300 \times 270 \times 800\) mm
Prismatic Error< 0.2 mm0.01 to 0.14 mm
Revolute Error< 0.2 deg0.01 to 0.50 deg

Table 2. Steady-State Position Error on the Real Arm

SetpointPrismatic Setpoint (mm)Prismatic Error (mm)Revolute Setpoint (deg)Revolute Error (deg)
11750.061750.03
2950.051950.02
32310.08950.01
42000.013000.05
53000.141500.50
600.0200.14
Fig. 1. Motor speed with low-pass and Kalman filters under a square wave
Fig. 1. Motor speed with low-pass and Kalman filters under a square wave
Fig. 2. Cascade control following a trajectory on the prismatic axis
Fig. 2. Cascade control following a trajectory on the prismatic axis
Fig. 3. Revolute position over the six setpoints
Fig. 3. Revolute position over the six setpoints

Figures and Video

Point mode operation
Joystick mode operation
The RP Plotter and its control cabinet
The RP Plotter and its control cabinet
Hardware diagram
Hardware diagram
Control system diagram
Control system diagram
CAD of the arm
CAD of the arm
Inside the control cabinet
Inside the control cabinet