makeing black line following robot
Fri, 05/21/2010 - 19:54
hi..
i wana make b blak line following robot.... waht change we can do for making white line following robot convert into black line following robor

bOtskOOl website by bOtskOOl is licensed under a Creative Commons Attribution-Noncommercial-No Derivative Works 2.5 India License.
Permissions beyond the scope of this license may be available at http://www.botskool.com/contact.
bOtskOOl.com Privacy Policy - bOt-Xchange Product Listing Policy - Intellectual Property Rights (IPR) Protection Policy

@kapil
u probably need to make changes in the main function of your program. just reverse the conditions of calling turnleft or turnright functions.
i have an another probleam when i put l293d the battery voltage goes frm 9 to 4 ......is there fault in ic or in circuit????????
Hi kapil,
Most common problem is that your H-bridge (L293D) is not working properly. Check whether you have placed the IC properly or not? See where its head is pointing. After this check voltage across your battery.
Are you using separate power supply motors? If no then I ll suggest you to use different power supply for your motors and make the ground common for both the power supplies by using a buffer.
If you want to use only a single battery then make sure your battery is properly charged and it meets the power current requirement of your motor. After this check your circuit and wirings again.
m still not connect motor......and my circuit are proper according to the circuit given in tutorials.m check it 10 times...but when i connect l293d the voltage drop frm 9 to 5 plz help me..........
Hi kapil,
You have still not answered my question asked above. Are you using same power supply for the motors? Did you try to replace L293D IC?
yup m using same power supply....
and m also change my l293d but still same probleam ....
Hi kapil,
Use a different battery for your motors. It is not advisable to use the same power supply for both. Also upload a picture of your circuit so that it can be reviewed then it will be easy to identify the problem.
m not making it on bread board m make it on pcb so its very complicated so trace......make common of both power supply ground using buffer but how????
Still upload picture it ll help. For using 2 different power supplies, give power supply to L293D from a second battery and also connect the ground of power supply 1 & 2 together but do place a resistance between them. Also before doing this cross check once whether the rest of the circuit is working fine. It might be possible that some other IC is not working properly. And plz upload a picture of your complete setup.
there is probleam in uploading image......
Check this link - how to upload image
thanx bro m connect seprate battery for motor and now voltage remain same....but it cant give any response.....i got 9 volt at pin no. 8 and 5 volt at pin no 16 of l293d and 5 volt at mc pin 40 and 31....
Congrats kapil!
Now lets focus on why H-bridge is not giving any response.. Give dummy signal to your H-bridge and see if its working.. By giving dummy signal I mean isolate H-bridge completely from microcontroller circuit and now try giving logic 1 (5V) to the different input pins of L293D manually and see if motors are running as they should.
Also post the code which you are using for the line follower.
ok bro...my programe is...
#include <REG51.h>
sbit a=P0^0;
sbit b=P0^1;
sbit c=P0^2;
sbit d=P0^3;
sbit e=P0^4;
sbit f=P0^5;
sbit g=P1^0;
sbit h=P1^4;
/*
Sensors input port - P1
P1_0 --------> Left sensor
P1_4 --------> Right sensor
Motors output port - P0
P0_0 --------> Enable pin of the left half of the H-bridge
P0_1 --------> will drive the left motor in forward direction
P0_2 --------> will drive the left motor in reverse direction
P0_3 --------> will drive the right motor in forward direction
P0_4 --------> Enable pin of the right half of the H-bridge
P0_5 --------> will drive the right motor in reverse direction
*/
/*Delay function runs an idle loop to create a time delay. If the crystal used is of 11.0592 MHz then the argument passed in delay is in 'milliseconds'.*/
void Delay(unsigned int itime)
{
unsigned int i,j;
for(i=0;i<itime;i++)
for(j=0;j<1275;j++); //Idle loop
}
void Forward()
{
b=1;
c=0;
d=1;
f=0;
}
/*Generally for turning we use a pulsated wave so the bOt doesn’t get out of control i.e. we run the motor for sometime then again stop it and this is done very quickly to create an effective pulse. See the function below.*/
void TurnLeft()
{
b=0; /*Left motor is not running in any direction.*/
c=0;
d=1; /*Right motor is running in forward direction. bOt will eventually turn left*/
f=0;
Delay(50); /* Wait for 50 ms*/
b=0; /*Motors are not running*/
c=0;
d=0;
f=0;
Delay(50); /*Delay of another 50 ms*/
}
/*So in the above program we have effectively created a pulse of 100ms which is on for 50ms and off for another 50ms. You can change this value to suit your needs*/
/*Similarly we can write a function to turn right*/
void TurnRight()
{
b=1; /*Left motor running in forward direction.*/
c=0;
d=0; /*Right motor is not running.*/
f=0;
Delay(50); /*50ms time delay*/
b=0; /*Motors not running in any direction*/
c=0;
d=0;
f=0;
Delay(50); /*50ms time delay*/
}
void main()
{
/* The pins which are receiving inputs from the sensors should be initially set to logic 1.*/
g=1; /*Left sensor input*/
h=1; /*Right sensor input*/
a=1; /*Enable pin of the left half of the H-bridge*/
e=1; /*Enable pin of the right half of the H-bridge*/
//main loop of the program
while(1)
{
if((g==0)&&(h==1))
TurnRight();
else if((g==1)&&(h==0))
TurnLeft();
else
Forward();
}
}
bro plz help yaar is my programe right????m using nxp p89v51rd2
checking it out.
will reply soon.. Did you try running H-bridge independently?
yup m check it....its working properly......
m check out h- motor circuit seprately its working properly.....is my code is right???
Note:- This post has been edited by kapil at Fri, 03/12/2010 - 20:52.
Hi kapil,
Just write a simple program for 8051 to make a pin voltage high (5V) and see if this is working. If this program is working connect this pin of microcontroller whose output is logic 1 (5V) to one of the input pins of the H-bridge (L293D) and see if one of the motors starts moving.
Also make sure that ground of both the circuits ARE CONNECTED TO EACH OTHER otherwise the circuit won't work..
what about enable pins of l293?????
Give them 5V directly from your power supply. This whole setup is for testing purpose only.
m not getting 5 v at output.....
The 5V means logic one. The actual voltage can vary between 3V-5V
How much voltage are you getting across the output pins of microcontroller?
m got nothing.....is there is a probleam in header m using????/
m using p89v51rd2 and used reg51.h header file......
m got 1.72 v at output.......
kapil give one of the output pin of microcontroller logic 1 and a second one logic 0 through programming and see what output voltage are you getting at both the pins?
Also look at the very last link at this page - http://www.8052.com/codelib
Its for p89v51rd2
i got 1.72 volt at logic 1 and .01v at logic 0....
m not getting any volt is my controller is faulty ya there is a programing probleam????
Hi kapil,
I am trying to find a solution to the problem. In the meanwhile please upload your snapshot of your circuit diagram. Also if its very urgent then try using AT89S52 instead. Which software are you using for programming your microcontroller?
m using keil for generate hex file and using flash magic for burn microcontroler.. Sumbody say if flash magic run properly than ur mc is ok there is prob in programing...plz help me m use at89s52 but m cant burn this bcoz here no faclty to burn mc...
According to the datasheet:
While the oscillator is running, a HIGH logic state on this pin for two machine cycles will reset the device. If the PSEN pin is driven by a HIGH-to-LOW input transition while the RST input pin is held HIGH, the device will enter the external host mode, otherwise the device will enter the normal operation mode.
Is this what you are doing?
Notice the time requirement, and the oscillator requirement?
Did you try using a new microcontroller instead?
Check this - http://code.google.com/p/p89v51-sdcc/
Download p89v51rd2.h and try using it. Follow this link - http://www.koders.com/c/fidC76268F7D25391DC727210BDA7A8EB96819DF675.aspx
Sample Code for P89V51RD2 - http://www.keil.com/forum/docs/thread11223.asp
m alrady trying that header file but not working...what to do wid sdcc?m nt understand..
And m nt use other microcontroller....