2022 TI Cup · Jiangsu First Prize
Dual-Vehicle Following System
Two vehicles built around the MSP430F5529 coordinate their movement along a track. Grayscale line sensing, ultrasonic ranging, Bluetooth communication, and encoder-based PID speed control support following at a target separation of 20 cm, catching up, and overtaking.
My role
As captain of the three-person team, I designed the MCU, power, and motor-driver circuits, wrote and tuned the PID control framework, and coordinated hardware/software interfaces and system integration.
Line-tracking and Bluetooth software were team contributions. My software work focused on the PID framework, parameter tuning, and full-system testing.
- Competition
- 2022 Jiangsu College Student Electronic Design Competition (TI Cup) · Problem C
- Platform
- MSP430F5529 · MG310 · TB6612 · LM2596
- Control target
- Target following distance: 20 cm
- Team
- Jiangsu Normal University · Three-person team · Team captain
System architecture
Line sensors provide track-position information, the ultrasonic module measures separation, and Bluetooth connects the vehicles. The controller combines these inputs into motion commands, with encoder feedback and a PID speed loop controlling the motors.
Inter-vehicle Bluetooth
Motion commands · PID speed loop
PWM / direction · Motors
Circuit design
Two TB6612 modules drive four MG310 geared DC motors, while an LM2596 supplies the control electronics. The MCU connects the sensors, encoders, motor drivers, and serial modules. The interface, power, and driver diagrams below come from the design report.

MCU interfaces
MSP430F5529 development-board interfaces for encoders, PWM, line sensors, ultrasonic ranging, and Bluetooth.

LM2596 buck converter
The LM2596 converts the 7.4 V battery supply to 5 V for the controller board and peripheral modules.

TB6612 motor driver
The TB6612 drives MG310 motors from PWM and direction signals, with a 7.4 V motor supply and 5 V logic supply. Two modules control four motors.
PID speed control
I wrote the PID speed-control framework to adjust PWM from the difference between target and encoder-measured speed. I then tuned the parameters through repeated vehicle tests, checking response and following behavior.
Following, catching up, and overtaking
Line sensing and ultrasonic ranging guide direction and speed adjustments toward the 20 cm following-distance target.
When the rear vehicle falls behind, it adjusts speed based on the measured distance to catch up and resume following.
Communication between the vehicles coordinates overtaking. Integration tests check maneuver transitions and collision avoidance.
Competition demo
The team won First Prize in Jiangsu.