caramoan tour package

caramoan tour package

Author Topic: P-Bot Official Thread  (Read 16337 times)

Offline Stark

  • Size AAA Battery
  • ***
  • Posts: 68
  • Pogi/Ganda Points: 0
Re: P-Bot Official Thread
« Reply #300 on: January 25, 2012, 12:05:02 AM »
BTW, trying to modify the library for use on the Pinguino, kaso wala palang boolean datatype ang pinguino T_T . Anong magandang gamitin for it? Integer?

Philippine Electronics Forum

Re: P-Bot Official Thread
« Reply #300 on: January 25, 2012, 12:05:02 AM »

Offline glutnix_neo

  • Technical People
  • Nuclear Reactor
  • *****
  • Posts: 4180
  • Pogi/Ganda Points: 166
  • Gender: Female
  • A journey to a thousand lines begins w/ LED Blink
    • Underground Workbench
Re: P-Bot Official Thread
« Reply #301 on: January 25, 2012, 05:01:54 PM »
BTW, trying to modify the library for use on the Pinguino, kaso wala palang boolean datatype ang pinguino T_T . Anong magandang gamitin for it? Integer?

yup pwede yun then idefine mo na lang TRUE at FALSE, pwede ring bit
If we hear,we forget;if we see, we remember;if we do,we understand.
Let's support the use of free and open source softwares...
http://UndergroundWorkbench.wordpress.com

Philippine Electronics Forum

Re: P-Bot Official Thread
« Reply #301 on: January 25, 2012, 05:01:54 PM »

Offline glutnix_neo

  • Technical People
  • Nuclear Reactor
  • *****
  • Posts: 4180
  • Pogi/Ganda Points: 166
  • Gender: Female
  • A journey to a thousand lines begins w/ LED Blink
    • Underground Workbench
Re: P-Bot Official Thread
« Reply #302 on: January 25, 2012, 05:03:55 PM »
Yup, I agree, kelangan ng mas mataas na resolution which is why balak din po namin i-modify yung P-bot by adding more sensors... And thanks for the library, too! Sana madali lang itong i-port for the Pinguino.

Malaking problema siguro sa porting is yung library is written in C++ pero C lang yata ang Pinguino. In the future gagawa ako ng C port for this library.
If we hear,we forget;if we see, we remember;if we do,we understand.
Let's support the use of free and open source softwares...
http://UndergroundWorkbench.wordpress.com

Philippine Electronics Forum

Re: P-Bot Official Thread
« Reply #302 on: January 25, 2012, 05:03:55 PM »

Offline Stark

  • Size AAA Battery
  • ***
  • Posts: 68
  • Pogi/Ganda Points: 0
Re: P-Bot Official Thread
« Reply #303 on: January 26, 2012, 08:50:04 PM »
Speaking of which, seeing the P-bot has isolated motor voltage inputs, pwede po kayang dalawang 9V batteries wired in series with three diodes to drop the voltage down to the 16V maximum input (or better yet, kung kaya nyang walang diodes) ang gawing supply ng motor? If so, bibilis po ba takbo nya?

Philippine Electronics Forum

Re: P-Bot Official Thread
« Reply #303 on: January 26, 2012, 08:50:04 PM »

Offline glutnix_neo

  • Technical People
  • Nuclear Reactor
  • *****
  • Posts: 4180
  • Pogi/Ganda Points: 166
  • Gender: Female
  • A journey to a thousand lines begins w/ LED Blink
    • Underground Workbench
Re: P-Bot Official Thread
« Reply #304 on: January 26, 2012, 10:52:37 PM »
Depende sa motor maaring bumilis ang takbo kapag sinuplayan ng mataas na voltage, pero at the same time magiging stressed din sya kapag inoperate outside its rated voltage. The best way to get higher speed is to use a motor with higher speed and not just supplying higher voltage.
If we hear,we forget;if we see, we remember;if we do,we understand.
Let's support the use of free and open source softwares...
http://UndergroundWorkbench.wordpress.com

Philippine Electronics Forum

Re: P-Bot Official Thread
« Reply #304 on: January 26, 2012, 10:52:37 PM »

Offline Stark

  • Size AAA Battery
  • ***
  • Posts: 68
  • Pogi/Ganda Points: 0
Re: P-Bot Official Thread
« Reply #305 on: January 27, 2012, 08:52:10 AM »
Ah. I already planned to swap this for a 6-24V motor, ang concern ko lang is yung mismong motor driver na onboard sa P-Bot, baka hindi nya kaya yung 16-18V supply.

Offline zharnel46

  • CR2032 Battery
  • **
  • Posts: 9
  • Pogi/Ganda Points: 0
Re: P-Bot Official Thread
« Reply #306 on: February 01, 2012, 08:42:03 PM »
pwede ko bang pc controlled ung p-bot ung galing sa e-gizmo?

Offline toasted siopao

  • She loves me, she loves me not, she loves me...
  • Global Moderator
  • Gas Turbine
  • *****
  • Posts: 2585
  • Pogi/Ganda Points: 107
  • Gender: Female
    • TeknoBlogger
Re: P-Bot Official Thread
« Reply #307 on: February 01, 2012, 08:47:36 PM »
yup, get a bluetooth shield for it and purchase a bluetooth dongle from cdrking.

pag-aralan how to accept data from arduino uart and then interpret it or assign a command for every data, kung may background ka sa C, you can use switch-case.

sa pagtapon naman ng data from PC, you can use hyperterminal or gawa ka ng app sa visual basic.

Offline glutnix_neo

  • Technical People
  • Nuclear Reactor
  • *****
  • Posts: 4180
  • Pogi/Ganda Points: 166
  • Gender: Female
  • A journey to a thousand lines begins w/ LED Blink
    • Underground Workbench
Re: P-Bot Official Thread
« Reply #308 on: February 02, 2012, 12:11:13 AM »
pwede ko bang pc controlled ung p-bot ung galing sa e-gizmo?

P-Bot Library comes with D-Protocol this is to simplify interface between P-Bot and PC/CP/Tablet. Text Based ang D-Protocol just like AT Commands, nakadefine yan sa manual ko.

For example you want to move PBot forward at the speed of 255, you'll just send below through PC serial terminal

"D01 mFWD 255 ", then send <CR> and <LF> (enter lang yan), but don't forget there must always be a space character after the last character of the string,

eto mga rules...
Quote
6.1.1.  Command Structure

"Dxx [Command_Code] [Parameter1] [Parameter2] <Return><Line Feed>"
(At least 10mS Transmission interval)

"# This is a comment"
Comments (preceeded by a character '#')

Running at 9600bps / 4800bps baudrate.
Every packet must start with ascii character 'D' (0x44) to indicate the start of a D-Protocol packet.
xx is the device/module number.
Each string of the D-Protocol packet is preceeded by the ascii <SPACE> character 0x20. This includes the last string of the packet.
The Command_Code is a fixed length(4 characters) string which tells what register to access
There may be cases that a specific command code requires supporting parameters, these are optional depending on the command used.
Parameters are limited to maximum of 6 characters only. No limit on the minimum number of characters for the parameter.
D-Protocol command is terminated by a return (0x0D) and line feed (0x0A) characters.

If we hear,we forget;if we see, we remember;if we do,we understand.
Let's support the use of free and open source softwares...
http://UndergroundWorkbench.wordpress.com

Offline nokia3310

  • CR2032 Battery
  • **
  • Posts: 42
  • Pogi/Ganda Points: 1
Re: P-Bot Official Thread
« Reply #309 on: February 03, 2012, 04:34:13 PM »
 ???mga sir, patulong naman po.. ill try make my own code on PBOT na line follower, pero straight lng ang takbo ng PBOT.. magdetect ng black line.. tinitest ko ung line sensor ok naman...
ito po ung code ko..salamat sir..
Code: [Select]
const int LS[3] = {5,6,7};
const int M1DIR = 8;  //HIGH - FORWARD
const int M2DIR = 11;
const int M1RUN = 9;  //RIGHT
const int M2RUN = 10; //LEFT
 
void setup()
{
  for(int i=0;i<3;i++)
  {
    pinMode(LS[i],INPUT);
  }
  pinMode(M1RUN,OUTPUT);
  pinMode(M2RUN,OUTPUT);
  pinMode(M1DIR,OUTPUT);
  pinMode(M2DIR,OUTPUT);
 
  digitalWrite(M1RUN,HIGH);
  digitalWrite(M1DIR,HIGH);
}

