This project serves as the final report for the 25th Mechanical System Design and Practice (106) course of NTUST. It focuses on developing a remote-controlled vehicle designed to meet strict size (30 cm × 30 cm) and weight (5 kg) constraints. The robot was required to successfully traverse various obstacles—including an S-curve, slopes, and stairs—while performing precise tasks such as picking up and placing ping-pong balls.

Key Technical Highlights:

Locomotion and Stair Climbing:

The movement system utilizes four high-torque DC motors paired with 125 mm diameter wheels. This design was adopted after initial testing revealed that 12 V stepper motors lacked sufficient torque for stair climbing. The mobile platform features two Degrees of Freedom (DOF), enabling both forward/backward motion and turning.

Ball Collection Mechanism:

The collection system employs a parallel four-bar linkage mechanism to ensure stable vertical motion of the collecting pipe. This mechanism operates with one DOF.

Ball Placement Mechanism:

The placement system is driven by a DC motor (originally two stepper motors) that actuates an internal 3D-printed transmission shaft. The shaft drives a steel disc downward to push and release the ball.

Control System:

The electronic control architecture is built on the Arduino platform, utilizing L298P Shield drivers for the main locomotion motors and L293D drivers for the handling mechanisms. Wireless communication is achieved through a Bluetooth module, controlled via a custom-developed Android Studio application.

Achievement:

The team successfully advanced to the final round of the competition.

Our remote-controlled vehicle.

The robot control system is built on the Arduino platform and utilizes a Bluetooth chip to facilitate wireless communication with a custom controller developed using Android Studio. The program structure handles various motion commands and actuator controls via integer signals sent over Bluetooth.

Arduino Control Program Core Structure

1.Pin Definitions

The code defines the control pins for the four locomotion DC motors (LMotor, RMotor) and the two handling mechanism DC motors (CMotor for collecting, HMotor for placing).

#include <LiquidCrystal_I2C.h>
#include <SoftwareSerial.h>
#include <Servo.h>

// DC Motors for the Extendable Arm Mechanism (Collection)
const int CMotor_Low  = 2; // Low potential pin 
const int CMotor_High  = 3; // High potential pin 

// DC Motors for the Ball Placement Mechanism
const int HMotor_Low     = 4; // Low potential pin 
const int HMotor_High     = 5; // High potential pin 

// Locomotion Motor Enable Pins (L298P Shield) - Controls speed/power 
const int LMotor_Enable  = 10;
const int RMotor_Enable     = 11;

// Locomotion Motor Control Pins (L298P Shield) - Controls direction (Forward/Reverse) 
const int LMotor_Control    = 12;  // Motor A control 
const int RMotor_Control    = 13;  // Motor B control 

// Default delay value
const int delaytime_vaule   = 50;

Note: The locomotion system uses four DC motors controlled by an L298P Shield. Motors on the same side (left or right) are wired in parallel to be controlled synchronously.

2.Motor Control Type Enumeration

An enumeration (enum Motor_Control_type) is used to define clear states for the robot’s movement, simplifying the programming logic.

enum Motor_Control_type
{
Stop,
LForward,
RForward,
LBackward,
RBackward,
Turn_Left,
Turn_Right,
Both_Forward,
Both_Backward,
};

3.Main Loop: Bluetooth Command Processing (loop())

The main loop constantly checks if a message is available via Bluetooth using Serial.available(). The received integer signal (BlueTooth_Command) is then routed through a switch statement to execute the corresponding motion or action.

void loop()
{
if (Serial.available()) // Check for incoming Bluetooth messages 
{
    int BlueTooth_Command = Serial.read();

    // ... (LCD display logic is omitted here for brevity) ...

    switch (BlueTooth_Command)
    {
    case 0:
    {
        Motor_Control(Stop); // Bluetooth signal 0: Stop all motors 
        break;
    }
    case 1:
    {
        Motor_Control(LForward); // Bluetooth signal 1: Left motor forward (short press example) 
        Motor_Control(Stop);
        break;
    }
    // ... (Short press commands 2-8 omitted) ...

    /*----------------- Long Press Command Handling Example (Signal 9) -----------------*/
    case 9:
    {
        // When long press is detected, continue action until stop signal (0) is received 
        while (!(Serial.available() && Serial.read() == 0))
        {
            Motor_Control(LForward);
        }
        Motor_Control(Stop);
        break;
    }

    // Collection/Placement Motor Control Example (Signal 20: Collection motor forward) 
    case 20:
    {
        while (!(Serial.available() && Serial.read() == 0))
        {
            digitalWrite(CMotor_High, HIGH);
            digitalWrite(CMotor_Low , LOW);
        }
        Motor_Control(Stop);
        break;
    }
    // ... (Other commands 10-22 omitted) ...
    }
}
}

4.Core Motor Control Function (Motor_Control)

This function manages all locomotion motor actions. The Enable pin is set to HIGH to provide maximum voltage (or power), and the Control pin determines the direction (forward or reverse).

void Motor_Control(Motor_Control_type control_type, int delaytime = delaytime_vaule)
{
switch (control_type)
{
case Stop:
{
    // Set all Enable pins to LOW to stop locomotion motors 
    digitalWrite(LMotor_Enable, LOW);
    digitalWrite(RMotor_Enable , LOW);
    // ... (Also stops handling motors CMotor, HMotor) 
    break;
}
case LForward:
{
    digitalWrite(LMotor_Control, HIGH); // Control pin HIGH = Forward 
    digitalWrite(LMotor_Enable , HIGH); // Enable pin HIGH = Start with max power [3, 9]
    break;
}
case Both_Forward:
{
    digitalWrite(LMotor_Control, HIGH);
    digitalWrite(RMotor_Control, HIGH);
    digitalWrite(LMotor_Enable, HIGH);
    digitalWrite(RMotor_Enable, HIGH);
    break;
}
// ... (Other directions omitted) ...
}
delay(delaytime); // Apply specified delay time 
}

106-robot

Updated: