Field
Robotics
Development Duration
Components
Electronic components
Development Tools
mbed
Kicad
Project type
Personal Project
I designed and manufactured a motor controller board for controlling the motors of a competition robot.
The board is used in combination with commercially available motor driver boards and can control two DC motors. Rotary encoders and potentiometers can be connected as feedback sensors, and successful PID control was verified through operational testing.
PID control of two DC motors
Cascade connection using LAN cables
A follower board receives commands from the main controller board and controls the connected motors
Two AMT102-V rotary encoders
Two potentiometers
Two Pololu G2 High-Power Motor Drivers
The board consists of the following components:

LAN cable connector
Motor power supply connector
Reset switch
Full-color LED, with only the blue and red channels connected
Motor driver connector for Motor 1
Motor driver connector for Motor 2
Power and I/O output pins
Potentiometer connector for Motor 1
Potentiometer connector for Motor 2
Rotary encoder connector for Motor 1
Rotary encoder connector for Motor 2
Nucleo F042K6 microcontroller board


The PID parameters were tuned using the following process.
At this stage, it was acceptable for the steady-state value to remain significantly different from the target value.
The integral gain was adjusted so that the motor speed reached the target value. A small amount of overshoot was considered acceptable at this stage.
The derivative gain was added and adjusted to suppress rapid changes and eliminate overshoot.
The PID parameters were tuned by connecting an actual motor and evaluating its response.
Horizontal axis: Time
Vertical axis: Rotational speed
Blue line: Target value
Red line: Measured value
Kp = 0.2

Kp = 0.2, Ki = 0.04

Kp = 0.2, Ki = 0.04, Kd = 0.65




