Friday 2 September 2011

Make your LINE FOLLOWER ROBOT ready in just 2 Hr.

Note:   1. In this section  FIRST  i will discuss  VERY BASICS ABOUT ROBOTICS.
               2.Then how to make a simple manual robot , so That  you can design a "CHASSIS" for Ur line follower  ROBOT. 
               3.  Some part of this article is directly taken from IIT's tutorial in order to save TIME  .




Robotics is majorly divided into 2 categories:  
1.  Human Controlled Robotics (Manual Robotics)  
2.  Autonomous Robotics  

Manual Robotics is the one in which the human controls the robot using a joystick or switches.  

Whereas, in autonomous robotics, there is no human intervention while the robot performs a 
specific task. It is coded and programmed to do a specific task only.  

We have always got complaints that people want to build a simple robot, but they don’t know 
where to start. So, we thought why not take this initiative of providing tutorials for beginners? 
The beginning is always
 the trickiest. Once you are through the first few levels, you get a knack of it and start liking it. So, the key is keeping it really simple in the first few levels. Manual robotics doesn’t have an upper limit to it, because you can build more and more intricate mechanisms.


 Tools Required :



One thing to remember is to have the basic tools to work with; else it becomes infinitely painful 
sometimes to even attach few pieces together. So, the bare minimum tools required are:   

1)  Hacksaw  
2)  Electric Drill  
3)  Screw Drivers  
4)  Hammer  
5)  Spanner  
6)  Cutting Pliers  
7)  Round Nose Pliers  
8)  Files  


The First Robot :
Now, in most of the websites, they write a lot of unnecessary stuff before actually coming to the 
main point. We know it is irritating, so let’s say that we will strike with a simple robotics 
problem itself , Like make a toy robot  for Ur nephew to move it FORWARD,BACKWARD,LEFT,RIGHT  .
First you would need to decide what kind of material who would be using for the 
platform/chassis of the robot. It basically means the part on which you would be mounting 
motors and supporting the mechanisms. You can use wood, aluminium, fibre glass for a small base.  

Cut out a piece of wood of around 25 cm by 25 cm using a hacksaw and keep it separate. 
Then we mount the motors. We would suggest that you use two 100 rpm motors with gearbox 
for making this robot. Make sure that the rpm of both the motors is same. Below is an image of 
100 rpm motors.



The motors should be clamped to the base using U-Clamps or Saddle Clamps. The figure is 
shown below. 




Attach the motors using the U clamps to the wooden base. Drill holes into the base and keep the 

motors with the motor shaft on the outside of the base.  

Then attach wheels to the motor shafts and make sure that you don’t attach the wheel to the 

shaft using adhesives like Fewi kwik. Attach it by using allen screws or any type of screw. It 

would be best if you attach the motor shafts to the wheels using flanges. If you want to make a 

speedy robot, then a wheel of a relatively large diameter should be used. This is because the 

motor gives a fixed rpm and to increase the linear speed, we need to increase the diameter. 

Since v=ω*r, where ω = angular velocity (rpm) , v = linear velocity and r = radius. So, to increase 

v, we need to  increase r because ω is constant for a particular rpm motor. A figure of wheels is 

shown below and the next figure shows a description of how the motor with the wheel and the 

saddle clamp would look. 




Now, in most cases, we go for a differential drive mechanism for locomotion. A differential drive 

mechanism basically means two motors with wheels at the back and a single caster in the front. 

Fix the caster in the front at the middle of both the motors. 

The ball of the ball castor should be resting on the ground with the top fixed to the wooden base.
A simple chassis is now made with wheels attached to motor at the back and a ball castor in the front. After the chassis of the robot is complete, we then make the mechanism which defines the robot.


Different views of the chassis are shown in the next page :
BOTTOM VIEW:



  Mount the battery in the middle of the chassis so that it does not get inclined towards one side.  
You would need to make connections of the motor with the battery and then to switches which  would control the motors.     


Hence, the robot here has  
1)  A wooden chassis  
2)  Two 100 rpm motors  
3)  Saddle clamps  
4)  Wheels  
5)  Small motors

Once you make all the connections to the control switches, you would need to know how to 

control the robot. For that you must know how differential works.  

