Вы находитесь на странице: 1из 17

MEC523: APPLIED ELECTRONICS &

MICROPROCESSOR
MINI PROJECT : OBSTACLE AVOIDING ROBOT
EMD6M12
1. MUHAMMAD NABIL IQBAL BIN ZULKEFLI 2017806628
2. HAFIDZ DANIAL BIN MOHD SABRI 2016589021
3. MUHAMMAD ZULHAIRI BIN ALI 2017806608
4. MUHAMMAD ZULFAHMI BIN ROZALI 2017806816
5. MUHAMAD FADZRUL FAIZ BIN ASHEMI 2017806298
PROBLEM STATEMENT
 Robotic technologies have become more important
since a lot of industry is trying to improve their
machinery weapons
 Mechanical robots have been invented to help
peoples running their daily life
 New and variety mobile robot with multiple functions
can be invented
 Lot of home appliances using avoidance obstacles
system such as vacuum
OBSTACLE AVOIDING ROBOT
HC-SR04 ultrasonic
Robot’s eye use sensor acts as a sensors offer
ultrasonic sensor robot's eye detects tracking ranges
HC-SR04 obstacles from 2cm to 400
cm

move backwards The movement


and rotate period : between
randomly either to 0.5 seconds to 1
the left or right second

Ultrasonic Sensor HC-SR04


To learn how to use Arduino Uno

To design and implement an Obstacle


OBJECTIVES Avoiding Robot prototype by using Arduino
Uno

To develop a robot using Ultrasonic


sensor
PRODUCT DESCRIPTION
LIST OF COMPONENTS

M3 nut Universal
M3*30
screws wheel

M3*8
copper Rocker Battery box
cylinder switch

M3*8
Tire
screws
Chassis
Gear motor Connecting
wires

Arduino Uno
board Bread board

USB cable
Ultrasonic
sensor HC-
SR04
Programming Algorithm and Flowchart
START

 Algorithm:
CHECK
1) Start. SWITCH
ON
2) Switch is on otherwise go back to starting point.
INITIALISIN
3) Initialize the input port (P7) & output port (P6). G I/O PORT

4) Robot moves in forward direction ROBOT GOES


IN FORWARD
5) If an obstacle is present robot will reverse in left or DIRECTION

right direction. IS OBSTACLE


DETECTED
6) Robot continues to go forward in other direction
7) Switch off SET DIRECTION OF ROBOT IN
REVERSE EITHER LEFT OR
RIGHT
8) Stop
STOP
Coding Arduino
#include <NewPing.h>

#define TRIGGER_PIN 7
1. Download distance sensor library at #define ECHO_PIN 6
#define MAX_DISTANCE 200 //Jarak maksimum : 400-500cm.

https://goo.gl/sm8Msa #define IN1 11

2. Click at the Arduino icon to open


#define IN2 10
#define IN3 9

Arduino IDE
#define IN4 8

#define LED_RED 4
3. Include the library by clicking Sketch #define LED_YELLOW 3
#define LED_GREEN 2
>> Include Library >> Add.ZIP Library NewPing sonar(TRIGGER_PIN, ECHO_PIN, MAX_DISTANCE);

int distance;

bool directionMove;

int counterA;
int counterB;
int counterC;

int randomA;
int randomB;
int randomC;

4. Choose the downloaded Library file


bool red_condition = LOW;
bool yellow_condition = LOW;

and click open to include it.


bool green_condition = LOW;

void setup()
5. Wait for the message “Library added to {
Serial.begin(9600);
your libraries. Check include library pinMode(IN1,OUTPUT);

menu”, this shows that the distance pinMode(IN2,OUTPUT);


pinMode(IN3,OUTPUT);

sensor library has successfully added pinMode(IN4,OUTPUT);

into Arduino IDE.


pinMode(LED_RED,OUTPUT);
pinMode(LED_YELLOW,OUTPUT);
pinMode(LED_GREEN,OUTPUT);
Assembly process
 A set of obstacle avoidance robot

 Install the tires together with the motors


 Module below is known as motor driver L298N. It acts exactly like the engine of a car. The
module operates the motor and tyre.

 Below is the motor component. It will be driven by the module above.

 Component below is the power switch. It functions as to switch on or off the robot
CIRCUIT DIAGRAM
FINAL LOOK PRODUCT
DISCUSSION
Learn how to
use Arduino
properly and
its coding
based on
project
created People
Obstacle require that
Avoidance robots to
Robot has a detect and
vast field of avoid
application obstacles
Used for
educational,
research or
industrial
implementati
on
CONCLUSION

Coding for the


Arduino run
successfully

More Understanding
enhancement the function of
that can be PDB (Power
applied to our Distribution Board)
robot such as which is task to
adding more distribute the
sensors power to the
motor
THANK YOU …

Вам также может понравиться