The Philippine Electronics and Technology Forum
February 10, 2012, 02:29:46 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   Home   Help Search Login Register  

Pages: 1 ... 22 23 [24] 25 26 ... 30   Go Down
  Print  
Author Topic: line follower mobot  (Read 47354 times)
edtechph
Size D Battery
******

Pogi/Ganda Points: 13
Offline Offline

Gender: Male
Posts: 336



« Reply #460 on: July 29, 2010, 09:01:07 PM »

thanks po tiktak and sa lahat
Logged
The Philippine Electronics and Technology Forum
« Reply #460 on: July 29, 2010, 09:01:07 PM »

 Logged
arcturus_mengsk
CR2032 Battery
**

Pogi/Ganda Points: 0
Offline Offline

Posts: 23


« Reply #461 on: August 03, 2010, 09:40:08 PM »

hingi sana ng tips kasi balak ko gamitin ung schemtic ng mcu nito and c program for my obstacle avoiding robot, ask ko lng kung:

1. ok pa din ba kung gagamitin ko ay l293d ic para sa motor driver hindi ung h-bridge na given sa schematic

2. kaya ba ng l293d ang tormax 12v motor if not any alternative ic??(ic sana hanggat maari para kabit-kabit na lng)

3. sa c code naman balak ko lng i-interchange ung mga mgging movement sa conditions(e.g. instead of move forward gagawing turn left dahil naka declare nman) dahil 2 wheeled differential drive ang gagawin ko

thanks in advance
Logged
tiktak
Gas Turbine
**

Pogi/Ganda Points: 171
Offline Offline

Gender: Male
Posts: 2498



WWW
« Reply #462 on: August 03, 2010, 09:45:29 PM »

anong current rating ng motor mo? kung pasok sa specs ng L293D oks na, sa code ikaw naman ang magdedeside sa gagawin ng mobot mo
Logged

Bakit andaming hindi marunong gumamit ng search?Huh
mini_mouse ^_^
Size C Battery
*****

Pogi/Ganda Points: 4
Offline Offline

Gender: Female
Posts: 186


...All is Well...


« Reply #463 on: August 14, 2010, 01:37:44 PM »

sir paranz,

may assembly code po ba kau ng line follower mobot?
Wink

ask ko lng po if ano po ang value ng trimmer resistor na gagamitin sa Vref sa comparator..
Logged

...I'm thankful each and every day, coz I found you...
arcturus_mengsk
CR2032 Battery
**

Pogi/Ganda Points: 0
Offline Offline

Posts: 23


« Reply #464 on: August 16, 2010, 11:17:43 AM »

simple line follower program in hi-tech C

Code:

/*
- sensors connected to RB<2:0>
- start button connected to RB3
- H-bridge for rear dc motor connected to RA<1:0>
- H-bridge for front dc motor connected to RA<3:2>
*/


#include <pic.h>

__CONFIG(XT & WDTDIS & PWRTDIS & UNPROTECT);

#define TURN_LEFT 0x04
#define TURN_RIGHT 0x08
#define MOVE_FORWARD 0x01
#define MOVE_BACKWARD 0x02


