Ultrasonic Sensor Robot Car
In the BlueStamp Engineering Summer Program, I built an Ultrasonic Sensor Robot Car using an Arduino UNO. I connected the ultrasonic sensor the Arduino UNO and connected that to the motor driver. The ultrasonic sensor can detect objects and change direction of the car to avoid hitting it.
Areas of Interest
Computer Engineering/ Computer Science
Washington High School
Milestone 1 Video
Car Going Forwards and Backwards (only)
My first milestone of this project was getting the robot car to be able to go forward and backwards with every four seconds. This was a very important milestone and I spent quite some time achieving this milestone. From the wiring of the motor driver to the coding, I encountered many problems on this milestone, however, in the end, I was able to accomplish it. The car was able to go forwards and backwards and this is a good first step in my project.
Milestone 2 Video
My second milestone was getting the ultrasonic sensor to read distances. I wanted the ultrasonic sensor to read how close my hand was to the sensor and print the distances on the serial monitor. I had a very difficult time accomplishing this milestone because I spent multiple days trying to debug this code. However, through a lot of hard work, I was able to accomplish the milestone and the ultrasonic sensor read the distance of my hand and printed it on the serial monitor.
My final milestone at BlueStamp was getting the ultrasonic sensor and the robot car to communicate with each other and for the car to move whenever it would come close to an object. The code I wrote for the robot car, made the car turn right whenever it would come within 35 centimeters of a detected object. This was the hardest milestone for me because getting the car and ultrasonic sensor to communicate was very difficult. There were many challenges on the way, however, I persevered through it all and the car and ultrasonic sensor were able to communicate.
Milestone 3 Video
How It Works
The motor driver is connected to the Arduino UNO in the back of the car. The battery pack is hot glued down in the front of the car and it powers the motor driver which powers the TT Gear Motor in the bottom. In the front of the car, the ultrasonic sensor is placed and it is connected to the Arduino UNO in the back. The sensor acts like a pair of eyes for the car. Because the UNO can’t be connected to the laptop while it is running, I uploaded the code to the UNO beforehand and then I’m powering it with a power bank. The code that I uploaded into the Arduino is programmed so that the ultrasonic sensor moves the car to the right whenever it detects an object within 35 centimeters. In addition, a LED Light is connected in the back of the Arduino which acts like a type of brake light. It lights whenever the car is within 5 centimeters of an object and the car is programmed to immediately go backwards. This car isn’t just a typical robot car that goes forward and backwards without any limits, rather it is a robot car that goes in multiple directions with a mind of its own. It doesn’t crash into objects and simulates as if someone were actually driving the car.