Etc Report PDF
Etc Report PDF
Submitted by:
Ayush (E09)
Bhanuteja(E63)
Reeshav(E54)
Bhavdeep(E11)
Ayush (E09)
Bhanuteja(E63)
Reeshav(E54)
Bhavdeep(E11)
and submitted for the partial fulfilment of the requirements of the subject,
Emerging Technology Course (Subject Code: 22ETC151)
Mr. Rajesh A
Assistant Professor
Department of Mechanical
Engineering
NHCE, Bangalore
CHAPTER 1
ABSTRACT
The spark that ignited our fascination with the Object-Following Robot was
not merely about circuitry or programming, but rather the prospect of
creating a companion that could follow us on our journeys, mirroring our
every move. It's an idea that tugs at the strings of imagination, reminiscent
of childhood dreams where our toys would magically come to life.
Our choice was not solely based on the technical challenges involved,
though there were plenty. It was about the enchantment of witnessing an
inanimate creation come to life, embodying the spirit of innovation and
breaking free from the limitations of conventional thought. The Object-
Following Robot was our canvas, and we were the artists painting a picture
of connection and synergy between the human heart and the electronic.
COMPONENTS USED
Components Used:
• Arduino uno
• 2 IR sensors
• L298n motor driver
• Chassis
• Bo motors
• Lithium-ion battery
• 4 wheels
• Connecting wires/Jumper wires
• Bread board
• Switch
CHAPTER 3
Circuit Diagram:
• IR Sensors – To detect the objects
Code:
#define IR_SENSOR_RIGHT 11
#define IR_SENSOR_LEFT 12
#define MOTOR_SPEED 180
//Right motor int
enableRightMotor=6; int
rightMotorPin1=7; int
rightMotorPin2=8;
void setup()
{
//The problem with TT gear motors is that, at very low pwm value it does not even rotate.
//If we increase the PWM value then it rotates faster and our robot is not controlled in that
speed and goes out of line. //For that we need to increase the frequency of analogWrite.
//Below line is important to change the frequency of PWM signal on pin D5 and D6
//Because of this, motor runs in controlled manner (lower speed) at high PWM value.
//This sets frequency as 7812.5 Hz.
TCCR0B = TCCR0B & B11111000 | B00000010 ;
// put your setup code here, to run once:
pinMode(enableRightMotor, OUTPUT); pinMode(rightMotorPin1,
OUTPUT); pinMode(rightMotorPin2, OUTPUT);
pinMode(IR_SENSOR_RIGHT, INPUT);
pinMode(IR_SENSOR_LEFT, INPUT); rotateMotor(0,0);
}
void loop()
{ int rightIRSensorValue = digitalRead(IR_SENSOR_RIGHT); int
leftIRSensorValue = digitalRead(IR_SENSOR_LEFT);
//If none of the sensors detects black line, then go straight if (rightIRSensorValue ==
LOW && leftIRSensorValue == LOW)
{
rotateMotor(MOTOR_SPEED, MOTOR_SPEED);
}
//If right sensor detects black line, then turn right
else if (rightIRSensorValue == HIGH && leftIRSensorValue == LOW )
{
rotateMotor(-MOTOR_SPEED, MOTOR_SPEED);
}
//If left sensor detects black line, then turn left
else if (rightIRSensorValue == LOW && leftIRSensorValue == HIGH )
{
rotateMotor(MOTOR_SPEED, -MOTOR_SPEED);
}
//If both the sensors detect black line, then stop else {
rotateMotor(0, 0);
}
}
void rotateMotor(int rightMotorSpeed, int leftMotorSpeed)
{
if (rightMotorSpeed < 0)
{
digitalWrite(rightMotorPin1,LOW); digitalWrite(rightMotorPin2,HIGH);
}
else if (rightMotorSpeed > 0)
{
digitalWrite(rightMotorPin1,HIGH); digitalWrite(rightMotorPin2,LOW);
} else
{
digitalWrite(rightMotorPin1,LOW); digitalWrite(rightMotorPin2,LOW);
}
if (leftMotorSpeed < 0)
{
digitalWrite(leftMotorPin1,LOW); digitalWrite(leftMotorPin2,HIGH);
}
else if (leftMotorSpeed > 0)
{
digitalWrite(leftMotorPin1,HIGH); digitalWrite(leftMotorPin2,LOW);
} else
{
digitalWrite(leftMotorPin1,LOW); digitalWrite(leftMotorPin2,LOW);
}
analogWrite(enableRightMotor, abs(rightMotorSpeed));
analogWrite(enableLeftMotor, abs(leftMotorSpeed)); }
CHAPTER 4
WORKING PRINCIPLE
Sensors:
Data Processing:
Actuators:
Feedback Loop:
Power Supply:
Programming or Learning:
Conclusions:
o Successes and Achievements:
The robot is really good at staying close to the object it's
supposed to follow. It doesn't lose track and follows it around
effectively. The robot is quick on its feet as it responds fast to
changes in the object's movements.
o Uses:
1)A smart luggage trolley at railway station/bus
station/Airport that automatically moves on battery and
motor and it follows the owner