Skip to content

CharlesMve/autonomousCar

Repository files navigation

Autonomous Track-Following Car (TI Cup)

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


Project Overview

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.


Key Features

  • 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)

Hardware Components

  • 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

Software Architecture

Camera Processing Pipeline

  1. Acquire raw camera data via ADC
  2. Apply 5-point moving average smoothing
  3. Compute dynamic threshold
  4. Calculate Center of Mass (COM)

Steering Control

  • Servo duty cycle range: 5.0% – 10.0%
  • Center position: 7.5%
  • Duty cycle adjusted proportionally based on COM offset

Speed Control

  • Speed decreases as COM deviates from center
  • Configurable speed modes via onboard switches

Motor Control

  • PWM-based DC motor control using TimerA0
  • Independent forward/reverse channels for each motor
  • Differential steering applied during turns

Repository Structure

├── main.c            --> Primary firmware source
├── Library Files/  --> Camera, UART, ADC, timer, and motor drivers
└── Car_Report.pdf --> Full IEEE technical report


Results & Performance

  • 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


Lessons Learned

  • 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

Future Improvements

  • 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

Authors

  • 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


Acknowledgments

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

License

This project is provided for educational and portfolio purposes.
Reuse is permitted with attribution.

About

Autonomous track-following vehicle

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages