CE Home
Navigation
Go Back   CrazyEngineers Forum > CE : Technical Discussions > Project Ideas & Seminar Topics
Notices


Advertisements
Reply
 
LinkBack Thread Tools Display Modes

  #1 (permalink)
Old 2nd November 2007, 02:07 AM
CE - Apprentice
 
preeste's Avatar
 
Join Date: 2nd November 2007
I'm a Crazy computer Engineer
Posts: 39
Default Line follower using the pic16f877

hey there....i am looking to build a line follower using the pic16f877.....i plan on using red leds and phototransistors for my sensors and also want to use the whole concept of differential drive for moving my motors using only 2 wheels. can anyone please help me.....i dont know how to start, dont know what components i will need etc....please help.....does anyone have a schematic available for such a project? please help....am desperate.....thanks a lot in advance
preeste is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #2 (permalink)
Old 2nd November 2007, 05:07 PM
CE - Apprentice
 
preeste's Avatar
 
Join Date: 2nd November 2007
I'm a Crazy computer Engineer
Posts: 39
Default Re: Line follower using the pic16f877

oh yeas....i want to also use geared motors, 5 sensors using thered leds and OP505B phototransistors.......furthermore i want to use the L293D h-bridge to control motor....can someone help me with a design for the line follower with all the above requirements......i will be so greatful......please its urgent....like i need it if its possible in the next two days maximum....thanks again
preeste is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)
Old 4th November 2007, 12:50 PM
CE - Apprentice
 
preeste's Avatar
 
Join Date: 2nd November 2007
I'm a Crazy computer Engineer
Posts: 39
Default Re: Line follower using the pic16f877

Can someone please help? 4 days and no help!
preeste is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)
Old 4th November 2007, 11:37 PM
Good Administrator
 
The_Big_K's Avatar
 
Join Date: 26th November 2005
Location: Terra-Firma
I'm a Crazy Electrical Engineer
Posts: 5,156
Send a message via Yahoo to The_Big_K
Default Re: Line follower using the pic16f877

Quote:
Originally Posted by preeste View Post
Can someone please help? 4 days and no help!
Replies will take some time. You will have to be bit patient!

-The Big K-
The_Big_K is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)
Old 29th November 2007, 02:07 AM
CE - Newbie
 
Join Date: 29th November 2007
I'm a Crazy Electronic Engineer
Posts: 1
Default Re: Line follower using the pic16f877

look this link

http://www.kmitl.ac.th/~kswichit%20/LFrobot/LFrobot.htm

replace the pic for the 16f877

and configure this code in the pic


DEFINE LOADER_USED 1
J VAR BYTE
SYMBOL ENAL = PORTB.0
SYMBOL ENAR = PORTB.1
SYMBOL LAMOT = PORTB.2
SYMBOL LBMOT = PORTB.3
SYMBOL RAMOT = PORTB.4
SYMBOL RBMOT = PORTB.5
RIR0 VAR BYTE
RIR1 VAR BYTE
RIR2 VAR BYTE
RIR3 VAR BYTE
TRISB = 0
ADCON1 = $00
J = 240
INI:
ADCIN 0,RIR0
ADCIN 1,RIR1
ADCIN 2,RIR2
ADCIN 3,RIR3
INICIO:
IF RIR0 > J AND RIR1 > J AND RIR2 > J AND RIR3 > J THEN INI
IF RIR0 <= J AND RIR1 <= J AND RIR2 <= J AND RIR3 <= J THEN INI
IF RIR0 > J AND RIR1 > J AND RIR2 <= J AND RIR3 <= J THEN FORWARD
IF RIR0 > J AND RIR1 > J AND RIR2 > J AND RIR3 > J THEN FORWARD
IF RIR0 > J AND RIR1 <= J AND RIR2 <= J AND RIR3 <= J THEN BACK
IF RIR0 <= J AND RIR1 > J OR RIR2 > J OR RIR3 > J THEN BACK
IF RIR0 > J AND RIR1 > J AND RIR2 > J AND RIR3 <= J THEN LEFT
IF RIR0 <= J AND RIR1 > J AND RIR2 > J AND RIR3 <= J THEN LEFT
IF RIR0 > J AND RIR1 > J AND RIR2 <= J AND RIR3 > J THEN RIGHT
IF RIR0 <= J AND RIR1 > J AND RIR2 <= J AND RIR3 > J THEN RIGHT
IF RIR0 > J AND RIR1 <= J AND RIR2 > J AND RIR3 <= J THEN MAXLEFT
IF RIR0 <= J AND RIR1 <= J AND RIR2 > J AND RIR3 <= J THEN MAXLEFT
IF RIR0 > J AND RIR1 <= J AND RIR2 <= J AND RIR3 > J THEN MAXRIGHT
IF RIR0 <= J AND RIR1 <= J AND RIR2 <= J AND RIR3 > J THEN MAXRIGHT
goto INI
FORWARD:
ENAL = 1
ENAR = 1
LAMOT = 1
LBMOT = 0
RAMOT = 0
RBMOT = 1
GOTO INI

BACK:
ENAL = 1
ENAR = 1
LAMOT = 0
LBMOT = 1
RAMOT = 1
RBMOT = 0
GOTO INI

LEFT:
ENAL = 1
ENAR = 0
LAMOT = 1
LBMOT = 0
RAMOT = 1
RBMOT = 0
GOTO INI

RIGHT:
ENAL = 0
ENAR = 1
LAMOT = 0
LBMOT = 1
RAMOT = 0
RBMOT = 1
GOTO INI

MAXLEFT:
ENAL = 1
ENAR = 1
LAMOT = 1
LBMOT = 0
RAMOT = 1
RBMOT = 0
GOTO INI

MAXRIGHT:
ENAL = 1
ENAR = 1
LAMOT = 0
LBMOT = 1
RAMOT = 0
RBMOT = 1
GOTO INI

END

TAKE CARE

ATT

JOHN CONNOR
John Connor is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)
Old 24th December 2007, 09:54 PM
jmn
CE - Newbie
 
Join Date: 24th December 2007
I'm a Crazy Industrial Engineer
Posts: 1
Default Re: Line follower using the pic16f877

I am building a line follower. I use a pic16f877a to read the sensors and to control the motors. To drive the motors I use a l298, line sensors: CNY70, differential drive with tamiya gearbox.

This is the robot if this can help you..
http://www.flickr.com/photos/11711916@N06/

I am testing now the pcb and programming the pic. Tamiya gearbox is a good way to build the differential drive, it is cheap an fast.

Last edited by jmn; 24th December 2007 at 09:59 PM.
jmn is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT +5.5. The time now is 05:22 AM.
Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0
Member comments are owned by the poster. Copyright © 2005-2008 CrazyEngineers.com. All rights reserved.

Advertisements