void loop()
{
  if(digitalRead(LS[1]==HIGH&&LS[2]==HIGH&&LS[3]==HIGH))//straight
  {
    analogWrite(M1RUN,200);
    analogWrite(M2RUN,200);
    digitalWrite(M1DIR,HIGH);
    digitalWrite(M2DIR,HIGH);
  }
  else if(digitalRead(LS[1]==LOW&&LS[2]==HIGH&&LS[3]==HIGH))//slightly left
  {
    analogWrite(M1RUN,100);
    analogWrite(M2RUN,200);
    digitalWrite(M1DIR,LOW);
    digitalWrite(M2DIR,HIGH);
  }
  else if(digitalRead(LS[1]==LOW&&LS[2]==LOW&&LS[3]==HIGH))//sharp left
  {
    analogWrite(M1RUN,50);
    analogWrite(M2RUN,200);
    digitalWrite(M1DIR,LOW);
    digitalWrite(M2DIR,HIGH);
  }
  else if(digitalRead(LS[1]==HIGH&&LS[2]==HIGH&&LS[3]==LOW))//slightly right
  {
    analogWrite(M1RUN,200);
    analogWrite(M2RUN,100);
    digitalWrite(M1DIR,HIGH);
    digitalWrite(M2DIR,HIGH);
  }
  else if(digitalRead(LS[1]==HIGH&&LS[2]==LOW&&LS[3]==LOW))//sharp right
  {
    analogWrite(M1RUN,200);
    analogWrite(M2RUN,50);
    digitalWrite(M1DIR,HIGH);
    digitalWrite(M2DIR,LOW);
  }
   else if(digitalRead(LS[1]==LOW&&LS[2]==LOW&&LS[3]==LOW))//non sense
  {
    analogWrite(M1RUN,0);
    analogWrite(M2RUN,0);
    digitalWrite(M1DIR,LOW);
    digitalWrite(M2DIR,LOW);
  }
  delay(1000);
 }
 

Offline glutnix_neo

  • Technical People
  • Nuclear Reactor
  • *****
  • Posts: 4180
  • Pogi/Ganda Points: 166
  • Gender: Female
  • A journey to a thousand lines begins w/ LED Blink
    • Underground Workbench
Re: P-Bot Official Thread
« Reply #310 on: February 03, 2012, 04:55:32 PM »
unang una kung ang size ng array ay 3, LS[3],

ang range mo ay from LS[0] to LS[2] lang....
If we hear,we forget;if we see, we remember;if we do,we understand.
Let's support the use of free and open source softwares...
http://UndergroundWorkbench.wordpress.com

Offline nokia3310

  • CR2032 Battery
  • **
  • Posts: 42
  • Pogi/Ganda Points: 1
Re: P-Bot Official Thread
« Reply #311 on: February 04, 2012, 11:06:25 AM »
sir tanong lng po.. lage kasing umilaw ung LED indicator ng line sensor ng pbot.. nabasa ko po sa manual, LED indicator should stay ON as long as nkatapat sa black tape, otherwise it will OFF.. bat po ba baliktad?pagtinakpan ko ng papel it turns OFF at pag walang papel it will ON...

Offline glutnix_neo

  • Technical People
  • Nuclear Reactor
  • *****
  • Posts: 4180
  • Pogi/Ganda Points: 166
  • Gender: Female
  • A journey to a thousand lines begins w/ LED Blink
    • Underground Workbench
Re: P-Bot Official Thread
« Reply #312 on: February 04, 2012, 11:44:54 AM »
sir tanong lng po.. lage kasing umilaw ung LED indicator ng line sensor ng pbot.. nabasa ko po sa manual, LED indicator should stay ON as long as nkatapat sa black tape, otherwise it will OFF.. bat po ba baliktad?pagtinakpan ko ng papel it turns OFF at pag walang papel it will ON...

look at it this way, ang sensors ay gumagana by detecting kung may reflection ng IR light o wala, kapag tinakkapan mo ng papel(ang puting papel ay may reflection) natural mawawala ilaw, kapag inalis mo papel at nakaangat ang PBot wala syang makikitang reflection so nakaON normally ang ilaw.

Ang black lines ay nagaabsorb ng ilaw kaya walang masyadong reflection ng IR light.


remember kapag nakasangat or masyadong malayo ang pbot sa sahig, iilaw ang mga sensor indicators na yan.
If we hear,we forget;if we see, we remember;if we do,we understand.
Let's support the use of free and open source softwares...
http://UndergroundWorkbench.wordpress.com

Offline nokia3310

  • CR2032 Battery
  • **
  • Posts: 42
  • Pogi/Ganda Points: 1
Re: P-Bot Official Thread
« Reply #313 on: February 04, 2012, 02:35:14 PM »
look at it this way, ang sensors ay gumagana by detecting kung may reflection ng IR light o wala, kapag tinakkapan mo ng papel(ang puting papel ay may reflection) natural mawawala ilaw, kapag inalis mo papel at nakaangat ang PBot wala syang makikitang reflection so nakaON normally ang ilaw.