void main()
{
unsigned char sensor;
unsigned char prev_command;

TRISB = 0x0F; //RB<3:0> are input
TRISA = 0x00; //RA<3:0> are output
PORTA = 0x00; //all h-bridges are OFF

while((PORTB & 0x08)==0x08); //mobot is off while START button
//is not pressed
PORTA = MOVE_FORWARD; //mobot moves forward

while(1)
{
sensor = (PORTB & 0x07); //read PORTB and clear
//PORTB<7:3> bits
switch(sensor)
{
case 0x00: //all sensor "ON"
PORTA = MOVE_FORWARD;
prev_command = MOVE_FORWARD;
break;
case 0x01: //Left & middle sensor “ON”
PORTA = (MOVE_FORWARD | TURN_LEFT);
prev_command = (MOVE_FORWARD | TURN_LEFT);
break;
case 0x02: //Invalid sensor output
PORTA = prev_command;
break;
case 0x03: //Left sensor “on”
PORTA = (MOVE_FORWARD | TURN_LEFT);
prev_command = (MOVE_FORWARD | TURN_LEFT);
break;
case 0x04: //Right & middle sensor “on”
PORTA = (MOVE_FORWARD | TURN_RIGHT);
prev_command = (MOVE_FORWARD | TURN_RIGHT);
break;
case 0x05: //Middle sensor “on”
PORTA = MOVE_FORWARD;
prev_command = MOVE_FORWARD;
break;
case 0x06: //Right sensor “on”
PORTA = (MOVE_FORWARD | TURN_RIGHT);
prev_command = (MOVE_FORWARD | TURN_RIGHT);
break;
case 0x07: //All sensor “off ”
PORTA = prev_command;
break;
default:
PORTA = prev_command;
break;
}
}
}





ano po ba ang iaalter kong value sa code kung 2 wheeled lang ang gagamitin for obstacle avoiding purposes?
Logged
mini_mouse ^_^
Size C Battery
*****

Pogi/Ganda Points: 4
Offline Offline

Gender: Female
Posts: 186


...All is Well...


« Reply #465 on: August 17, 2010, 02:03:02 PM »

pwde po bang makita ang real pic ng placement ng sensors? ^_^
Logged

...I'm thankful each and every day, coz I found you...
tiktak
Gas Turbine
**

Pogi/Ganda Points: 171
Offline Offline

Gender: Male
Posts: 2498



WWW
« Reply #466 on: August 17, 2010, 10:09:29 PM »

^back read ka lang sis may pictures sa naunang pages

for obstacle avoidance, I think mas maganda gawa nalang ng bagong code, since may mga sharp turn na gagawin kunyari napunta sa gilid or pag na stuck
Logged

Bakit andaming hindi marunong gumamit ng search?Huh
mini_mouse ^_^
Size C Battery
*****

Pogi/Ganda Points: 4
Offline Offline

Gender: Female
Posts: 186


...All is Well...


« Reply #467 on: August 18, 2010, 12:58:38 PM »

...Smiley hindi kasi clear yung pics e... but may design na po ako... ewan ko po if tama... ung sa receiver, common ko po lahat ng 5V... pwde ba yun?
Logged

...I'm thankful each and every day, coz I found you...
arcturus_mengsk
CR2032 Battery
**

Pogi/Ganda Points: 0
Offline Offline

Posts: 23


« Reply #468 on: August 18, 2010, 07:30:33 PM »

ah cge2, ask ko na lang din pano kapag gusto ko ung mobot to generete random turns hindi ung nakadepend lang sa magiging reading ng sensors? using hi-tech c po kahit ung given code na lng po d2 ung example.
Logged
mini_mouse ^_^
Size C Battery
*****

Pogi/Ganda Points: 4
Offline Offline

Gender: Female
Posts: 186


...All is Well...


« Reply #469 on: August 20, 2010, 10:30:03 AM »

ok na po yung sensor ko.. kaso nga lang po yung sa comparator po, ang Vout po, instead na 5V, 4V lng po xa... Vmin ko po is 1.0, vmax ko po is 4.8, vref ko po is 2.9...
 try ko po ang output ng comparator if white... 4V lng po... if black, same lng din po.. yung pn na ginamit ko is pin 1 to pin 3 po.. ano po kaya ang problem...? Sad
Logged

...I'm thankful each and every day, coz I found you...
tiktak
Gas Turbine
**

Pogi/Ganda Points: 171
Offline Offline

Gender: Male
Posts: 2498



WWW
« Reply #470 on: August 20, 2010, 09:11:10 PM »

sa koneksyon mo sa sensor, should be pin2 and pin3
Logged

Bakit andaming hindi marunong gumamit ng search?Huh
mini_mouse ^_^
Size C Battery
*****

Pogi/Ganda Points: 4
Offline Offline

Gender: Female
Posts: 186


...All is Well...


