This repository contains the firmware and supporting materials for an autonomous track-following car developed for the Texas Instruments (TI) Cup, a competitive embedded systems project hosted by the Rochester Institute of Technology (RIT) Computer Engineering Department.
The system demonstrates real-time embedded control, sensor processing, and closed-loop motor control on a resource-constrained microcontroller platform.
📄 Full Technical Report:
Car_Report.pdf
The goal of this project was to design and implement firmware capable of autonomously navigating an unknown track using a 128-pixel line scan camera, a servo steering system, and dual DC motors.
Instead of traditional edge-detection steering, this system uses a Center of Mass (COM)–based steering algorithm with dynamic thresholding to achieve smoother, more stable control at high speeds.
The firmware was written in C and runs on a Texas Instruments MSPM0 LaunchPad.
-
Center of Mass (COM) Steering
- Computes the weighted average of camera intensity values to locate the center of the track
- More robust and less oscillatory than edge-based steering
-
Dynamic Thresholding
- Threshold adapts based on camera lighting conditions
- Prevents noise and background interference from affecting control decisions
-
5-Point Moving Average Filter
- Smooths raw camera data to reduce noise
- Optimized for low latency using integer arithmetic and bit shifts
-
Variable Speed Control
- Vehicle speed decreases on sharper turns
- Speed is proportional to distance from track center
-
Differential Motor Steering
- Inner and outer wheels rotate at different speeds during turns
- Improves stability and cornering performance
-
Carpet Stopper / Off-Track Detection
- Motors automatically disable when track is lost
- Prevents runaway behavior during testing
-
Optional PID Servo Control
- Proportional control is always used
- Integral and Derivative control were implemented and tested (commented in code)
- MCU: Texas Instruments MSPM0 LaunchPad
- Sensor: TSL1401-DB 128-pixel line scan camera
- Motors:
- 2× DC motors (H-bridge controlled)
- 1× hobby servo motor (PWM steering)
- Motor Driver: External H-bridge board
- Power: Dual battery pack
- Chassis: Pre-assembled competition kit with custom PCB
- Acquire raw camera data via ADC
- Apply 5-point moving average smoothing
- Compute dynamic threshold
- Calculate Center of Mass (COM)
- Servo duty cycle range: 5.0% – 10.0%
- Center position: 7.5%
- Duty cycle adjusted proportionally based on COM offset
- Speed decreases as COM deviates from center
- Configurable speed modes via onboard switches
- PWM-based DC motor control using TimerA0
- Independent forward/reverse channels for each motor
- Differential steering applied during turns
├── main.c --> Primary firmware source
├── Library Files/ --> Camera, UART, ADC, timer, and motor drivers
└── Car_Report.pdf --> Full IEEE technical report
- Successfully completed all pre-race demonstrations
- Achieved class-best unofficial lap time of 26.8 seconds
- Demonstrated stable steering at high speeds
- Identified and corrected a race-day configuration error post-competition
Detailed performance metrics, diagrams, and analysis are available in the full report: 👉 Car_Report.pdf
- COM-based steering significantly reduces oscillations compared to edge detection
- Minimizing UART output is critical for real-time responsiveness
- Latency-aware algorithm design is essential in embedded control systems
- Differential steering provides substantial performance gains in tight turns
- Adaptive differential steering based on servo angle
- Full PID tuning with dynamic gain adjustment
- Hardware interrupt optimization for lower latency
- Improved fault detection and recovery
-
Jean-Charles Mve
B.S./M.S. Computer Engineering, RIT
Firmware, algorithms, and control logic -
Joshua Derosier
B.S. Computer Engineering, RIT
Hardware integration and mechanical design
Special thanks to the RIT Computer Engineering faculty and teaching assistants for their guidance throughout the project, including:
- Dr. Stephanie Soldavini
- Gino Porretta
- Christian Ryan
- Maya Kaul
- Oliver Vinneras
- Eliot Nagy
This project is provided for educational and portfolio purposes.
Reuse is permitted with attribution.