Light Following Autonomous Vehicle

Mechatronics Project

Fig 1. Robot Block Diagram

The assignment was an open-ended prompt to build any device with a feedback loop; the result was a completely self-designed vehicle built to follow the brightest light source available. The platform being used for this project was the Texas Instruments MSP432 microcontroller development board, which can be programmed in the C programming language.

The first step was to determine how the robot would function. Three light dependent resistors at the front of the robot would provide an input to the microcontroller’s Analog-to-Digital Converter to determine the direction of the light source. The microcontroller then generates a PWM signal for each motor to turn the vehicle towards the light source. Quadrature encoders on both motors provided the input to a control algorithm implemented in code to ensure the vehicle determined the direction efficiently and then moved towards it in a straight line.

The next step was to select all the components the robot would require. The first consideration was what the power source would be, as it needed to be powerful enough to power the motors but also compact and mobile. Next, the specific integrated circuits that were needed to interface with the motors and encoders were selected. Finally, the materials and components for the body of the vehicle were selected.

Fig 2. 3D Model of Vehicle

A SolidWorks model was created as a first prototype to determine the placement of the parts of the robot as well as provide models that could be used to 3D print anything custom-made. I was assisted in this step by Kenny Adcox, a colleague from Georgia Tech Solar Racing. The electronics were assembled and tested on prototyping boards. Once the circuits were operating as desired, I started to design the layout of a custom circuit board that would reduce the amount of wiring required; making a very neat electronics package that could attach directly to the MSP432 development board.
I could now assemble the vehicle and start tuning the control algorithm  in code to have the best results. The results of the light following and PID controller can be seen in the videos below.

Fig 3. Motor Driver Shield Schematic
Fig 4. Motor Driver Shield
Fig 5. Motor Driver Shield Installation

The final iteration of the vehicle, though functional, had room for improvement. With more time and resources the following improvements can be made to the robot:

•   Using motors with higher sensitivity to PWM signals

•   More robust light sensors to allow for use in various lighting scenarios

•   Improved control of direction, heading, and response time by implementing a better tuned control algorithm.

Straight Line Response (0°)

45° Response

60° Response

30° Response

90° Response

Moving Source