Shop OBEX P1 Docs P2 Docs Learn Events
how do i get 4 qti line sensors to work on boe-bot — Parallax Forums

how do i get 4 qti line sensors to work on boe-bot

stavrosstavros Posts: 22
edited 2008-06-11 18:19 in Robotics
I have mounted 4 qti line sensors on my boe-bot and im loading the subroutine for faster sampling rates(LineFollowWithCheckQtis.bs2),but it doesnt do anything when i put it on a line.I would be looking forward to any suggestions.Do the sensors need any kind of calibration first and how is this done?
Also my question is,on the circuit arent any resistors needed and how come they are needed on the 3 qti line sensor configuration? (Inside the kit there are 4 resistors fo all 4 sensors)

Comments

  • Dan TaylorDan Taylor Posts: 207
    edited 2008-06-09 18:57
    Yes, I am having the same type of problem. I hooked up 3 QTI's like shown in the manuel. But when placed ontop of·a line it dosn't detect it for some reason.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Dan Taylor
  • FranklinFranklin Posts: 4,747
    edited 2008-06-09 19:29
    Could you post a link to the document you are referencing? Thanks. Also if you ATTACH your exact code it would help. Typos are the main reason code from a printed page does not work.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • Dan TaylorDan Taylor Posts: 207
    edited 2008-06-09 19:49
    The code is attached along with the documents that I followed to hook them up.

    I followed the circuit on page 4 of the document









    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Dan Taylor
  • FranklinFranklin Posts: 4,747
    edited 2008-06-10 01:14
    Dan, replace your select with a debug statement and see what you get as you move the bot over a black line.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • stavrosstavros Posts: 22
    edited 2008-06-10 11:53
  • Dan TaylorDan Taylor Posts: 207
    edited 2008-06-10 16:42
    Franklin,

    I used the exact code below I got it from the same documentation that I attached. It will sense the line sometimes but most of the times it does not.

    If I put my finger under a one of the QTI's it will sense it but the line it does not sense.

    I just printed some black lines off of Microsoft publisher. Will that work. Or do you have to use Electrical tape?



    ' QtiBwDetect.bs2
    ' Boe-Bot detects electrical tape with 3 QTI modules.


    '{$STAMP BS2e}
    '{$PBASIC 2.5}


    qtiLeft·· VAR·· Bit
    qtiCenter VAR·· Bit
    qtiRight· VAR·· Bit


    DO
    · HIGH 5: PAUSE 1: qtiRight = IN3: INPUT 5
    · HIGH 6: PAUSE 1: qtiCenter = IN3: INPUT 6
    · HIGH 7: PAUSE 1: qtiLeft = IN3: INPUT 7

    · DEBUG HOME, BIN1 qtiLeft, BIN1 qtiCenter, BIN1 qtiRight
    · PAUSE 100
    LOOP

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Dan Taylor
  • FranklinFranklin Posts: 4,747
    edited 2008-06-10 20:12
    Several people find that printed lines are transparent to IR so I would test with tape. If you are in a competition they will be sure to have the correct material or else noone would be able to finish.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • FranklinFranklin Posts: 4,747
    edited 2008-06-10 20:15
    Stavros, if that is exactly what you are using then it should work. Check your wiring, battery voltage and line material.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • Dan TaylorDan Taylor Posts: 207
    edited 2008-06-10 21:54
    Thanks Franklin,
    That was the problem. the printed paper was no good. It does not sense it but black tape works fine.
    Thanks for the help I appreciate it.



    Stavros,
    I tried the 4 QTI sensor that you are using and its much more complicated. You should try the 3 QTI layout. It works alot better for me I don't know about you.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Dan Taylor
  • edited 2008-06-10 22:23
    Stavros,

    Use the CheckQtiSubroutine.bs2 to verify that each QTI detect the line. The PDF documentation explains how to use it. Both the PDF documentation and the zipped .bs2 file are included in the links you posted.

    Start with black vinyl electrical tape on a white sheet of paper. All the QTIs should respond to the difference between the black electrical tape and the paper. Make sure each QTI reliably detects the tape and paper background before continuing.

    As some of the other folks reported, certain printers make black lines that reflect about as much infrared as the white background. Again, you can use CheckQtiSubroutine.bs2 to find out if that's the case with your particular printer.

    For best results, I usually mount the QTIs edge to edge underneath my Boe-Bot.

    Hope this helps.

    Andy

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Andy Lindsay

    Education Department
    Parallax, Inc.
  • stavrosstavros Posts: 22
    edited 2008-06-11 18:13
    Thanks Andy.
    Today I got it to work(not completely)·all of a sudden.The zeros and ones kept changing when I put the bot over a black line and swept it across each of the sensors.
    I used the lego mindstorms nxt printed poster with the black line loop.
    So when I loaded the line following program it started following the line until where it turns and it stopped.
    Then I put it again over the straight section of the line and it started following it again.It did half the turn then it stopped again.
    So whats going on? When it encounters anomalies in the lines, like turns ,it stops? I think it is programmed to stop when it encounters only white surface but thats not the case im describing.
  • stavrosstavros Posts: 22
    edited 2008-06-11 18:19
    And also :

    Which configuration is more reliable the 3 sensor or the 4 sensor one?
    Faster doesnt mean always more reliable as well

    Wouldnt it be more reliable but slower,·if I implemented code that makes the bot make jigsaw movements over the border of white and black?
Sign In or Register to comment.