LIDAR Adaptive Cruise Control

         This project was inspired from personal interest and a desire to showcase some of my skills. The objective was to create an electromechanical system to dynamically change the cruise control setting on my car. A LIDAR Lite v3 sensor was used for distance measurements.

         Two linear actuators (solenoids) were attached to a 3D printed fixture to interface with the cruise control buttons.

        The solenoids were connected to a relay which controlled a 12 volt power source from the car. An Arduino Mega was used to control the entire system. Other various circuit components were added for additional functionality including a speaker and button to change modes. The different modes made it easier to test individual features of the code and also allowed for different operating modes such as near/far minimum following distances and increased/decreased responsiveness.

        The code's primary functions were to smooth the incoming measurements from the LIDAR sensor using a rolling average, detect trends in either increasing or decreasing distance, and activate the solenoids to modify the cruise control setting to maintain a minimum following distance when a vehicle is detected and resume the original set speed (before slowing down) when a vehicle is not detected. 

        The pictures below show the solenoids attached to the car's cruise control.

        A "water proof" acrylic housing was made to protect the LIDAR sensor and was installed behind the front emblem (3D printed). 

        Overall, the project was a success. There are still some improvements I would like to make in the future, such as refining the code further and attaching a servo motor to the LIDAR sensor to allow it to adjust for turns/hills and perform a "sweeping" function to increase the area of detection and identify objects.