Skip to content
Week 3 · Lesson 3 60 min

Wiring the Control System and Motors

Follow the power path from the battery through the main switch to the Control Hub and motors. Install motors firmly, manage cables so nothing snags, and configure the motors so your code can use them.

In this lesson you will

  • Trace the power path from the battery to each motor
  • Install motors and route their cables safely with strain relief
  • Configure four drive motors on the Driver Station
  • Run a test OpMode that spins each motor and shows encoder readings

Lesson

Electrical problems cause a large share of robot failures, and most of them come from loose connectors, pulled cables and messy wiring rather than broken electronics. Wiring carefully the first time saves hours later. In this lesson you will connect the control system, install motors and tell the robot which motor is which.

Driver HubGamepadsControl HubCPU · IMU · I/OBattery 12 VSwitchWi-FiMotorsServosSensors
The battery powers the Control Hub through the main switch. The Control Hub drives the motors and talks to the Driver Station over Wi-Fi.

The power path

  1. 1
    Battery
    A 12 V rechargeable battery pack supplies all the power. It includes a fuse that protects against short circuits. Use only batteries the current Competition Manual allows.
  2. 2
    Main power switch
    The battery connects to a main switch that turns the whole robot on and off. Mount it where a referee or teammate can reach it quickly.
  3. 3
    Control Hub
    From the switch, power goes into the Control Hub. The hub is the robot's brain: it runs your code and powers the motor and servo ports.
  4. 4
    Motors
    Each drive motor plugs into a motor port, numbered 0 to 3 on the Control Hub. Its encoder cable plugs into the matching encoder port.
  5. 5
    Expansion Hub (later)
    If you need more than four motors, an Expansion Hub can be added and connected to the Control Hub. You do not need one for a basic chassis.

Installing motors

A motor must be held so it cannot rotate, tilt or slide, because every bit of movement turns into binding or a loose wheel. Use the motor mount designed for your kit and the screws it specifies. Mount all four drive motors the same way so they behave the same.

  • Mount the motor flat against its bracket and tighten the screws evenly.
  • Check the motor shaft lines up with the wheel shaft or gear it drives.
  • Do not let the motor body carry the robot's weight on its own if your kit offers extra support.
  • Keep the motor's cable exit pointing toward where the cable will run, not toward a wheel.

Motor cables and ports

ConnectionGoes toWhat to watch
Motor power cable (2 wires)A motor port on the Control HubPush fully in; a half-inserted plug can work on the bench and fail in a match
Encoder cable (4 wires)The encoder port with the same number as the motor portMismatched numbers make your sensor readings belong to the wrong motor
Battery to switch to hubThe Control Hub power inputPolarity matters; use the kit's cables rather than making your own
USB / Wi-FiProgramming laptop and Driver StationThe Control Hub has its own Wi-Fi network for the Driver Station

Cable management and strain relief

Cables must never touch wheels, gears or moving mechanisms, and they must never be the thing holding a connector in place. Strain relief means fixing the cable to the frame a short distance from the connector, with a little slack, so that if the cable is pulled the zip tie takes the force instead of the plug.

  • Route cables along the frame and secure them with zip ties every 10-15 cm.
  • Leave a small loop of slack near each connector, then tie the cable down just behind it.
  • Bundle the cables from one motor together and keep them away from sharp edges.
  • Label both ends of each cable, for example FL, FR, BL and BR.
  • Leave the Control Hub's ports and the battery connector easy to reach for repairs.

Configuring motors

  1. 1
    Open the configuration
    Connect the Driver Station to the Control Hub, open the menu and choose Configure Robot, then create a new configuration.
  2. 2
    Pick the hub
    Select the Control Hub Portal, then the Control Hub, then Motors.
  3. 3
    Set each port
    For ports 0 to 3, choose the motor type that matches your motor and type a name such as frontLeft. Names are case-sensitive.
  4. 4
    Save and activate
    Save the configuration with a clear name and make sure it is the active one.
JAVA
1package org.firstinspires.ftc.teamcode;
2
3import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode;
4import com.qualcomm.robotcore.eventloop.opmode.TeleOp;
5import com.qualcomm.robotcore.hardware.DcMotor;
6
7@TeleOp(name = "Chassis Motor Test")
8public class ChassisMotorTest extends LinearOpMode {
9    @Override
10    public void runOpMode() {
11        DcMotor frontLeft = hardwareMap.get(DcMotor.class, "frontLeft");
12        DcMotor frontRight = hardwareMap.get(DcMotor.class, "frontRight");
13        DcMotor backLeft = hardwareMap.get(DcMotor.class, "backLeft");
14        DcMotor backRight = hardwareMap.get(DcMotor.class, "backRight");
15
16        // Left-side motors face the other way, so reverse them
17        frontLeft.setDirection(DcMotor.Direction.REVERSE);
18        backLeft.setDirection(DcMotor.Direction.REVERSE);
19
20        waitForStart();
21
22        while (opModeIsActive()) {
23            // Hold one button to spin one motor at 30% power
24            frontLeft.setPower(gamepad1.x ? 0.3 : 0.0);
25            frontRight.setPower(gamepad1.y ? 0.3 : 0.0);
26            backLeft.setPower(gamepad1.a ? 0.3 : 0.0);
27            backRight.setPower(gamepad1.b ? 0.3 : 0.0);
28
29            telemetry.addData("FL ticks", frontLeft.getCurrentPosition());
30            telemetry.addData("FR ticks", frontRight.getCurrentPosition());
31            telemetry.addData("BL ticks", backLeft.getCurrentPosition());
32            telemetry.addData("BR ticks", backRight.getCurrentPosition());
33            telemetry.update();
34        }
35    }
36}
A simple test OpMode: hold X, Y, A or B to spin one motor slowly and watch its encoder count.

Key terms

Control Hub
The REV controller that runs your code, powers motors and servos, and connects to the Driver Station over Wi-Fi.
Main power switch
The switch between the battery and the Control Hub that turns the entire robot on and off.
Encoder
A sensor on a motor that counts ticks as the shaft turns, so the code can measure rotation and distance.
Strain relief
Securing a cable to the frame near its connector so pulling forces go into the cable tie, not the plug.
Robot configuration
A saved list on the Driver Station that gives each motor or sensor port a name your code uses in hardwareMap.

Practical exercise

Wire, configure and test four drive motors

  1. 1With the main switch off, mount the battery, switch and Control Hub securely on the chassis.
  2. 2Plug each motor's power and encoder cables into matching ports and label both ends of every cable.
  3. 3Route and zip-tie the cables with strain relief, then spin each wheel by hand to check nothing catches.
  4. 4Create and activate a configuration named after your robot with frontLeft, frontRight, backLeft and backRight.
  5. 5Load the test OpMode, place the robot on a stand, and test each motor for the correct wheel, direction and encoder count.
Deliverable: A wired chassis with a labelled wiring photo and a table listing each motor's port number, name, direction and whether its encoder counts up when driving forward.

Knowledge check

Answer every question, then check your answers.

  1. Q1In what order does power flow on a basic FTC robot?
  2. Q2What does strain relief do?
  3. Q3Your code uses hardwareMap.get(DcMotor.class, "frontLeft") but the OpMode crashes saying it cannot find the device. What should you check first?
  4. Q4When you hold the button for the front-left motor, the back-right wheel spins. What is the most likely problem?

Further resources

Mark lesson complete