Final Report
Final Report
Student ID : 033236
Group Name : Robo Boys
Group Number : 16
Table of Contents
1.0 Return of Failure (ROF)
4.0 Evidence
4.1 Concept of design
4.2 Coding
5.0 Conclusion
SCHOOL OF ENGINEERING
PRJ 62404 ENGINEERING DESIGN AND ANALYSIS
Complete the sections below. You may expand the space and use diagrams and pictures as necessary
This error was was caused by technical reasons. The sensors were probably too old or faulty. We tested our
ultrasonic sensors on other groups Arduino and concluded that it was the sensors that were faulty.
Why did this failure happen? Ultrasonic sensors gave wrong values
Why did it give wrong values? The sensors were faulty
Why was it faulty? Ultrasonic sensors were handled roughly
Why was it handled roughly? No prior experience
Why no prior experience? Most of them had no experience in handling electronic components
Are there any other ways that you could have failed to achieve your objectives?
We could have also had a faulty Arduino and motor shield which might have gave us the wrong values.
Describe how you will use the insight above so that you eliminate or minimise the possibility of failure
in the future.
We should have checked the sensors when we got them right away and quickly come to a decision if we need
to replace them at the lab or purchase new ones.
Complete the sections below. You may expand the space and use diagrams and pictures as necessary
We had a faulty motor shield which was a technical error. We tried uploading our coding into the Arduino
connected to the motor shield and our robo car was moving in all wrong directions. We tested our coding on
another groups car and it worked perfectly fine. Hence, we decided that we need a new motor shield.
Are there any other ways that you could have failed to achieve your objectives?
Our motor shield could have been spoilt because of the rain. Sometimes it rains when we walk back our
respective homes and the rain could have spoiled the motor shield since it has no cover over it.
Describe how you will use the insight above so that you eliminate or minimise the possibility of failure
in the future.
Handle the motor shield and arduino carefully and cover te car with suitable cover material to avoid rain
droplets from falling into it.
We have to all agree upon something before coming to decision instead of taking one without consulting other
members and groups.
SCHOOL OF ENGINEERING
PRJ 62404 ENGINEERING DESIGN AND ANALYSIS
Complete the sections below. You may expand the space and use diagrams and pictures as necessary
Are there any other ways that you could have failed to achieve your objectives?
Battery could have exploded if the positive and negative terminals were connected wrongly.
Describe how you will use the insight above so that you eliminate or minimise the possibility of failure
in the future.
Be very careful as to how long we charge the battery and make sure the terminals are connected correctly
every single time. It is much better to use jumper cables which are black and red to make sure the connections
are done correctly.
This is the final design of the robocar. This figure is shown from the side left view of he robocar.We
have managed to complete the car according to iniatial design. Although we could not lay the wires in
between the two chassis as the wires were short and out of reach to the ultrasonic and IR sensors.Our final
design was agreed upon after conducting a SWOT analysis on every component of the car carefully. We
have used double sided tape to attach the ultrasonic sensors since it’s a cost saving method with the exact
same results of having a bracket.
Meeting Minutes
Evidence 1
Evidence 2
Evidence 3
Evidence 4
Evidence 5
Evidence 6
Evidence 7
Evidence 8
Team
Analysis
Evidence 1
Evidence 2
Evidence 3
Evidence 4
Evidence 5
Evidence 6
Figure 3 shows Kavin assembling the chassis of the car and soldering the
motor wires
void setup() {
Serial.begin (9600);
pinMode(trigPin1, OUTPUT);
pinMode(echoPin1, INPUT);
pinMode(trigPin2, OUTPUT);
pinMode(echoPin2, INPUT);
pinMode(trigPin3, OUTPUT);
pinMode(echoPin3, INPUT);
pinMode(irSensorFront, INPUT);
}
void loop() {
digitalWrite(trigPin1, LOW);
delayMicroseconds(2);
digitalWrite(trigPin1, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin1, LOW);
durationF = pulseIn(echoPin1, HIGH);
distanceF = durationF * 0.034/2;
digitalWrite(trigPin2, LOW);
delayMicroseconds(2);
digitalWrite(trigPin2 , HIGH);
delayMicroseconds(10);
digitalWrite(trigPin2, LOW);
durationL = pulseIn(echoPin2, HIGH);
distanceL = durationL * 0.034/2;
digitalWrite(trigPin3, LOW);
delayMicroseconds(2);
digitalWrite(trigPin3, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin3, LOW);
durationR = pulseIn(echoPin3, HIGH);
distanceR = durationR * 0.034/2;
Serial.println("distanceF =");
Serial.println(distanceF);
Serial.println("distanceL =");
Serial.println(distanceR);
Serial.println("distanceR =");
Serial.println(distanceL);
////////// IR SENSOR////////
Sensorvalue1 = analogRead(irSensorFront);
Serial.print("FrontSensor:");
Serial.println(Sensorvalue1);
//////////COMMAND/////
if ((distanceF >= 15) && (distanceR >= 5) && (distanceL >= 5)) {
///FORWARD///
Serial.println("W");
digitalWrite(M1, LOW);
digitalWrite(M2, LOW);
analogWrite(E1, 75);
analogWrite(E2, 75);
}
//left//
{
Serial.println("A");
digitalWrite(M1, LOW);
digitalWrite(M2, HIGH);
analogWrite(E1, 200);
analogWrite(E2, 200);
delay(300);
}
else if ((distanceL >= 13) && (distanceF >= 20)&& (distanceR <= 13))
/////////SLIGHT left/
{ digitalWrite(M1, LOW);
digitalWrite(M2, HIGH);
analogWrite(E1, 100);
analogWrite(E2, 100);
delay(180);
}
else if ((distanceF >= 20) && (distanceR >= 13) && (distanceL <= 13))
{ //SLIGHT right//
digitalWrite(M1, HIGH);
digitalWrite(M2, LOW);
analogWrite(E1, 100);
analogWrite(E2, 100);
delay(180);
}
if((Sensorvalue1>450))
{
digitalWrite(M1, LOW);
digitalWrite(M2, LOW);
analogWrite(E1, 0);
analogWrite(E2, 0);
delay(5000);
} }
[21:26, 21/11/2019] Mazin Taylors: int E1 = 10;
int M1 = 12;
int E2 = 11; ///////////////low/high(right)////high/low(left)
int M2 = 13;
char incoming_byte = 0;
int value = 0;
int irSensorFront = A0;
int Sensorvalue1 = 1;
#define echoPin1 2 // Echo Pin Front
#define trigPin1 3 // Trigger Pin Front
#define echoPin2 7 // Echo Pin Left
#define trigPin2 6 // Trigger Pin Left
#define echoPin3 8 // Echo Pin Right
#define trigPin3 9// Trigger Pin Right
long durationF, distanceF;// Duration used to calculate
long durationL, distanceL;
long durationR, distanceR;
void setup() {
Serial.begin (9600);
pinMode(trigPin1, OUTPUT);
pinMode(echoPin1, INPUT);
pinMode(trigPin2, OUTPUT);
pinMode(echoPin2, INPUT);
pinMode(trigPin3, OUTPUT);
pinMode(echoPin3, INPUT);
pinMode(irSensorFront, INPUT);
}
void loop() {
digitalWrite(trigPin1, LOW);
delayMicroseconds(2);
digitalWrite(trigPin1, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin1, LOW);
durationF = pulseIn(echoPin1, HIGH);
distanceF = durationF * 0.034/2;
digitalWrite(trigPin2, LOW);
delayMicroseconds(2);
digitalWrite(trigPin2 , HIGH);
delayMicroseconds(10);
digitalWrite(trigPin2, LOW);
durationL = pulseIn(echoPin2, HIGH);
distanceL = durationL * 0.034/2;
digitalWrite(trigPin3, LOW);
delayMicroseconds(2);
digitalWrite(trigPin3, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin3, LOW);
durationR = pulseIn(echoPin3, HIGH);
distanceR = durationR * 0.034/2;
Serial.println("distanceF =");
Serial.println(distanceF);
Serial.println("distanceL =");
Serial.println(distanceR);
Serial.println("distanceR =");
Serial.println(distanceL);
////////// IR SENSOR////////
Sensorvalue1 = analogRead(irSensorFront);
Serial.print("FrontSensor:");
Serial.println(Sensorvalue1);
//////////COMMAND////
///FORWARD///
{
digitalWrite(M1, LOW);
digitalWrite(M2, LOW);
analogWrite(E1, 75);
analogWrite(E2, 75);
delay(2000);
digitalWrite(M1, HIGH);
digitalWrite(M2, HIGH);
analogWrite(E1, 0);
analogWrite(E2, 0);
delay(2000);
digitalWrite(M1, HIGH);
digitalWrite(M2, HIGH);
analogWrite(E1, 75);
analogWrite(E2, 75);
delay(1300);
digitalWrite(M1, HIGH);
digitalWrite(M2, LOW);
analogWrite(E1, 75 );
analogWrite(E2, 75);
delay(2000); }