Much of our time was spent coding and experimenting with a number of sensors. These included:

  • Infrared Line Tracking Sensor
  • Accelerometer
  • Ultrasonic Distance Sensor
  • Lidar Sensor
  • Pi Camera Module V2
Line Tracker

The line tracker was the first sensor we decided to use for the sake of navigation. The linetracker uses five aligned infrared sensors to read the reflectivity of the surface it is pointed towards. After converting the digital inputs to analog outputs using a Digital-to-Analog converter, we tried adjusting the car’s steering depending on which side of the sensor the line was detected. Unfortunately, we soon realized that the line tracker was only effective at detecting black lines, so to avoid repeating the challenge required by the previous year’s Pi Car capstone, we ultimately decided not to use the linetracker.

Waveshare Infrared Line Tracking Sensor
Accelerometer

The accelerometer was the first sensor we used, and by connecting it to our Pi board we could find the X, Y, and Z acceleration of the RC car. While we originally thought this could be useful to control our stopping, the sensor would react to extremely small movements of the car, making the data difficult to use.

MPU6050 Accelerometer
Ultrasonic

The ultrasonic sensor uses sound waves to detect the distance of objects in a 15 degree cone in front of the sensor. Indoors, this sensor is fairly reliable and easy to use, and so we implemented this sensor onto our car to avoid obstacles. Outdoors, however, this sensor would sometimes be extremely unreliable due to wind, dust, and other external factors. For this reason, we limited its use to only work as a last resort if the car was very close to colliding with an object.

HC-SR04 Ultrasonic Sensor
LIDAR

The lidar was the most complicated to use with ROS, though from some early experiments it did seem to provide accurate data by providing angle offset and distances of potential obstacles. As we originally pursued the ultrasonic as our main tool for measuring distance, however, we decided not to revamp our whole system to use this more sophisticated sensor.

Slamtec RPLIDAR A1
Camera

This was by far the most important sensor used for this project. Once we decided against the use of the linetracker as a navigation tool, we turned to the idea of using image processing to guide the car along the proper path. We did this in conjunction with a series of colored signs along the course for the car to navigate towards, which ultimately worked. A detailed breakdown on how we used this sensor can be found on the final design page.

Raspberry PiCamera with Attached Ribbon Cable