Miniproject Report IOT
Miniproject Report IOT
On
By
Atharva Pisal(68)
Faisal Shaikh(52)
Swayam Thapar(74)
Aditya Agarwal(43)
Pragati Chipde(51)
Introduction
The combination of major fields such as mechanical, electrical and electronics provides
automation systems which are known as Robots. The growths in these industries are a major
reason for the efficiencies in every sector by reducing the human effort and interaction . By
doing such, this promises us a safer environment in dangerous and insightful grounds. Due to
its precision and absolute accuracy it has made a major presence in all the essential fields
whether it is education, bio-medicals, engineering and so on.
Objectives
1) The main objective of this is obstacle avoidance using ultrasonic sensor.
2) Earthquake Rescue support
3) Path detection
4) Ghost detection using electromagnetic devices
Project Description
Circuit Diagram
Flow Diagram
List of components used:
Arduino Uno R3
Driver Motor- HW-130(for 4 motors)
DC motor(4)
Servo motor-SE90
Ultrasonic Sensor-HC9SR04
Bluetooth Module
Jumper Wires-Male to Male,Female to Male,Female to Female
CarbonFibre Chasis(body)
Power Supply-AAA
Switch
Code:
*obstacle avoiding,bluetooth control,voice control robot car.
*/
#include <Servo.h>
#include <AFMotor.h>
#define Echo A0
#define Trig A1
#define motor 10
#define Speed 200
#define spoint 103
char value;
int distance;
int Left;
int Right;
int L = 0;
int R = 0;
int L1 = 0;
int R1 = 0;
Servo servo;
AF_DCMotor M1(1);
AF_DCMotor M2(2);
AF_DCMotor M3(3);
AF_DCMotor M4(4);
void setup() {
Serial.begin(9600);
pinMode(Trig, OUTPUT);
pinMode(Echo, INPUT);
servo.attach(motor);
M1.setSpeed(Speed);
M2.setSpeed(Speed);
M3.setSpeed(Speed);
M4.setSpeed(Speed);
}
void loop() {
Obstacle();
// Bluetoothcontrol();
voicecontrol();
}
void Bluetoothcontrol() {
if (Serial.available() > 0) {
value = Serial.read();
Serial.println(value);
}
if (value == 'F') {
forward();
} else if (value == 'B') {
backward();
} else if (value == 'L') {
left();
} else if (value == 'R') {
right();
} else if (value == 'S') {
Stop();
}
}
void Obstacle() {
distance = ultrasonic();
if (distance <= 12) {
Stop();
backward();
delay(100);
Stop();
L = leftsee();
servo.write(spoint);
delay(800);
R = rightsee();
servo.write(spoint);
if (L < R) {
right();
delay(500);
Stop();
delay(200);
} else if (L > R) {
left();
delay(500);
Stop();
delay(200);
}
} else {
forward();
}
void voicecontrol() {
if (Serial.available() > 0) {
value = Serial.read();
Serial.println(value);
if (value == '^') {
forward();
} else if (value == '-') {
backward();
} else if (value == '<') {
L = leftsee();
servo.write(spoint);
if (L >= 10 ) {
left();
delay(500);
Stop();
} else if (L < 10) {
Stop();
}
} else if (value == '>') {
R = rightsee();
servo.write(spoint);
if (R >= 10 ) {
right();
delay(500);
Stop();
} else if (R < 10) {
Stop();
}
} else if (value == '*') {
Stop();
}
}
}
int ultrasonic() {
digitalWrite(Trig, LOW);
delayMicroseconds(4);
digitalWrite(Trig, HIGH);
delayMicroseconds(10);
digitalWrite(Trig, LOW);
long t = pulseIn(Echo, HIGH);
long cm = t / 29 / 2; //time convert distance
return cm;
}
void forward() {
M1.run(FORWARD);
M2.run(FORWARD);
M3.run(FORWARD);
M4.run(FORWARD);
}
void backward() {
M1.run(BACKWARD);
M2.run(BACKWARD);
M3.run(BACKWARD);
M4.run(BACKWARD);
}
void right() {
M1.run(BACKWARD);
M2.run(BACKWARD);
M3.run(FORWARD);
M4.run(FORWARD);
}
void left() {
M1.run(FORWARD);
M2.run(FORWARD);
M3.run(BACKWARD);
M4.run(BACKWARD);
}
void Stop() {
M1.run(RELEASE);
M2.run(RELEASE);
M3.run(RELEASE);
M4.run(RELEASE);
}
int rightsee() {
servo.write(20);
delay(800);
Left = ultrasonic();
return Left;
}
int leftsee() {
servo.write(180);
delay(800);
Right = ultrasonic();
return Right;
}
Output Scrrenshots:
Applications:
Vehicle detection and counting: Optical sensors like LiDAR or cameras can be used to detect
and count vehicles on a road. This data can be used to optimize traffic light timings, identify
congestion points, and improve overall traffic flow.
Vehicle classification: By analyzing the size and shape of vehicles detected with cameras, the
system can classify them (cars, trucks, motorcycles etc.). This information helps with traffic
management strategies specific to different vehicle types.
Speed detection: Advanced computer vision techniques using cameras can estimate the speed
of moving vehicles. This data can be used for traffic enforcement or to trigger warnings for
speeding drivers.
Safety and Security:
Automatic toll collection: Optical sensors can read license plates of passing vehicles,
enabling automatic toll collection without requiring drivers to stop.
Parking management: Sensors can detect the presence or absence of vehicles in parking
spaces, providing real-time information on available parking and guiding drivers.
Perimeter security in parking lots or restricted areas: Light beams, infrared sensors, or
cameras can be used to create virtual barriers and detect unauthorized vehicle intrusions.
Advanced Driver-Assistance Systems (ADAS):
Lane departure warning: Cameras can track lane markings and warn drivers if they
unintentionally veer out of their lane.
Collision avoidance systems: LiDAR or radar sensors combined with cameras can detect
obstacles or other vehicles in the path, enabling automatic braking or steering adjustments to
prevent collisions.
Traffic sign recognition: Cameras can identify traffic signs and relay information like speed
limits or stop signs to the driver, improving awareness and safety.
Conclusion
An IoT based approach for detecting an obstacle and alerting system is discussed in this
paper. The methodology employs a distance measurement sensor namely ultrasonic sensor
which detects the range of the obstacle and Arduino processes it to alert the vehicle users to
avoid the possible accidents.
References
[1] J. David and N. Cheeke, “Fundamentals of ultrasonic waves,” CRC Press, Florida, USA,
2002, ISBN 0-8493-0130-0.
[2] A. K. Shrivastava, A. Verma, and S. P. Singh ,” Distance Measurement of an Object or
Obstacle by Ultrasound Sensors using P89C51RD2”,InternationalJournal of Computer
Theory and Engineering,Vol-2, No-1,pp. 64-68,Feb 2010.
[3] Sumit Badal, Srinivas Ravela, Bruce Draper, Allen Hanson, “ A Practical Obstacle
Detection And Avoidance System”, Computer Vision Laboratory , University of
Massachusetts.
[4] Nils Gageik, Thilo Müller, Sergio Montenegro, “Obstacle Detection And Collision
Avoidance Using Ultrasonic Distance Sensors For An Autonomous Quadrocopter”
University of Würzburg, Aerospace Information Technology (Germany) Würzburg
September 2012.
[5] D. S. Vidhya, Delicia Perlin Rebelo, Cecilia Jane D’Silva, Linford William Fernandes
“Obstacle Detection using Ultrasonic Sensors”, International Journal for Innovative Research
in Science & Technology| Volume 2, Issue 1 ,PP. 316-320, April 2016.
[6] Ta-Chung Wang, Tz-Jian Lin “Unmanned Vehicle Obstacle Detection And Avoidance
Using Danger Zone Approach”, Transactions of the Canadian Society for Mechanical
Engineering , Vol. 37, No.3, PP.529-538, 2013.
[7] http://www.engineersgarage.com/insight/how-ultrasonic-sensorswork.
[8] Y. Jang, S. Shin, J. W. Lee, and S. Kim, “A preliminary study for portable walking
distance measurement system using ultrasonic sensors,” Proceedings of the 29th Annual
IEEE International Conference of the EMBS, France, Aug. 2007, pp. 5290-5293.