Shop OBEX P1 Docs P2 Docs Learn Events
TSL 1401 lineScan sensor — Parallax Forums

TSL 1401 lineScan sensor

Alejo83Alejo83 Posts: 28
edited 2013-09-06 11:55 in General Discussion
Hello, I looking for help to program de TSL 1401 lineScan.

I have a piece of plastic with the size of a quarter coin(that is the size that I need to Keep). The problem is that the piece of plastic varies(it can go wider or smaller), so basically what I need, if it is possible of course, program the lineScan to detect the edges of the piece of plastic and in the case it varies (wider or smaller) a signal is send to correct the problem.

If this can be done I would appreciate if you guys can provide to me an example of source code with the basic stamp 2 or the basic stamp 2pe motherboard.

Thank you so much and I will be waiting for feedback!

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2013-09-06 09:29
    Is the plastic round like a quarter? How is it being transported past the sensor? How fast? What color is the plastic? Can you backlight it?

    -Phil
  • Alejo83Alejo83 Posts: 28
    edited 2013-09-06 10:50
    Thank you Phil for your response! Ok ,the profile is of the size of a quarter coin but it has a Weird shape. this profile comes in different colors specially red, blue, white, black, gray, even transparent.

    A puller transport the profile from the extruder machine and it is pretty fast but there is an area where the profile is tensioned and it looks like static(the profile doesn't vibrate) that is where I would like to put this lineScan.

    I only need that the basic stamp measures and save the right distance between the two edges(having a +- tolerance distance) of the piece of plastic and then the LineScan is going to start comparing the size that is coming out and with the one that is saved in the program.

    I don't know if I am correct but it think it doesn't matter the shape of the piece of plastic due that the line scan is just going to measure the distance of the edges(width of the piece of plastic)

    If you don't mind you can give me an example with any object, even with the quarter coin. Saving the size of this coin and then comparing it with other coin sizes(a dime for example) and see how the alarm activates! In this way I can have an idea of how this lineScan works and how to program it.

    Thank you.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2013-09-06 11:19
    It seems that you would have to mechanically position the plastic so that readings could be consistently for the same points on the item. That would be a mechanical problem before you ever get into coding your sensor.

    If you can NOT do that, you may have to use a video input and a lot more computational power to measure and verify dimensions.

    It sounds as if you have all the items in the same position. And it sounds like using an optical reflective sensor might be a good choice. A CNY70 might be the device to begin with.

    The Propeller would offer readings that are more precise as it clocks at a higher speed than any of the BasicStamps. Also, you could have several forms of output.... a simple logic indicating OK, a serial output to a remove computer of an actual number value, and a display as either a LCD or a VGA.

    Besides all that, the Propeller is generally a cheaper per unit than the BasicStamp.

    http://www.vishay.com/docs/83751/cny70.pdf
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2013-09-06 11:38
    Forgive me, I see the TSL 1401 is what you want support for. I am not familiar with it. I will cease comment.
  • Alejo83Alejo83 Posts: 28
    edited 2013-09-06 11:47
    Thank you loopy, I can have the profile straight and non-movement so the linescaner is going to be pointing the same direction, now the thing is how to save the measure is the edges and then compare them with the ones that are coming out!

    I am going to start trying with the reflective sensor as well! Thank you for your advice!
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2013-09-06 11:55
    The CNY70 sensor presumes that you have a constant rate at which the item moves past it... this is not static. It would just read the edges that go buy with a high or low.

    Color may be a problem. It is an IR sensor that uses and LED. You might have to find an optimal non-reflextive color for the background.. a black or a gray. The sensor might just read the relection of the plastic more than the actual color if it is glossy.

    It would work on an assembly line situation, but you might have to have a buffer to allow items to wait to be moved past the sensor at a constant rate. It might not have to be a big buffer, but a few items might sit and wait.
Sign In or Register to comment.