top of page

Obstacle Avoidance Robot

(C++)

rob1.jpg
robotblock.PNG

For a graduate Mechatronics class project, I wanted to get some exposure to sonar technology, so I decided to build an obstacle avoidance robot. 

To assemble the robot, I purchased a chassis from Amazon, which includes a whole DIY kit, however I only used the components required for the robot body and my own TI MSP 432 board instead of the Arduino Uno provided. Instead of just one sensor, I decided to implement five. This was for the added challenge of reading many sensors at once, and so that the controller can take immediate measurements from multiple directions. The robot is powered by 6 AA batteries and uses two DC motors, with one H-bridge motor driver for locomotion. 

 

The logic for obstacle avoidance includes a simple bang-bang control, where the robot moves forward continuously until it detects an obstacle based on a user set threshold from one of the three sensors in the front. Comparing the sensor data from both sides, it then makes a decision on which way to turn, completes the turn, and moves forward again. 

I was very happy with how this project turned out. Because the MSP 432 board does not come with any libraries on ultrasonic sensors, I had to program their functionality from scratch -which required knowledge on hardware interrupts, registers and internal clock timers. 

 

In contrast to avoidance, the robot can be programmed to follow objects. Here's a video where I programmed the robot to stay within a threshold (~20 cm) of an object, and follow/ back up if it gets too close using a PID controller. In the future, I'd like to learn more about and implement some motion planning algorithms

Here's an electronic schematic of the robot. The source code for this project can me found here!

obstacle.PNG

Eugene Zaverukha

Brooklyn, NY

Contact Me

linkedin.png
bottom of page