« Reply #471 on: August 21, 2010, 05:34:51 PM »

db po yung pin configuration ng LM324 is:

pin 1 = Vout1
pin 2= Vref1
pin3 = Vin1
pin4 = Vcc
pin 5 = Vin2
pin6= Vref2
pin 7 = vout2


yung Vout ko po kasi is 4V lng po... yung input Vcc ko po is 5V naman po...
Vref1=2.875
Vin1= 1.5

bakit po hindi 5 V yung Vout if nasense is white, 4 V lng po kasi.. at if black, hindi po xa nagvavary... db dapat po is 0V if black.. same lang po kasi ang Vout ko if white at black.. Sad
Logged

...I'm thankful each and every day, coz I found you...
mini_mouse ^_^
Size C Battery
*****

Pogi/Ganda Points: 4
Offline Offline

Gender: Female
Posts: 186


...All is Well...


« Reply #472 on: August 21, 2010, 06:20:30 PM »

..hello.. just to confirm... if yung pins ng pic16f84a na Ra0-Ra3 if iconfigure ko po as input.... voltage applied from 0.8V - > higher, logic  1 po ba xa...? then logic 0 if below 0.8 V?  or logic 1 is from 2V -> higher
Logged

...I'm thankful each and every day, coz I found you...
labgruppen
Lead Acid Battery
*******

Pogi/Ganda Points: 70
Offline Offline

Posts: 693


« Reply #473 on: August 21, 2010, 07:03:30 PM »

...
yung Vout ko po kasi is 4V lng po... yung input Vcc ko po is 5V naman po...
...

hindi Rail to Rail ang LM324 so hindi nya kayang i-output ang 5 volts pag ang rail voltage is 5volts din. but don't worry about it, 4V is high enough to be a valid "1" on most 5V logic.
Logged
mini_mouse ^_^
Size C Battery
*****

Pogi/Ganda Points: 4
Offline Offline

Gender: Female
Posts: 186


...All is Well...


« Reply #474 on: August 23, 2010, 10:29:49 AM »

ah.. ok po... ano po ba ang voltage range ng RA0-RA4 para logic 1 po xa?


another po is wala po kasing difference yung output voltage ng comparator ko po if ang nasense is white at black.. same lng po kasi sila na 4 V... nachect ko nma po yung otput sa sensor... ok naman po... Vin<Vref nman po if black xa.. at Vin>Vref if white.. Sad yah nlng po kasi ang problem...
Logged

...I'm thankful each and every day, coz I found you...
tiktak
Gas Turbine
**

Pogi/Ganda Points: 171
Offline Offline

Gender: Male
Posts: 2498



WWW
« Reply #475 on: August 23, 2010, 02:00:09 PM »

if ok ang sensor mo before ng comparator, theres something wrong sa comparator circuit mo, ang logic 0 ay 0.3V below, logic 1 ay 0.8V above, so ibig sabihin yang 4V mo ay logic 1 na yan
Logged

Bakit andaming hindi marunong gumamit ng search?Huh
labgruppen
Lead Acid Battery
*******

Pogi/Ganda Points: 70
Offline Offline

Posts: 693


« Reply #476 on: August 23, 2010, 02:24:15 PM »

another po is wala po kasing difference yung output voltage ng comparator ko po if ang nasense is white at black.. same lng po kasi sila na 4 V... nachect ko nma po yung otput sa sensor... ok naman po... Vin<Vref nman po if black xa.. at Vin>Vref if white.. Sad yah nlng po kasi ang problem...

this might be a silly question, but i am just covering all bases.. did you connect pin11 of lm324 to ground? as built photos and schematics would be helpful in the troubleshooting..
Logged
mini_mouse ^_^
Size C Battery
*****

Pogi/Ganda Points: 4
Offline Offline

Gender: Female
Posts: 186


...All is Well...


« Reply #477 on: August 24, 2010, 10:28:43 AM »

....ok na po yung output ng comparator sa pin1... 0V na po if black at 4 V if white,,,

