MSP-430 Autonomous Black-Line Following Car

This embedded systems autonomous car was created for my ECE-306 course. Though at times I found myself very frustrated and overwhelmed, I really enjoyed this introductory course to embedded systems as it provided me with tangible evidence of my success at the completion of the course.

The car is designed to locate, align path of travel, and follow a black line through a course autonomously. The LCD was used to display a user scrollable menu for routine selection, routine progress indicator, and car status. Motor control was implemented using Pulse Width Modulation (PWM). Virtual timers and hardware interrupts were implemented for movement routine timing, and black line detection. Infra-Red (IR) emitters and detectors were used to detect the black line by measuring the intensity of the IR surface reflection.

Though the car is autonomous when following a black line, I also added functionality to enable the car to be controlled with a laptop keyboard as a remote control. The remote control functionality was achieved by writing a Python script for commands, using WiFi connectivity and UART serial communications to relay control signals to the cars software. I also implemented a soft reset for the system if an error was detected in the remote communications protocol. The soft-reset would completely reboot the system and re-establish all remote communication protocols without physically touching the car.

During the course some “starter code” was incrementally provided as a means of keeping the 100+ student roster on the same page. I took this opportunity to understand what the starter code was trying to do, and then implementing my own version of the starter codes functionality. This not only helped me in the long-run with the project by understanding the intricacies of the system, but also allowed me to streamline my car and be as efficient as possible.

At the conclusion of the ECE-306 course I was the second student of 100+ students to finish the obstacle course successfully, finishing in under 2 hours and 3 attempts. Over 90% of the students enrolled took more than 2 days and multiple attempts to complete the final obstacle course.

External switched voltage regulator that I designed from scratch using the regulators data sheet. This was outside of the scope of the course, but I deemed it necessary for success. Without this -as the battery pack weakened from use- the car would not produce the same end result when repeatedly selecting the same routine. With this -the car would always produce the same end point result because the system maintained a known constant voltage.
Using virtual timers and interrupts to control movement routine
First attempt at following the line

The project in its entirety can be found in the Git repository below.
(You must be logged in to view the contents of the repository)

https://git.robsengineeringadventures.com/rmhunter/306-car

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.