Skip to content
Electrical & Wiring·Lesson 20 of 34

Mini-Project 1: A Single-Motor Test Stand from Battery to Spin

Wire one motor controller from a fresh battery to a spinning output, the right way, as a reusable bench rig.

Sign in to track progress, earn XP, and save lessons.

A motor test stand is the single most useful thing an electrical sub-team can build. It lets you prove a motor, a controller, and your code without the whole robot. Here is the full bill of materials and build order.

BOM: MK ES17-12 12V SLA battery (12V, 18Ah; sold by REV as REV-19-2487 and by AndyMark), an Anderson SB-50 connector pair, a Cooper Bussmann 120A main breaker (CB185-120), a power distribution device (REV PDH REV-11-1850 or CTRE PDP), a roboRIO, a REV SPARK MAX, one NEO/Kraken motor, a 40A ATO/AT2-style auto-resetting breaker (the PDH takes ATO blade-style breakers, e.g. the REV ATO breaker or AndyMark am-4947; the classic Snap-Action MX5-A fits the legacy CTRE PDP instead), plus 6 AWG, 12 AWG, and 18 AWG wire.

Build order (mirrors WPILib's wiring guide):

  1. Crimp a ring terminal to the red lead of the SB-50 connector, then run 6 AWG from the battery connector to the main 120A breaker. The main breaker is the only thing that touches the battery directly.
  2. Run 6 AWG from the breaker's load terminal to the PD's positive input, and 6 AWG from the SB-50 negative straight to the PD negative. Wire gauge here is mandated by rule R609 (6 AWG / 16 mm minimum on the battery-to-breaker-to-PD path).
  3. Power the roboRIO from a dedicated PD output through 18 AWG to the roboRIO's power input. On the PDH this is a fused low-current channel; on the PDP use the dedicated roboRIO connector.
  4. Insert a 40A ATO/AT2-style breaker into a high-current PDH channel and run 12 AWG to the SPARK MAX +/- input terminals. R622 requires 12 AWG for any 31-40A circuit.
  5. Wire the motor output: motor red to controller M+, black to M- (for a NEO over the SPARK MAX's screw terminals).
  6. CAN: yellow=CANH, green=CANL, daisy-chained roboRIO -> SPARK MAX -> PD.

Smoke test: Before connecting the battery, verify polarity with a multimeter at the PD input pads. Then plug in. The roboRIO Power LED should go solid green.

Minimal code to spin it (WPILib + REVLib 2025):

import com.revrobotics.spark.SparkMax;
import com.revrobotics.spark.SparkLowLevel.MotorType;
import com.revrobotics.spark.config.SparkMaxConfig;
import com.revrobotics.spark.config.SparkBaseConfig;
import com.revrobotics.spark.SparkBase.ResetMode;
import com.revrobotics.spark.SparkBase.PersistMode;

public class Robot extends TimedRobot {
  private final SparkMax motor = new SparkMax(5, MotorType.kBrushless);
  private final XboxController stick = new XboxController(0);

  public Robot() {
    SparkMaxConfig cfg = new SparkMaxConfig();
    cfg.smartCurrentLimit(40)
       .idleMode(SparkBaseConfig.IdleMode.kBrake);
    motor.configure(cfg, ResetMode.kResetSafeParameters,
                    PersistMode.kPersistParameters);
  }

  @Override public void teleopPeriodic() {
    motor.set(stick.getLeftY());
  }
}

Note that IdleMode lives on SparkBaseConfig in REVLib 2025, and the CAN ID 5 in the constructor must match the ID you set in the REV Hardware Client. Keep this stand intact all season as your go-to debug rig.

Key takeaways

  • Battery -> SB-50 -> 120A main breaker -> PD is the only path that uses 6 AWG (R609); a 31-40A motor circuit downstream uses 12 AWG (R622).
  • Always verify polarity with a multimeter before connecting the battery.
  • The SPARK MAX CAN ID in code must match the ID assigned in the REV Hardware Client, and IdleMode is on SparkBaseConfig in REVLib 2025.

Lesson quiz

Required

Answer all 3 questions correctly to complete this lesson.

1.In a single-motor test stand, what is the role of the 120A main breaker wired between the battery and the power distribution board?

2.What wire gauge does FRC wiring guidance specify for the main power path from the battery through the main breaker to the power distribution board?

3.On the path from battery to a spinning motor, where does the motor's two power leads connect?

Answer every question to submit.