ENGR351 Lab 2020 Fall
Project
Name:
Nicolas Llarena
Email: Njllarenaarias@fortlewis.edu

1. Project - Robot Car

2. Introduction
This project will consist of many different tasks. We will get to work with different sensors and remotes as well as a Robot car. We will learn how to code the sensors and an IR remote to work together with the car to transform the car into a smart car. We will test and showcase the different functionalities that can be achieved with this car.

3. Materials
Materials Quantity
Elegoo Robot car
1
IR Remote
1
3.7V  Batteries
2
Ultrasonic Sensor
1
Electrical Tape
1 Roll
arduino UNO
1
jumper wires
10

4. Results

Task 1 & 2

         
Task 2. Task 1 was already done when asked to assemble car, task 2 required the use of arduino and an ultrasonic sensor to test different distance measurements.


Task 3


Task 3. The robot car was used to turn the servo motor by using a small sippet of code shown in the video above.

Task 4


Task 4. The DC motors of the car were turned on and the speed was controlled by using the PWM module shown in the video above.

Task 5

             
Task 5. The three sensors under the car that controll the line follower were tested. First, the middle sensor was tested using black tape and a sheet of white paper. then the right and last, the left all shown in the videos above.

Task 6


Task 6. This was the start of the main project, in this task, I coded the robot to work with one mode only, the IR sensor. functionalities include Forward, Reverse, Right, Left, and Stop.

Task 7


Task 7. This task included the Line tracker. I added code to task 6 so we can have two modes, IR remote and Line follower. Demonstration shown on video above. (for code refer to last section)

Task 8

\
Task 8. Last task including task 6 and 7 to form a three-mode robot car. This car has all capabilities of last two tasks plus being able to detect obstacles and avoid them. All modes can be controlled with an IR sensor. (code below)


Code Used

                                                
Code Used. Figures above represent all the code used for task 6,7, and 8.



Discussion

This was Our last Project in this class. When we started this project I had some familiarity with the line follower car since we worked on an analog version of it a year ago. Regardless, I still learned many new things like how the PWM module an help with adjusting the DC motors speed and how the ultrasonic sensor can help with obstacle avoidance. The three sensors on the bottom of the car were very sensitive which helped in the overall control of the car when following the line. The floor in my house made it difficult for the car to follow the black tape since the edges of my tiles are black as well. To overcome this issue, I taped white pieces of paper on the edges of tiles to trick the car into ignoring the edges. even though it did not look pretty, it worked. My favorite part of this whole project was working with the obstacle avoidance and understanding the code. I think ultrasonic sensors are extremely useful in many things. I look forward to working with them in the future.