Shop OBEX P1 Docs P2 Docs Learn Events
Line Following Robot... Plan B — Parallax Forums

Line Following Robot... Plan B

TtailspinTtailspin Posts: 1,326
edited 2012-03-17 12:13 in Robotics
Being interested in the Line Following Contest during UPEW this year, I decided to build a new Robot.
So I started sizing up materials for the task...
HeavyDuty Line Follower.jpg

As I was working some of the details of attaching the more necessary accessories to my new Robot,
Plan A is fairly obvious from the construction, But, no plan is perfect, and so, It came to me,
That I might need a Plan B... Plan B is where the robot actually follows a line...

So, My question to you all, is how do you do it? what are you using to follow a shiny line on black "smooth" pavement?
The IR line follower from Parallax is sold out, and that seemed like the best way, but I could not find a schematic..
Is there a schematic for the 28034? or is it top secret until the contest is over?cough(MattG)cough...

Anyways, what do you fine folk do for hardware and such to make your robot follow a line?


-Tommy
1000 x 750 - 635K

Comments

  • W9GFOW9GFO Posts: 4,010
    edited 2012-03-15 20:50
    Make sure that you do not exceed the weight limit. I was thinking of putting some QTIs on the QuadRover but that would be a tad overweight. It would also probably tear up the tape when it turned.

    I think Phil's linescan sensor should work well.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-03-16 01:42
    You could use QRE1113 sensors and build your own board. SF sells them on a little board in both analog and digital versions.

    attachment.php?attachmentid=90658&d=1331887170
    I've used these sensor for wheel encoders but not for line following.

    I believe Bill Henning makes a little line following sensor board.
    600 x 600 - 99K
  • Martin_HMartin_H Posts: 4,051
    edited 2012-03-16 07:30
    I've only done line following with table top robots using white paper with black lines. How do they put the lines on the pavement? Is it reversible? How big is the contrast?

    I just built my first outside robot, while it is small (only 8" long) it should be good enough for use outside compared with the other robots I own. I plan to buy a GPS and try a robo-Magellan challenge, but line following on pavement sounds interesting too.
  • PublisonPublison Posts: 12,366
    edited 2012-03-16 08:08
    Martin_H wrote: »
    I've only done line following with table top robots using white paper with black lines. How do they put the lines on the pavement? Is it reversible? How big is the contrast?

    I just built my first outside robot, while it is small (only 8" long) it should be good enough for use outside compared with the other robots I own. I plan to buy a GPS and try a robo-Magellan challenge, but line following on pavement sounds interesting too.

    Martin,

    Check out the video in Kye's Stingray run. Looks like they just spray painted the lines, and there is less contrast than black pavement. He used the QTI sensors.

    Jim
  • Martin_HMartin_H Posts: 4,051
    edited 2012-03-16 08:56
    Neat. If I try this I better use water soluble paint to avoid strangulation by neighbors.
  • TtailspinTtailspin Posts: 1,326
    edited 2012-03-16 11:01
    Most definitly weight is all important, that is why I will use the small bottles of MAPP gas, and only 1" plate steel...

    The initial blast should serve to neutralize within a 5' to 6' radius, And the spike head trip hammer, will help to pick off any remaining stragglers...
    I figure I got Plan A all worked out, it's just that I would not want to be thought of as "unsporting" because my robot could not follow a line...

    I believe that the Line to follow will be 1" HVAC tape, it's a shiny silver color, I wonder if the ColorPal could see this?


    -Tommy
  • ercoerco Posts: 20,256
    edited 2012-03-16 14:36
    I just got one of these vintage Trail Tracker crayon line followers off Ebay. Maybe I'll bring THAT to the Expo to enter in LFO. No time to build anything else!

    http://www.retrojunk.com/details_commercial/11364/
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-03-16 14:48
    Ttailspin wrote: »
    I believe that the Line to follow will be 1" HVAC tape, it's a shiny silver color

    So is the stuff conductive? Maybe you could use a bunch of metal whisker wires to sense the tape.
  • TtailspinTtailspin Posts: 1,326
    edited 2012-03-16 23:08
    LOL, I remember those crayon followers, they were like magic to the kids..

    @Duane, yes, the tape is conductive, I could only guess that 1" wide might equal #12AWG.
    and it is very shiny...
    ShinyTape.JPG


    Maybe you could help me.
    I want to put four true/false variables into one easy to manage binary byte...
        value0 :=(QTI.readSensorDigital(0,225))        
        
        value1 :=(QTI.readSensorDigital(1,225))
        
        value2 :=(QTI.readSensorDigital(2,225))
       
        value3 :=(QTI.readSensorDigital(3,225))
    
    It would help me to make the four value's into one binary something like this...
        case state
          %0011, %0001, %0010:      ' Pivot left
            DutyCycleA := 65
            DutyCycleB := 0                                                                                       
          %0111, %0110, %0100:      ' Slight left 
            DutyCycleA := 60 
    ect,ect...
    
    Just like Kye did, except I am only using four QTI's, and Servo's instead of those sweet Stingray motors.


    -Tommy
    1000 x 750 - 699K
  • TtailspinTtailspin Posts: 1,326
    edited 2012-03-17 10:43
    It's easy to do with the Parallax Serial Terminal...
    VAR
      long value0,value1,value2,value3 
       
    OBJ
      
      QTI : "QTIEngine"    
      
      pst : "Parallax Serial Terminal"
        
    PUB start
      pst.Start(115_200)                      
      QTI.QTIEngine
      
      repeat
        
        value0 :=(QTI.readSensorDigital(0,225))        
        
        value1 :=(QTI.readSensorDigital(1,225))
        
        value2 :=(QTI.readSensorDigital(2,225))
       
        value3 :=(QTI.readSensorDigital(3,225))
        
        pst.Str(String(pst#CE, pst#HM, "QTI Sensors 0,1,2,3 = "))    
        pst.bin(value0,1)  
        pst.bin(value1,1)
        pst.bin(value2,1)
        pst.bin(value3,1)
        
        waitcnt(clkfreq / 6 + cnt)
    
    The values line up magically on the TV screen. But that doesn't help to move my Robot.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-03-17 11:39
    Here's my attempt Tommy.
    VAR
      long value
      ' just because I don't like to use shift operations on anything but a long
      ' it should work with a byte also.  I haven't tested either.
    OBJ
      
      QTI : "QTIEngine"    
      
      pst : "Parallax Serial Terminal"
        
    PUB start | index
      pst.Start(115_200)                      
      QTI.QTIEngine
      
      repeat
        value := 0  ' clear away old bits to start fresh
        repeat index from 0 to 3  ' we want to loop to repeat four times but we also want to increment "index" to send to the QTI object
          value <<= 1  ' shift all the bits in "value" one bit to the left, the last bit will be filled with a zero
          value += QTI.readSensorDigital(index,225) & %1   ' "by "anding" the return value with one, we can be sure only one bit is added to "value"
        
        pst.Str(String(pst#CE, pst#HM, "QTI Sensors 0,1,2,3 = %"))    
        pst.bin(value, 4)  ' display the four least significant bits of "value" Edit: you already know this.
       
        waitcnt(clkfreq / 6 + cnt)
    
     
    

    I haven't tested the above code. Let me know if there's a problem.
  • TtailspinTtailspin Posts: 1,326
    edited 2012-03-17 12:13
    Thank you Duane, Your code works perfectly, Man, this stuff is so easy, it's hard for me sometimes.
    I was determined to "AND" anything and everything...
        state :=(value0, and value1, and value2, and value3)
        state := temp[0] + temp[1] + temp[2] + temp[3] 
    
    Good thing I stopped and asked when I did, cuz it was about to get ugly-er.

    LOL, I am never in doubt,.. Often mistaken,.. But never in doubt... sigh...


    Thanks again Duane, Now I can move foward with the Blast testing and Fire proofing...


    -Tommy
Sign In or Register to comment.