Report
Report
Sensor Technology
Ultrasonic Smart Robot Car
Introduction:
This Smart Robot Car is a great way to get started with four
motor robotics and sensor integration using the Arduino
programming language. The components include everything
you need. This Arduino robot kit will teach you how to drive
your Arduino robot car, how to have it follow lines, how to
control it remotely, and more. This kit doesn’t require
previous programming or electronics experience but it is
recommended that you possess an understanding of or
desire to learn about robotics.
Also, this Arduino robot acts as a gateway to design and
implement various robotics projects using Arduino.
Easy to Assemble:
The 4WD Chassis is a durable and modular robot platform
from Easy Mech. The chassis plates and mounts are cut from
ABS plastic and utilize sensors, controllers, power, etc. Simply
snap each panel together and you’ll be able to attach your
motors, sensors and robotics controller.
Components:
4WD ABS chassis
100 RPM BO Motor-Straight
65mm Robot Wheel Grade B for BO Motors (Yellow)
SmartElex RLS-06 Analog & Digital Line Sensor Array
Tower Pro SG90 1.2kgCm 180 Degree Rotation Servo
Motor
SmartElex L298N Motor Driver with On-board Arduino
Uno.
Orange ICR 18650 2500mAh Lithium-Ion Battery
18650 x 2 battery holder with cover and on/Off Switch
with DC jack
HC-SR04-Ultrasonic Range Finder
EasyMech Snap-fit ABS Bracket for HC-SR04 Ultrasonic
Sensor
Tomo V6-2 Dual USB 2 Slots Battery Intelligent Charger
for AA / AAA / 18650 Batteries Black
20cm DuPont Wire Color Jumper Cable, 2.54mm 1P-1P
Male to Female 40PCS
20cm DuPont Wire Color Jumper Cable, 2.54mm 1P-1P
Female to Female 40PCS
Infrared IR Wireless Remote Control Module Kit for
Arduino
Philips Screw Driver for DIY Robot Car
50 cm Micro USB Cable
8mm Spiral Wrapping Band Black for Wires (cm)
3M Multipurpose Double Sided Sponge Glue Adhesive
Dash pad 1 pcs
Specifications
Arduino Code:
#include <Servo.h>
Servo myservo;
void Enable_Motor(void);
void Disable_Motor(void);
void Forward(void); //Forward() Direction
void Enable_Motor(void)
{
analogWrite(enable11, 255);
analogWrite(enable22, 255);
}
void Disable_Motor(void)
{
analogWrite(enable11, 0);
analogWrite(enable22, 0);
}
void Forward(void) //Forward() Direction
{
digitalWrite(motor11, HIGH);
digitalWrite(motor12, LOW);
digitalWrite(motor21, LOW);
digitalWrite(motor22, HIGH);
}
void Right(void) //Left() Direction
{
digitalWrite(motor11, LOW);
digitalWrite(motor12, HIGH);
digitalWrite(motor21, LOW);
digitalWrite(motor22, HIGH);
}
digitalWrite(motor21, HIGH);
digitalWrite(motor22, LOW);
}
digitalWrite(motor21, HIGH);
digitalWrite(motor22, LOW);
}
void Scan(void)
{
RLine0 = digitalRead(Line0);
RLine1 = digitalRead(Line1);
RLine2 = digitalRead(Line2);
RLine3 = digitalRead(Line3);
RLine4 = digitalRead(Line4);
RLine5 = digitalRead(Line5);
Serial.print(RLine0);
Serial.print(RLine1);
Serial.print(RLine2);
Serial.print(RLine3);
Serial.print(RLine4);
Serial.println(RLine5);
}
void Path_Finding(void)
{
if ((RLine5 == 0 && RLine0 == 0))
{
Serial.println("F");
Forward();
Enable_Motor();
delay(30);
}
else if (( RLine0 == 1 ))
{
Serial.println("L");
Left();
Enable_Motor();
delay(100);
}
else if (RLine5 == 1)
{
Serial.println("R");
Right();
Enable_Motor();
delay(100);
}
else if (RLine5 == 1 && RLine4 == 1 && RLine3 == 1 && RLine2
== 1 && RLine1 == 1 && RLine0 == 1)
{
Serial.println("Stoped");
Disable_Motor();
}
}
void setup() {
// put your setup code here, to run once:
pinMode(motor21, OUTPUT);
pinMode(motor22, OUTPUT);
pinMode(enable11, OUTPUT);
pinMode(enable22, OUTPUT);
pinMode(Line0, INPUT);
pinMode(Line1, INPUT);
pinMode(Line2, INPUT);
pinMode(Line3, INPUT);
pinMode(Line4, INPUT);
pinMode(Line5, INPUT);
void loop()
{
Scan();
Path_Finding();
}
Working:
This smart ultrasonic car is used to detect obstacles and change
direction.
The l298n motor driver helps to change the direction and speed
control of motors. The atmeg328p chip and l298n are connected in
such a way where the former can send PWM signals to the latter for
motor control.
We have the ultrasonic sensor which will help us detect the distance
of any object from the sensor itself. the ultrasonic sensor sends
ultrasonic waves through its transmitter junction and when these
waves collide with an object and return to the receiver junction. we
get the distance between any object at the front and the sensor by
the time the waves took to travel to the object and back.
Similar to an Ultrasonic sensor, the IR remote works by transmission
and reception of infrared signals. the take being that through the IR
transmitter we can send information too and that is received at the
IR receiver and then decoded further on through the atmeg328p
chip.
Features:
Easy to assemble, Snap-fit chassis
Lightweight ABS Chassis.
Hands-on experience of programming, electronics, and robotics
Conclusion:
Thus, in this project we have learnt about Ultra sonic sensors and
have used it to create an obstacle avoiding smart car.
Group Members:
Akash Golwalkar (PA 45)
Siddhesh Moon (PA 43)
Vivek Tiwari (PA 49)
Atul Mala3nthara (PA 10)