Ang black lines ay nagaabsorb ng ilaw kaya walang masyadong reflection ng IR light.


remember kapag nakasangat or masyadong malayo ang pbot sa sahig, iilaw ang mga sensor indicators na yan.
mraming salamat poh sir... nalinawagan na ako ngayun... :)

Offline nokia3310

  • CR2032 Battery
  • **
  • Posts: 42
  • Pogi/Ganda Points: 1
Re: P-Bot Official Thread
« Reply #314 on: February 04, 2012, 07:10:08 PM »
tanong ulit sir., ung pbot ko ksi umugong.. prang series of "tick" lng ang tunog..sumobot ko ang inupload kong code sa MCU.. ano po ba ang problema nito?.,di naman po low bat ung battery.. ok rin namn ang fuse, tinitest ko ung fuse, my continuity namn..

Offline glutnix_neo

  • Technical People
  • Nuclear Reactor
  • *****
  • Posts: 4180
  • Pogi/Ganda Points: 166
  • Gender: Female
  • A journey to a thousand lines begins w/ LED Blink
    • Underground Workbench
Re: P-Bot Official Thread
« Reply #315 on: February 04, 2012, 07:22:04 PM »
referencing back dun sa code na inipost mo....
gumagamit ka ng ganito

   analogWrite(M2RUN,50);

This is good when controlling the speed pero it cannot go all the way down to 0, sa mga test ko before, its usually above 100 upto 255,
Try mo gawing 255 to see if aandar,

Tama ka, another factor is maaring low batt na sya.
If we hear,we forget;if we see, we remember;if we do,we understand.
Let's support the use of free and open source softwares...
http://UndergroundWorkbench.wordpress.com

Offline nokia3310

  • CR2032 Battery
  • **
  • Posts: 42
  • Pogi/Ganda Points: 1
Re: P-Bot Official Thread
« Reply #316 on: February 04, 2012, 08:23:19 PM »
referencing back dun sa code na inipost mo....
gumagamit ka ng ganito

   analogWrite(M2RUN,50);

This is good when controlling the speed pero it cannot go all the way down to 0, sa mga test ko before, its usually above 100 upto 255,
Try mo gawing 255 to see if aandar,

Tama ka, another factor is maaring low batt na sya.

analogWrite namn po gamit ko.. ahh ok sir,, try ko modify ung code..,nitry ko ring measure ng voltage ng batt, at ang voltage ng nito ay 6V., charge ko muna to..

Offline glutnix_neo

  • Technical People
  • Nuclear Reactor
  • *****
  • Posts: 4180
  • Pogi/Ganda Points: 166
  • Gender: Female
  • A journey to a thousand lines begins w/ LED Blink
    • Underground Workbench
Re: P-Bot Official Thread
« Reply #317 on: February 04, 2012, 08:29:02 PM »
hindi analoWrite ang problema kundi yung value na 50, normally ang minimum for P-Bot IIRC is around 120 yata...
If we hear,we forget;if we see, we remember;if we do,we understand.
Let's support the use of free and open source softwares...
http://UndergroundWorkbench.wordpress.com

Offline nokia3310

  • CR2032 Battery
  • **
  • Posts: 42
  • Pogi/Ganda Points: 1
Re: P-Bot Official Thread
« Reply #318 on: February 05, 2012, 03:04:29 PM »
hindi analoWrite ang problema kundi yung value na 50, normally ang minimum for P-Bot IIRC is around 120 yata...

lowbat lng pala sir.., :) sa tingin ko kailangan pababaan ko pa ung line sensor sir kasi umiilaw parin ung led kahit nkatapat na sa black tape.. ano sa tingin nyu sir?.. lagyan ko ba ng extra nut sa taas para mababa pa ung sensor?

Offline zrehtiek/keitherz

  • Lead Acid Battery
  • *******
  • Posts: 772
  • Pogi/Ganda Points: 45
  • Gender: Male
  • PhilRoboKit Anito
Re: P-Bot Official Thread
« Reply #319 on: February 05, 2012, 04:21:11 PM »
may potentiometers yan na pang adjust ng sensitivity.

Philippine Electronics Forum

Re: P-Bot Official Thread
« Reply #319 on: February 05, 2012, 04:21:11 PM »

 

Privacy Policy

Contact Us: elabph@yahoo.com