|
edtechph
|
 |
« 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
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
Gender: 
Posts: 2498
|
 |
« 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? 
|
|
|
mini_mouse ^_^
Size C Battery
   
Pogi/Ganda Points: 4
Offline
Gender: 
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?  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
Posts: 23
|
 |
« Reply #464 on: August 16, 2010, 11:17:43 AM » |
|
simple line follower program in hi-tech C /* - 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
Gender: 
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
Gender: 
Posts: 2498
|
 |
« 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? 
|
|
|
mini_mouse ^_^
Size C Battery
   
Pogi/Ganda Points: 4
Offline
Gender: 
Posts: 186
...All is Well...
|
 |
« Reply #467 on: August 18, 2010, 12:58:38 PM » |
|
...  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
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
Gender: 
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...? 
|
|
|
|
|
Logged
|
...I'm thankful each and every day, coz I found you...
|
|
|
tiktak
Gas Turbine

Pogi/Ganda Points: 171
Offline
Gender: 
Posts: 2498
|
 |
« 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? 
|
|
|
mini_mouse ^_^
Size C Battery
   
Pogi/Ganda Points: 4
Offline
Gender: 
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.. 
|
|
|
|
|
Logged
|
...I'm thankful each and every day, coz I found you...
|
|
|
mini_mouse ^_^
Size C Battery
   
Pogi/Ganda Points: 4
Offline
Gender: 
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
|
 |
« 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
Gender: 
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..  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
Gender: 
Posts: 2498
|
 |
« 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? 
|
|
|
|
labgruppen
|
 |
« 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..  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
Gender: 
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..  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
Gender: 
Posts: 2498
|
 |
« 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? 
|
|
|
mini_mouse ^_^
Size C Battery
   
Pogi/Ganda Points: 4
Offline
Gender: 
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
|
|
|
|
|