obstacle detecting line follower robot

Download Obstacle Detecting Line Follower Robot

Post on 20-Feb-2016

15 views

Category:

Documents

0 download

Embed Size (px)

DESCRIPTION

Obstacle Detecting Line Follower Robot

TRANSCRIPT

  • Obstacle Detecting Line Follower Robot

    Group No: 08

    Group Name: Gear It Forward

    Group Members

    Student Name: Zarin Tasnim

    Student ID: 12.01.05.011

    Student Name: Noshin Tasnim

    Student ID: 12.01.05.019

    Student Name: Fatema-E-Jannat

    Student ID: 12.01.05.021

    Student Name: Nahian Fairuz

    Student ID: 12.01.05.022

    Student Name: Sadia Nazneen

    Student ID: 12.01.05.040

    Submitted to: Mr.Hasib Md. Abid Bin Farid, Assistant Professor, AUST.

  • Abstract:

    Our robot is an autonomous Obstacle detecting line follower robot in the age of modern growth of computer and hardware. It is a vehicle which follows the line and detects the obstacle. Then it transmits the distance of obstacle from robot in the LCD screen.

    Introduction: The autonomous robot for path finding and obstacle evasion is able to follow a control strip is sketched on the surface where it is placed. The presented robot captures line position with IR Sensors, while these sensors are escalated at the front of our robot. The main intension of the robot is to aware the owner about the obstacle in LCD screen. Here we made the sensor with IR transmitter and IR Receiver Diode.

    Equipments List:

    Serial No Equipments Specification Quantity

    1. Magician Chassis - 1

    2. Gear motor DC 2

    3. Arduino Uno 2

    4. Arduino Cable - 2

    5. Battery 6V,9V 3

    6. Battery Holder - 2

    7. Motor Driver IC L293D 1

    8. Breadboard Mini,Large 2

    9. Ultrasonic Sensor HC-SR04 1

    10. Transmitter - 1

    11. Receiver - 1

    12. Resistance 10K 6

    13. LCD Screen 16X2 1

    14. Male Connector - 1

    15. Connecting Wires Male to Male Male to Female

    As required

  • CircuitDiagram:

    Fig: LCD screen and RF Receiver with arduino

  • Fig: Transmitter, Ultrasonic sensor and IR sensor with arduino

  • Fig: : Motor Driver Circuit with arduino

  • Working Principal:

    1. Arduino board:

    There are many classifications of arduino. It is microcontroller. The Arduino board is the brain of the

    robot, as it will be running the software that will control all the other parts. The programming is

    done in this part. We used two Arduinos in our project. It is connected using male to male jumper.

    2. Motor Driving Circuit:

    The DC gear motor is used in the robot.To build the motor drive circuit first we chose LM324 and

    L293D.But in the circuit we used L293D IC.It is a 16 pin chip called L293D. It can drive 2 DC motors..

    We connected the IC with arduino uno. Then we programmed it as per it is required.By the following

    figure the IC is naratively described:

  • But we didnt control the speed manually rather we did it by programming in microcontroller. The

    speed of the rigt and left motor is to be nearly same. So we made the right motor speed 255 and left

    motor speed 235.

    3. Line Following Sensor:

    We have made the sensor part using IR Transmitter (LED) and IR Receiver Diode(Photodiode). The

    main function of the sensor is to detect the line and follow the path.

    We have placed the circuit as given in the above picture on a mini breadboard. The Photodiode was

    kept 1 mm above the LED.So that the photodiode could receive the ray properly. We used 10K

    resistance also.Then we checked the sensor part using the connecting with the arduino. When we

    hold a black tape on any sensor then it was giving the accurate reading.So Our sensor was ready to

    use.

    4. Obstacle sensor:

    To sense the obstacle or define any object we have used the ultrasonic sensor.The figure is given:

    As per the figure we can see it has 4 pins.Distance sensors send an ultrasonic signal forward and

    then wait to receive a bounced signal. Depending on how long the signal takes to bounce back the

    approximated distance to an obstacle can be calculated. We used this little device to prevent the

  • robot from other obstacles in its way.The Trig and echo pin is connected to the 7 and 6 no pin of

    arduino.As a result it can detect any obstacle within its range.

    5. lCD Screen:

    The purpose of using the LCD screen is to show the distance of the obstracle from the robot.

    `

    There are 16 pin which is added with the LCD to connect with arduino.The display has an LED

    backlight and can display two rows with up to 16 characters on each row. There are rectangles for

    each character on the display and the pixels that make up each character. The display is just white

    on blue and is intended for showing text.Here two potentiometers are used.One is to adjust the

    brightness and the other is to adjust the contrast.

    6. Transmitter and Receiver Part:

    The wireless transmitter and receiver pair operate at 315 MHz. They can easily fit into a breadboard

    and work well with microcontrollers to create a very simple wireless data link. These modules are

    indiscriminate and will receive a fair amount of noise.

    The receiver is connected in one breadboard along with an arduino. The data pin is connected at the

    13 no pin of arduino on digital part. The data pin of transmitter is connected to 4 no pin of digital

    part of arduino.

    7. Power supply:

    We have used 6V battery with a connector in arduino. A 9V battery is used to give power in the

    motor driver circuit also. Another arduino is supplied with a constant DC of 5V.

  • Troubleshooting:

    To create a project every person has to follow some trouble. In the project we also faced some

    problem. But we also overcame it. Some instruments were really new for us to operate. But we

    learned how to manage it. Some other troubleshooting are explained below:

    1. Controlling the motor speed:

    It was very necessary for us to fix the speed of the left and right gear motors almost equally. The

    motors had to be of same speed.But it was not.So we had to make it almost same through

    programming. We made change in the code of arduino and fixed it.

    2. Making sensor With the LDR and LED:

    Basically in the circuit we used sensor made of Photodiode and Infrared LED. At first we used the

    LDR and White LED as sensor. But the sensor monitor did not give the accurate value. On the other

    hand the Photodiode and Infrared LED gave a good value. so we chose this one as our line following

    sensor.

    3. Lack of power supply:

    Firstly in our project we used a 6V battery for the power supply .But it was very difficult to give

    power supply in motors, arduino and distance sensor combined. After that problem we used 9v

    supply to the circuit and 6V in the arduino. Another 5V is used in the other arduino which is holding

    the receiver.

    4. In LCD connection pots are used:

    Some circuits were there in which we didnt find any pot for the LCD screen connection. But later on

    we added two pots. As one is used to vary the contrast and another one is used to vary the

    brightness.

    5. Coding of transmitter and receiver:

    We did the transmitter and receiver with the help of coding.But while coding the software was

    creating problem. Due to some irrelevant problem it took so much time to be corrected.

    6. Selection of circuit:

    It was almost a new project for us. We were selecting bigger circuit and that was not so much cost-

    effective. But later on by gathering more information we selected the suitable and cost effective

    circuit.

  • Project Image:

    The motor driver circuit

    IR sensor:

  • LCD Screen with Receiver:

    Overall Images of Robot:

  • Code used in microcontroller:

    Two arduinos are used in the project.

    One aruino is connected to the chasis and also connected with receiver.The arduino code is:

    #include

    #include

    #define TRIGGER_PIN 6

    #define ECHO_PIN 7

    #define MAX_DISTANCE 200

    const int transmit_pin = 3;

    NewPing DistanceSensor(TRIGGER_PIN, ECHO_PIN, MAX_DISTANCE);

    const int dangerThresh = 10;

    // Left Motor Controls

    # define LeftMotorForward 8 // ip B`

  • # define LeftMotorReverse 9 // ip A

    # define El 10

    // Right Motor Controls

    # define RightMotorForward 12 // ip A

    # define RightMotorReverse 13 // ip B

    # define Er 11

    // Grid Sensors // holding the bot with gripper oriented outwards

    # define Rs A0

    # define Ms A1

    # define Ls A2

    void setup()

    { // put your setup code here to run once:

    Serial.begin(9600);

    pinMode (Left