Shop OBEX P1 Docs P2 Docs Learn Events
Infrared array tuning for 1/4 inch line — Parallax Forums

Infrared array tuning for 1/4 inch line

vthyngvthyng Posts: 3
edited 2014-08-24 11:09 in Accessories
I am having trouble getting the 8 infrared sensor array to tune well to a 1/4 inch black tape. It works well with 3/4 inch electrical tape. For a line maze competition, I need t use 1/4 inch though. I am using this tape https://www.michaels.com/westcott-vinyl-artist-tape-black-and-white/10148877.html#q=black+tape&start=5 . What is happening is that as I tune the sensors to see the 1/4 inch tape along the line of sensors, 1 is not sensitive enough while the others are just right. I can't find a good setting for all of them to see the line. Can someone confirm that this array wasn't intended for 1/4 or perhaps I need to be using a different kind of tape, or maybe I can balance the sensors a bit more some how. Thanks for your input.

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2014-08-03 22:18
    vthyng wrote:
    Can someone confirm that this array wasn't intended for 1/4 or perhaps I need to be using a different kind of tape, or maybe I can balance the sensors a bit more some how. Thanks for your input.
    It would help us ot help you if you provided a link to "this array."

    -Phil
  • ercoerco Posts: 20,256
    edited 2014-08-04 07:24
    Per Phil, it depends on the array. Specifically, the size and geometry of the leds and ptx sensors. The 3pi robot does a great job on narrow lines, you may want to check that out.
  • TtailspinTtailspin Posts: 1,326
    edited 2014-08-04 08:33
    Do you mean this sensor? http://www.parallax.com/product/28034

    I'm sure you found the on board variable resistor already, that will help adjust sensitivity.
    Also I found that shading the sensor from as much light as possible, gives more reliable results.

    1/4" tape sounds very skinny, and if the tape doesn't reflect IR very well, then that will also lead to problems.
    What is happening is that as I tune the sensors to see the 1/4 inch tape along the line of sensors, 1 is not sensitive enough while the others are just right. I can't find a good setting for all of them to see the line.
    Is it the same sensor on the array that doesn't work well every time?



    -Tommy
  • ercoerco Posts: 20,256
    edited 2014-08-04 18:52
    Mounting height above the surface affects the viewing angle and can be adjusted to yield different results. If you are using the sensor Tommy linked to, then you can experiment both with different mounting heights and LED frequency, 38 kHz plus or minus.

    But 1/4" is an unusually narrow line. For that, you'd have individual sensors spaced closer than 1/4" apart. Depending on your particular sensor's spacing, you might not get a continuous reading when the line is between two sensors. Your program may have at account for losing the line briefly and remembering the last sensor that saw the line, to continue that maneuver until the next sensor sees it.

    When you get it going, you'll also find that max speed and reliability are also dependent on the fore & aft sensor location, that is, how far ahead of the wheels your line sensor is. Other variables include traction, weight, moment of inertia, distance between wheels, etc.

    As I mentioned, the 3pi robot has been optimized for this. I am still amazed to watch it accelerate and slow down in the long straights on its second run.

    Not line following, but amazing accel/decel and diagonals through the maze:

    https://www.youtube.com/watch?v=A4hzCcFikm0
  • ercoerco Posts: 20,256
    edited 2014-08-04 19:33
    I bet you could make a nice sensor array for about $8 using eight of these dollar IR reflective sensors. Tiny, just butt them up against each other to see a 1/4" line, two 339 quad comparators and a few hours of building and calibration. A few cold weissbiers and "Iron Man" playing on the tv would make for a nice evening.

    http://www.goldmine-elec-products.com/prodinfo.asp?number=G18740
  • GordonMcCombGordonMcComb Posts: 3,366
    edited 2014-08-08 09:40
    vthyng wrote: »
    I am having trouble getting the 8 infrared sensor array to tune well to a 1/4 inch black tape. ... Can someone confirm that this array wasn't intended for 1/4

    It's not. Use 1/2" electrical tape. The sensors are spaced too far apart. Ideally two adjacent sensors should see the line at the same time. Otherwise you'll always have to "hunt" the line to know you're going straight.

    Even though it's an array, pretend you're only dealing with two sensors. Think of it as binary number counting, 00, 01, 10, 11. With this arrangement the programming become much easier:

    11 -- Squarely on the line. Go straight!
    01 -- Veering off to the left
    10 -- Veering off to the right
    00 -- Egads, I've lost the line. Let's go in circles to find it again!

    Obviously for this to work the sensors have to be packed close enough so that both will solidly straddle the line at any time.

    For an 8-sensor array, you still work with binary counting, only the middle two digits denote centered travel. Values above or below this denote how far from center you are from the line.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2014-08-08 10:10
    1/4 inch line certainly ups the challenge. I would consider using a CNY70 sensor and maybe have two rows of sensors that overlap in necessary. These are 7mm x 7mm squares.

    Are you limited to 8 sensors, or can you use more?

    You might get by nicely with only 5 sensors. Pololu's 3pi certainly does. Take a look at how they are positioned.

    www.vishay.com/docs/83751/cny70.pdf`
  • vthyngvthyng Posts: 3
    edited 2014-08-12 21:28
    Thank you very much for all of the responses.
    Yes the array is http://www.parallax.com/product/28034
    I have tried tuning the sensors with the resistor, but could not find a good setting, as 1 sensor in particular seems to be much more/less sensitive than the others. This does not seem to be a problem for a ¾ inch line.
    There is no limit to the number of sensors I can use.
    I am using the Propeller Activity Board, on the boe bot chassis.
    The contest is part of the Seattle Robotics Society’s Robothon September 20th. Their line follower contest is ¾ inch electrical tape, but the line maze are more difficult ¼ inch lines.
    If the sensors were closer in sensitivity to each other, I think I could still use these. I am wondering if I can standardize the signals on my breadboard with voltage dividers. I may try that.
    Thank you for the other ideas too. I checked out the sensors in other links. I have also been looking at those capacitive discharge arrays like
    http://www.robotshop.com/en/pololu-qtr-8rc-infrared-sensor-array.html
    and
    http://www.pololu.com/product/1419/

  • ercoerco Posts: 20,256
    edited 2014-08-21 21:59
    That Roboshop sensor (also available from US seller at http://www.ebay.com/itm/QTR-8A-Reflectance-Sensor-Array-/201143506124 ) has 0.375" spacing between sensors, and you want to see a line that's 0.250". Description says you can cut the sensor in half and make two different sensors. You could butt them together, offset by a half space and it might just suit your needs since the effective spacing is now 0.188". The board geometry works in your favor since the sensors are closer to one edge, put those edges together and the fore & aft distance is less.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2014-08-21 22:49
    If it's allowed by the contest, you could use the TSL1401-DB linescan module. Here's a thread I started that shows how to do it with a BOE-Bot:

    Since the TSL1401 output is analog, it would work well with the Activity Board's built-in ADC. In any event, with the sensor's 128 pixels, the width of the tape would not be an issue.

    -Phil
  • TtailspinTtailspin Posts: 1,326
    edited 2014-08-22 08:49
    The Line following contest requires your bot to stay on the line while it finds the end of the course.
    The Line Maze contest requires your bot to stay between the lines. yes?
    This might require a different line finding strategy for the different events.

    I think the Parallax array will work for both events, as long as it is not malfunctioning, I think one of the sensors on my array is weak also.
    I will have to confirm, it has been a while since I played with it.

    -Tommy
  • ercoerco Posts: 20,256
    edited 2014-08-22 15:19
    @Tommy: I believe he's talking about the line mazes where you do stay on the line. It's fun to watch this 3pi accelerate and decelerate in the long straights on its final run.
  • NWCCTVNWCCTV Posts: 3,629
    edited 2014-08-22 16:31
    @erco, very cool. Can you post the code for this? I would like to give it to my grandson so he can see if he can get his scribbler to do the same thing.
  • TtailspinTtailspin Posts: 1,326
    edited 2014-08-22 19:33
    1/4" tape is very thin line to follow,
    I guess the array could be attached at a 45 degree angle to the robot, that would tighten the space between the sensors. Sounds inconvenient.
    Or, buy two arrays, and put one in front of the other, and offset from each other. Sounds expensive.

    Wider Tape, or Narrower Sensors. Hrmm.

    We used a shiny Silver Tape at the Parallax 'Giant 555 Circuit' line following contest. Wonder if the course is still there?. :)
  • ercoerco Posts: 20,256
    edited 2014-08-24 11:09
    NWCCTV wrote: »
    @erco, very cool. Can you post the code for this? I would like to give it to my grandson so he can see if he can get his scribbler to do the same thing.

    Andy: That's not my bot, otherwise l would! :)
Sign In or Register to comment.