Discussion in "8051 Discussion Forum" started by    madhuprasanna    Dec 17, 2007.
Mon Dec 17 2007, 11:00 am
#1
hi every body.
i am confused in this project can anyone pls help me out.it's urgent.
the aim of the project is to follow the black line using 8051 written in c language.
i can move it forward and stop it based on ir reflex sensor but i can't move it left or right ....
pls it's urgent...
thanks in advance.....
my mail id:
[email protected]
[email protected]
Mon Dec 17 2007, 11:21 am
#2
Its simple, Stop the Left motor and start the Right motor to turn left and vice versa for right turn.
 madddy like this.
Mon Dec 17 2007, 11:36 am
#3
hi kelvin , i know how to turn it left and right the problem lies on how to detect the black line and take the action whether to turn it left or right.....
Mon Dec 17 2007, 11:48 am
#4
donno if u have downloaded it from this site.. or is it ur own development but wish u cud use 5 IR leds... so that:

The robot decides which direction to go based on the 5 sensors. Each sensor is read one at a time and the bit value is stored in a variable. The bits are left shifted into the variable starting with the left sensor. Therefore, the leftmost sensor is the most significant bit in the variable. Based on the final result of all 5 sensors being left-shifted into the variable, the robot decides how to steer.
Bit Pattern Hex Value Decision
00100 0x04 The line is in the center. Go forward.
01110 0x0E The line is center but really thick? Go forward.
11111 0x1F Possible intersection. Go forward.
00001 0x01 Line on right-most sensor. Go hard right.
00011 0x03 Line on right-most sensor. Go hard right.
00111 0x07 Line on right-most sensor. Go hard right.
00010 0x02 Line on mid-right sensor. Go right.
00110 0x06 Line on mid-right sensor. Go right.
01100 0x0C Line on mid-left sensor. Go left.
01000 0x08 Line on mid-left sensor. Go left.
10000 0x10 Line on left-most sensor. Go hard left.
11000 0x18 Line on left-most sensor. Go hard left.
11100 0x1C Line on left-most sensor. Go hard left.
? N/A All other conditions, continue in the last direction determined. Line could be between sensors or there could be a problem.

Mon Dec 17 2007, 11:50 am
#5

There are 6 directions defined for the robot.
GO_LEFT The left motor is stopped and the right motor goes forward. Robot pivots to the left on the left wheel.
GO_HARD_LEFT The left motor goes reverse and the right motor goes forward. Robot turns in place to the left.
GO_FORWARD Both motors go forward and robot goes forward.
GO_HARD_RIGHT The right motor goes reverse and the left motor goes forward. Robot turns in place to the right.
GO_RIGHT The right motor is stopped and the left motor goes forward. Robot pivots to the right on the right wheel.
GO_BRAKE Both motors are stopped. Currently not used. Disable is used instead.

Mon Dec 17 2007, 12:01 pm
#6
hey,iam using only one sensor,iam lille confused......
only one sensor we are using here and i can't do it.....
Mon Dec 17 2007, 01:29 pm
#7
use atleast 3 sensors.. one to detect black line and other two for white surface..
while reading the sensors.. lets say white give you 1 and black give you 0
so.. here are combinations..

101 -> move straight
001 -> rotate left till you get 1 on left sensor
100 -> rotate right till you get 1 on right sensor
011 -> rotate left till you get 1 on left sensor and 0 on front sensor front sensor is of higher priority
110 -> rotate right till you get 1 on right sensor and 0 on front sensor front sensor is of higher priority
111 -> rotate 180 till you get 0 on front sensor.. this is to find line.. its like you have reached dead end..

Make sure of the sample rate.. at which you are going to check your sensors..
Wed Feb 27 2008, 03:48 am
#8
Using one sensor its impossible to acheive a line follower,
but its possible using two sensors, for that u have to ensure that black line is between the two sensors placed,
algorithm
if left sensor = 1 move right and then straight
if right sensor = 1 move left and then straight
the time for the robot to move right or left should be decided by using a delay function or counters. an perfect timing can be achieved by trial and error.
we have dont this and achieved the task using two sensors for our robotics level 3 competitions.
timing is more important,

Get Social

Information

Powered by e107 Forum System

Downloads

Comments

Clydehet
Wed May 01 2024, 06:44 pm
Davidoried
Wed May 01 2024, 06:11 pm
KevinTab
Sun Apr 28 2024, 05:35 am
Tumergix
Sun Apr 28 2024, 12:59 am
StevenDrulk
Sat Apr 27 2024, 08:47 pm
StephenHauct
Sat Apr 27 2024, 09:38 am
Adamsaf
Sat Apr 27 2024, 07:12 am
Robertphype
Sat Apr 27 2024, 12:23 am