yung output po sa pin 7 at pin 14 po, hindi po xa ngvavary.. 4v parin po if white at black.. Sad

ganito po kasi ang connections ko...

pin1=Vout1 ///----0V if Balck. 4V if white, ok na!
pin2= Vref1
pin3=Vin1
pin4=Vcc
pin5=Vin2
pin6=Vref2
pin7=Vout2           ///same Vout =4V in white and Black
pin8
pin9
pin10
pin11=gnd
pin12=Vin3
pin13=vref3
pin14=Vout3    ///same Vout =4V in white and Black


kaya po tenest ko po na ichange yung input voltage eto po ang result if ganito yung config
pin1=Vout1       ///same Vout =4V in white and Black
pin2= Vref1
pin3=Vin2 or Vin3
pin4=Vcc
pin5=
pin6=Vref2
pin7=Vout2           ///same Vout =4V in white and Black
pin8
pin9
pin10
pin11=gnd
pin12=
pin13=vref3
pin14=

if ganito po, tenest ko po na ichange yung input voltage eto po ang result if ganito yung config
pin1=Vout1      0V if Balck. 4V if white
pin2= Vref1
pin3=Vin1
pin4=Vcc
pin5=Vin1
pin6=Vref2
pin7=Vout2          0V if Balck. 4V if white,
pin8
pin9
pin10
pin11=gnd
pin12=Vin1
pin13=vref3
pin14=Vout3  0V if Balck. 4V if white


isang sensor lng po yung ngzezero output voltage if black sir....
icheck the Vmin and Vmax ng ibang sensor sir, ok naman po... ngvavary naman po xa at konti lng po yung difference sa 1st sensor interms of Vmin nla... Vmax ng tatlo is 4.8 po...
Logged

...I'm thankful each and every day, coz I found you...
tiktak
Gas Turbine
**

Pogi/Ganda Points: 171
Offline Offline

Gender: Male
Posts: 2498



WWW
« Reply #478 on: August 24, 2010, 03:54:07 PM »

as what labgruppen said, build pictures and the schematic that you are using will greatly help us find the trouble
Logged

Bakit andaming hindi marunong gumamit ng search?Huh
mini_mouse ^_^
Size C Battery
*****

Pogi/Ganda Points: 4
Offline Offline

Gender: Female
Posts: 186


...All is Well...


« Reply #479 on: August 25, 2010, 10:40:44 AM »

ok na po.. hehe
Logged

...I'm thankful each and every day, coz I found you...
The Philippine Electronics and Technology Forum
   

 Logged
Pages: 1 ... 22 23 [24] 25 26 ... 30   Go Up
  Print  
 
Jump to:  


Related Topics
Subject Started by Replies Views Last post
line follower mobot
Personal, Academic and Commercial Electronics Projects
superpink99 18 2868 Last post February 24, 2008, 06:20:16 PM
by mhondyhondy
line follower mobot using Z8
Zilog Microcontrollers
aUdie 1 1217 Last post September 28, 2008, 09:25:16 AM
by paranz
ang aking line follower mobot « 1 2 »
Mechatronics and Robotics
mArKhAo 29 4130 Last post January 23, 2011, 12:21:46 AM
by blitzers00
Line Follower Mobot Using PIC16f84a
PIC Microcontrollers
mini_mouse ^_^ 6 654 Last post August 23, 2010, 02:49:12 PM
by DigitalMind
Cruddy - Line Follower Mobot
PIC Microcontrollers
lloydi12345 17 661 Last post September 05, 2011, 07:56:14 AM
by lloydi12345
Sensor for line follower Mobot
Microcontroller/Microprocessor Unit Projects and Programming
blitzers00 2 692 Last post March 04, 2011, 11:41:38 PM
by miss_kalanchuga
differential line follower mobot?
Absolute Beginner Technical Discussion
Rk17 4 103 Last post September 18, 2011, 10:01:19 PM
by zrehtiek/keitherz
Powered by MySQL Powered by PHP Powered by SMF 1.1.15 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!