Sunday, 5 April 2015

LINE FOLLOWER ROBOT

Robotics, a field that is enjoyable , competitive and interesting.But before robotics there's another field that requires good mental ability and mathematics, i am talking about Programming.Programming is something that makes you talk to computers.Today,everything is totally based on programming. These days, even some singers(will.i.am) are trying to learn programming.There are many Programming languages like C(most basic language about which one should know),C++,C#,Arduino,HTML,PHP,JAVA,PYTHON and many others.We can do a lots of things using programming languages like a security system,make a robot to follow a certain given path(Line Follower),make a robot to avoid obstacles,making applications for android and lots of things.
Here, i will talk only about Arduino. Arduino is an easy to learn and user friendly language.I have made a line follower using Arduino language.To make such  kind of robots you need sensors,a laptop,circuit diagram of pin connections and good hand at mathematics techniques.We can make many things using Arduino language like a robot that would avoid any kind of obstacle in its way.

HARDWARE: The first and the foremost hardware includes chassis of the robot.We can build chassis from any kind of board having enough strength to hold all the equipments  like battery microcontroller etc.To build a chassis all You need is a measuring scale and some cutting instrument like Hack-Saw.Measure according to size of your robot you want to make and cut out the required area.To make anything including robots ,you need to build the base where we can keep our things.In robotics the things are-Motors,micro controller,Battery etc.




                                                            SENSOR GRID


                                                       
                                                           BATTERY

There are two types of sensors that help the line follower to follow the line.One is IR emitter which will emit the light and the other is receiver which will receive the light.If the surface is full black then all of the transmitted line will be absorbed and receiver will get no light and accordingly voltage is produced.If the surface is white then all of the transmitted light will reflect back and produce voltage accordingly.

                                                                  TIRES                                             


                                                   MOTOR CONNECTED ON A L-CLAMP

 To place the Motors we need a tool namely L-Clamp.L-Clamp is connected using screws on which motors are placed.Make sure you measure the dimensions of L-clamp correctly and mark accordingly on the board where they are to be connected.Once the Motors are connected we can connect tires to the motors.we need to connect the motors in a good orientation .By good orientation i mean that motors should not be tilted ,they should be straight and at same horizontal level with respect to each other.
                                         

MICRO CONTROLLER TOP VIEW

MICRO-CONTROLLER CIRCUIT BOTTOM-VIEW


A Micro Controller is an electronic device which will be storing the code we have written.We have different microcontrollers like Atmega8, Atmega168,Atmega328.These all are same in every aspect except that they store different size of code.  


                                                                   
                                                           FINAL ROBOT

Here is the final robot i have made,I have used a different battery here,it is made up of 8 cells each of 1.5V. We can use any 12V battery or any battery of any voltage depending on motor size.

SOFTWARE: To Write the software to make our robot to follow the black line ,we need to connect the pins of sensors to the pins of aurdino.


PIN MAPPING OF AURDINO



To run the Motors we need another IC known as H-BRIDGE IC. The pins of the IC are to be connected to the pins of the Aurdino and then the code is written so as to follow the track.
It looks quite simple and it is quite simple!!!!.
To make a robot to follow the line,what we need to do is
The robot should know which line is black and which is of white.
(Just think of Soccer , if a goal is needed to save then goalie should know where the ball is coming and make a dive accordingly to save the goal)
Here is the process to write a basic code:
1. Place the sensors of the robot on the surface(either black or white)
2. Note the voltage of the sensors  using a multimeter, if it is positive for a black surface that means it has a value 1(HIGH) when it is on a black surface
3. Write the code accordingly to turn left or right. Take for e.g if we have to turn left then sensors to the left of the robot should have HIGH value and all other LOW(dealing with digital) and similarly for right.To go Forward our sensors which are in the middle of sensor grid should have HIGH and all other LOW.
That's it any doubts ask in comments :)
Here are the screenshots of the code i am posting
                               







WON THIRD PRIZE IN PEC(PUNJAB ENGINEERING COLLEGE)

                           

video




1 comment:

  1. sir wt is the difference between Arduino language and C language.....is dere any major difference.?

    ReplyDelete