Lego Mindstorm: Making PID Controller And Ultrasonic Distance Sensor

Teammates: Drish Hansrrajani, Duy Dang

Building a PID controller and ultrasonic distance sensor to guide a Lego Mindstorm unmanned vehicle through path tracking, parking, and platooning


Overview

In this project, my teammates and I worked on a PID controller for the Lego Mindstorm Unmanned Vehicle. We designed the controller and distance sensor to complete the following tasks: path tracking, parking, and platooning.

Ideas

The route below shows the path the UV navigated, covering a path-tracking section, a parking maneuver, and a platooning sequence.

Implementations

We first tested a few designs to build the UV to find a good structure that provided relatively high speed and stability. Then, we coded the PID controller in MATLAB. I was in charge of the hardware part and designed the distance sensor. I used the 555 timer to generate PWM signals for the ultrasonic sensor and then filtered the results with an RC low-pass filter. Lastly, we wrote programs for fine-tuning.

Reflections

I enjoyed this project and found it invaluable for applying theories I had only encountered in class. I had a dream where I was a PID controller with auto-tuning features. I also wrote a long reflection called "If I were a PID Controller," which I couldn't find anymore.

Made with by Zoe