This is a figure of the simple chassis of the robot with two motors and two wheels at the back. If 
you start rotate both the motors in the same direction, and then the robot will go straight. If you 
stop the left motor and only rotate the right hand side motor, then the robot will turn left. If one 
stops the right side motor and keeps rotating the left motor, the robot would turn right. Now, one 
would inquisitively ask what if I want to rotate one motor in forward direction and one motor in 
backward direction. In this case, the robot would take a complete U turn i.e. it would rotate 360° 
about its own centre. It is easiest to make a robot stand on 3 points, which are 2 rear motors and one castor
different locomotion of robot.  

  Now you know how to make chassis :
  now learn a way to transform this chassis into "LINE FOLLOWER ROBOT " .


    REQUIREMENTS :
  1. Ur microcontroller kit
  2. chassis(with motor,battery )
  3. IR sensor ( number- 2 )
  4. Black 3cm tape ,white chart paper ,two sided tape
  5. Keil ,Flash Magic s/w ,RS-232 with its driver ( email us for FREE AVAILABILITY )


In the previous posts i have already explained the function of each and every components/modules of microcontroller ,so in this section i will only tell you how to assemble all those to make it line follower robot and how to write program for that.


I have divided this section into 3 subsections :
          1.Hardware connections
          2.mechanism
          3.Program


HARDWARE CONNECTIONS :
   first of all , Make room for Ur microcontroller kit on the top of chassis :
Its depend upon you , how you design second layer.Now see the architecture :




You have 2 layers here :
          Wheels ,castor wheels, 2 IRsensor attached to layer-1
          Ur microcontroller kit is on top of layer-2
          In-between , there is +12V battery
 Here we will use 2 IR sensor. Both sensors are placed just below LAYER-1 , in the front part of the bot such that   LED of both sensor MUST POINT TO black strip of tape ( IN ARENA ) ,when the bot is placed symmetrical to the black strip. Output of these sensors are connected to 'S1' and 'S2' of microcontroller kit .  

Fix microcontroller kit by any means on layer-2 .Give POWER OF +12V to the kit as shown in the above diagram.   
PLACEMENT OF SENSOR :



'S1' , 'M1' are on the left side (FROM TOP) and 'S2' ,'M2' are on the right side. CW  stands for castor wheel.
You MUST be very careful and have patience while placing the sensor , because you might need to test and change position of sensor many number of times until you place it in desired position.
    Now Ur bot is ready to run :   
  


MECHANISM:

I/p -     S1 and S2
o/p -    MOTOR M1 and M2
During running of BOT , the following cases are possible:




The output coming from the sensor when it points to black strip , is having value closer to +5V but comparator invert it to 0v i.e "0"  and vice-verse.When Ur bot is moving on the track and 's1' & 's2' both points to black strip , it means there is no deviation from the main track .
Now consider the case when , while moving on track ,  's1' points to white surface and 's2' remains on black ,it means the BOT has deviated towards  'LEFT'  from its main path ,so the BOT need to shift/move towards "RIGHT".You can apply  same concept for other conditions.


PROGRAM :
NOTE: This program is tested in line follower ROBOT. So any comments regarding error in this program is unreasonable.


install keil s/w , flash Magic ,RS-232 cable drivers in Ur laptop or PC .
Write the program in KEIL s/w , get a hex file for this program ,and finally using flash magic and RS 232 cable burn this hex file into Ur microcontroller kit .
(be careful about the PORT setting)


#include<reg51.h>
#include<stdio.h>
int main()
{
 unsigned int b=P1&0x03;
   while(1)
   {
    b=P1&0x03;
    if(b==0x00)
     P2=0x09;
    else if(b==0x01)
     P2=0x01;
    else if(b==0x02)
     P2=0x08;
    else 
P2=0x00;
    }
}   
   

                                                                  

    end of this post.....



any suggestion about what you would like to see in the next article or to highlight errors in this articles or for any doubt please drop a line in this column...
                               or   contact : aies.hsprofessionals@gmail.com




upcoming article:
   
  • Wireless control of your ROBOT via PC using TX433 & RX433.
  • Wireless communication between two or more ROBOT.
  • Physics behind TOUCH PAD DISPLAY.
  • Use that TOUCH PAD to remotely control ( wireless control over range 400 ft ,8kbps,434MHZ)             your ROBOT .
  • Discussion on DIGITAL IMAGE PROCESSING and INTERFACING CAMERA      with your  kit and your laptop
  • Discussion : Types of sensor.
         




     

          

No comments:

Post a Comment

Note: only a member of this blog may post a comment.