Shop OBEX P1 Docs P2 Docs Learn Events
NEW PRODUCT: TSL1401-DB Linescan Imaging Sensor — Parallax Forums

NEW PRODUCT: TSL1401-DB Linescan Imaging Sensor

Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
edited 2014-03-14 08:07 in Accessories
Parallax has just introduced the TSL1401-DB Linescan Imaging Sensor:

28317-M.jpg

This is a product that I've had in gestation for several years, through numerous revisions, and it's the latest in a series of linescan imagers I've been involved with since 1981. These imagers have been used for things like sorting fruit, orienting gin bottles, measuring lumber, orienting plastic heads for toy figures, tracking seams for automatic pipe welders, and measuring tires, among many others.

I hope this particular imager can find similar uses in industry. But unlike my other imagers, which sold for hundreds of dollars, this one is priced to appeal to hobbyists and amateur roboticists as well. If you have any questions or comments, feel free to ask them here, and I will do my best to answer them forthwith.

Thank you!
-Phil

Post Edited (Phil Pilgrim (PhiPi)) : 6/2/2009 10:57:29 PM GMT
«13456

Comments

  • SRLMSRLM Posts: 5,045
    edited 2009-06-02 23:43
    Interesting! I remember you divining a hint of this a while ago on measuring drops of liquid. That bagel in the datasheet looks delicious. A couple of questions:

    1) Will there be lenses available to select between different colors? I haven't had time yet to go through the whole datasheet, but I assume it measures intensity of all colors.
    2) How would you consider using this for a robotics application? Could it be used to measure the rate of motion if it's pointed at the ground (similar to an optical mouse I guess).
    3) Will there be a protective cover made available? I'm in a constant state of fear around lenses: will I scratch it?
    4) Some links to examples where this (or a similar sensor) has been used would be great.
    5) Would it be possible to use this with a laser as a range finder? I'm thinking of those examples where roboticists use a webcam and a laser. Also similar in principle is the sharp IR sensors.

    Looks great!
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-06-03 00:03
    SRLM,

    1. You can get inexpensive plastic color filters from Edmund. These can be cut to size to fit the square cavity in the lens holder behind the lens. You could also arrange a set of RGB filters on a filter wheel in front of the lens, turned by a servo. This is the way the Mars Rovers obtain color images with their cameras.

    2. The two robotics apps I had in mind that would work with a Boe-Bot are line following (using a separate light source) and flame detection and location. I've done both and hope to have app notes available for these soon.

    3. The lens element is fairly small and recessed enough in its barrel that the chance of scratching it is pretty slim. However, if you're still worried, you could take a 1/4" paper punch and punch a hole in the center of the included lens cover. Then cut out a thin piece of transparent plastic to put behind it before placing the cover over the lens. This technique would also work with color filters.

    4. I'll see what I can find. My own customers, who used my industrial sensors, would rather I not reveal who they are or what they were doing.

    5. Yes. You would need a laser line generator that you could mount some distance off-axis from the imager, such that the laser line and sensor line are perpendicular. You would probably want to modulate the laser on and off, too, so you could separate it from any bright background objects. A color filter will also help.

    -Phil
  • HumanoidoHumanoido Posts: 5,770
    edited 2009-06-03 01:02
    Wow! Very useful sensor for the reduction of cross sectional image analysis.

    How fast can it make a photographic image - one line only scan?

    What is the practicality of acquiring one full image by scanning line by line (moving the sensor by servo), i.e. how long to scan a full 128 pixel by 128 pixel x-y image and save the result?

    humanoido
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-06-03 03:36
    humanoido said...
    How fast can it make a photographic image - one line only scan?
    Yes one line at a time.
    humanoido said...
    What is the practicality of acquiring one full image by scanning line by line (moving the sensor by servo), i.e. how long to scan a full 128 pixel by 128 pixel x-y image and save the result?
    It's entirely practical. Here is a setup I used as a quick and dirty demo. I had to use two Stamps, since my monitor software for the MoBoStamp-pe wasn't configured to rotate a servo. (It could be, though.)

    attachment.php?attachmentid=61312

    Here is a snapshot of the monitor screen after one scan:

    attachment.php?attachmentid=61313

    A full scan across the screen (512 x 128 pixels) takes about two minutes. The limiting factor is the 38,400-baud data rate for transmitting the pixels to the PC for display.

    -Phil

    Post Edited (Phil Pilgrim (PhiPi)) : 6/3/2009 5:51:33 PM GMT
    800 x 493 - 99K
    528 x 603 - 83K
  • ElectricAyeElectricAye Posts: 4,561
    edited 2009-06-03 04:13
    Awesome advancement!
    When can we expect a Propeller Object in the OBEX for this one?
    Any idea how many photons you need to register a signal on a pixel with this?

    Great job!




    hop.gif
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-06-03 04:22
    The pixel sensitivity is given in the TSL1401R datasheet as 35V/(uJ/cm2). Each pixel is 63.5 x 55.5 microns. 'Not sure how that translates into volts per photon, though.

    A Propeller object is in the works.

    -Phil
  • TubularTubular Posts: 4,620
    edited 2009-06-03 05:33
    Great product, Phil.

    Also brilliant timing, I was just surveying what was available along these lines, for an upcoming industrial application.

    can't help wondering what else you have 'in gestation'... hope the other products don't take as long to hit the market.

    tubular
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-06-03 05:50
    Tubular,

    Since you're interested in industrial apps, I can disclose that there's an RS232 daughterboard in the works that interfaces directly to a Koyo (www.automationdirect.com) PLC via an RJ12 cable. It would plug into socket A of the MoBo, with the linescan sensor (or another sensor) in socket B. That way the PLC can power the whole system through the comms cable. The docs and DirectNET protocol PBASIC software are done. I just need to get some made. If this is something that might be of interest, please let me know.

    I also want to do both a 4-20mA output module and an isolated discrete I/O module, but haven't settled on designs for them yet.

    -Phil
  • TubularTubular Posts: 4,620
    edited 2009-06-03 07:37
    Hi Phil,

    Koyo, interesting. I've only ever come across one in this country, however I believe there may be a lot of them monitoring small gas plants (nitrogen storage etc). RJ12 is great for quick lashups though.

    I don't have an immediate use for the modules you mention, but am sure to one day. I'll let you know when it happens! Good to see some more industrial options appearing for the prop.

    I'm about to laser cut & mark some brushed stainless fascias for an assortment of sensors. I'd like to do one for this line scanner too, so can I trouble you for the diameter of the lens barrel? The datasheet mentions an M12 fine lens thread but not the OD which will be slightly larger.

    It also looks like it would fit very tidily in a 1 1/2" square stainless tube (1.6mm wall thickness)

    tubular
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-06-03 08:34
    One of many projects I've started, but have yet to finish, is an extrusion for the motherboard/daughterboard modules. Parallax has had the extrusion for awhile (too long, in fact), but I have to design the endcaps and coverplates for it. The challenge is to come up with something having universal cutouts, so the number of SKUs can be kept to a minimum.

    I've closed up shop for the evening, but I'll post a photo of the extrusion tomorrow. I'll also mike the lens holder barrel and post the diameter for you.

    -Phil
  • HumanoidoHumanoido Posts: 5,770
    edited 2009-06-03 10:59
    Very good scan! Can you post the stamp software?

    humanoido
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-06-03 17:37
    Tubular,

    The diameter of the lensholder barrel is 0.586" at its thickest point. Here is a photo of the TSL1401-DB/MoBoStamp-pe installed in one of the extrusions I mentioned (sans endcaps and top plate):

    attachment.php?attachmentid=61318

    -Phil
    692 x 715 - 42K
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-06-03 17:45
    humanoido,

    Here's a copy of the file that's automatically loaded into the MoBoStamp-pe by the PC host program that produced the scan shown above:

    ' {$STAMP BS2pe}
    ' {$PBASIC 2.5}
    
    io      PIN 6
    ext     PIN 3
    busy    VAR Bit
    
    mode    VAR Byte
    exp     VAR Byte
    led     VAR Byte
    
    gate    VAR mode.BIT7
    trig    VAR mode.BIT6
    strobe  VAR mode.BIT5
    autoexp VAR mode.BIT4
    sync    VAR mode.BIT3
    lock    VAR mode.BIT2
    
    
    pixno   VAR Byte
    pixval  VAR Byte
    char    VAR Byte(16)
    i       VAR Byte
    maxbrt  VAR Char
    
    NUL       CON $00
    SOH       CON $01
    EOT       CON $04
    BAUD9600  CON 84
    BAUD      CON 6
    
    mode = 0
    exp = 64
    led = 0
    
    PAUSE 10
    LOW 14
    
    SEROUT 16, BAUD9600, [noparse][[/noparse]NUL, NUL, NUL, "R", NUL, EOT]
    SERIN 16, BAUD9600, 200, GoAhead, [noparse][[/noparse]WAIT(SOH, "M"), HEX2 mode, HEX2 exp, HEX2 led]
    
    GoAhead:
      pause 10 
      SEROUT 16, BAUD9600, [noparse][[/noparse]NUL, ">", NUL, EOT]
      OWOUT io, 1, [noparse][[/noparse]$EC, 128, 8, $00, $EB, strobe << 7 | led, $EE, exp] ', $A4]
    
    GOSUB Ready
    
    DO
      DO WHILE (gate and ext) : LOOP
      IF (sync) THEN
        IF (trig) THEN 
          DO : LOOP UNTIL ext
          DO : LOOP WHILE ext
        ENDIF
        LOW 0 : INPUT 0
        PULSIN 0, 0, char
        IF (char = 0 OR char > 96) THEN lock = 0 ELSE lock = 1
        OWOUT io, 1, [noparse][[/noparse]$A0]
      ELSE
        OWOUT io, 1, [noparse][[/noparse]trig << 3 + $A0]
      ENDIF
      SEROUT 16, BAUD, [noparse][[/noparse]NUL, "M", HEX2 mode, HEX2 exp, HEX2 led, NUL, EOT]
      GOSUB Ready
      SEROUT 16, BAUD, [noparse][[/noparse]NUL, "P"]
      FOR pixno = 0 TO 7
        OWIN io, 8, [noparse][[/noparse]STR char\16]
        SEROUT 16, BAUD, [noparse][[/noparse]STR char\16]
      NEXT
      SEROUT 16, BAUD, [noparse][[/noparse]NUL, EOT]
      IF (autoexp) THEN
        OWOUT io, 1, [noparse][[/noparse]$DA, 34]
        OWIN io, 8, [noparse][[/noparse]maxbrt]
        exp = $E000 / (maxbrt / $FF + 1 * maxbrt) */ exp max 255 min 1
        OWOUT io, 1, [noparse][[/noparse]$EE, exp]
      ENDIF
    LOOP
    
    Ready:
      DO
        OWIN io, 4, [noparse][[/noparse]busy]
      LOOP WHILE busy
      RETURN
    
    
    



    It's restarted every time the host needs to change a parameter. Then it just obtains scans and sends them to the host. SERIN and SEROUT communicate with the PC; OWIN and OWOUT, with the TSL1401 driver in the AVR coprocessor.

    -Phil
  • Ken GraceyKen Gracey Posts: 7,386
    edited 2009-06-03 18:12
    A bit of a thread hijacking here.

    Regarding the extrusion, we have 300 lineal feet in stock that we'd love to start cutting up with our new automatic drop saw. I've had to move it out of the way every year on June 30 for inventory count and I'm excited about the possibility of putting it in our inventory once and for all.

    I'm curious about our customer's level of interest in the extrusion. I imagine it would be around $5 a section or so. We don't have endcaps, as Phil noted.

    Anybody interested in the extrusion for this kind of application?

    Ken Gracey
  • UnsoundcodeUnsoundcode Posts: 1,530
    edited 2009-06-03 18:41
    As a note that might be obvious but I'll mention it anyway . The extrusion looks similar to pieces I have used before and is quite·easy to make your own endcaps and cover plates plastic or aluminum. The cover slides in the slots of the extrusion and is held in place by the endcaps which fasten with machine screws·in the two holes below the usb connector left and right

    Jeff T.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-06-03 18:59
    Jeff,

    Correct. The holes are sized to be tapped #8-32. So here's a question: If endcaps were available in a black G10 (epoxy-glass laminate) material with cutouts for the motherboard only (power, USB, LEDs, reset button) in a set with a blank top plate, would that be an attractive option, assuming people could finish them themselves? OTOH, suppose the top part of the endcaps were open, with just enough meat (i.e. a frame) to hold the boards and top plate in place?

    -Phil
  • John R.John R. Posts: 1,376
    edited 2009-06-03 19:29
    The endcap with the motherboard holes sounds nice, but how about a "solid" cap too that let's us put our own holes in? Thinking about "industrial" type applications, separate holes would probably be a no-go, you'd probably have to use a 1/2 conduit connection and break out the connections once inside.

    Something easier to work with than G10 might be nice. It's not the worst thing, but there are other plastics are easier for "one off" work.

    In terms of the extrusion, possibly a "double" lenght could also be offered? I'm thinking for use with projects that don't involve the motherboard, or a line of sensors along a conveyer, as well as room for a conduit connector as mentioned above.

    Keep in mind that the above opinions, along with a buck or two (depending on where you are) will get you a soda from a vending machine.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    John R.
    Click here to see my Nomad Build Log
  • John R.John R. Posts: 1,376
    edited 2009-06-03 19:35
    Ken Gracey (Parallax) said...
    A bit of a thread hijacking here.

    I'm curious about our customer's level of interest in the extrusion. I imagine it would be around $5 a section or so. We don't have endcaps, as Phil noted.

    Anybody interested in the extrusion for this kind of application?

    Ken Gracey
    If I buy the line sensor, can we find a way to add a couple of extrusion lenghts (I'll pay), or even just a 3 foot length?· Reflecting back on my previous post about "double length", how about scratch the double lenght, and offer the signle length for the motherboard and a 24" or 36" length as a "bulk" solution.

    I'm guessing this extrusion could also work with the Color sensor, correct?



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    John R.
    Click here to see my Nomad Build Log
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-06-03 20:19
    John R.,

    Yes, it works with the color sensor, and all the other daughterboards. A little history here: I got stuck with a bunch of customized extrusions when a customer went out of business before buying the LED backlights they were designed for. So, when I designed the MoBo and daughterboard line, I sized them to fit these extrusions — just in case. But the extrusions were not perfect for the job. For one, it was hard to use the bottom slot without causing a short to the MoBo. Second, it really needed one more slot. So I designed a new extrusion from scratch, with a recess below the bottom slot, and an extra slot. Here's a photo that compares the old with the new:

    attachment.php?attachmentid=61321

    So Parallax had a bunch of these extrusions made to my design, and they've sat in their warehouse ever since, waiting for me to do the endcaps. The extrusions, BTW, are brushed and anodized and really look nice.

    For industrial apps that require environmental protection, a better option might be an IP67-rated polycarbonate box with a plastic cover, like the one shown for the anemometer project I posted a couple weeks back. I used a backplate cut and drilled to fit the box and a motherboard. (The board shown is not a MoBoStamp-pe, but a Propeller half motherboard, which also fits the extrusion, BTW.)

    -Phil
    600 x 318 - 26K
  • TubularTubular Posts: 4,620
    edited 2009-06-03 20:20
    Ken, Phil,

    That extrusion is *exactly* what I was about to get custom manufactured for an industrial project (after exhausting readily available extrusion options here). My target slot width was 35mm to allow DB9 connectors, and it looks like it will do that beautifully.

    I see real possibilities for extrusions like this as an industrial quality, mechatronic, "rapid solution" system. So much so I drafted a spec for discussion and am currently working on a flexible dev system for a company known to you both. You're already half way to a really neat solution. But rather than hijack this thread any further let me tidy it up over the next day or two and PM it through with a couple of photos of where its at.

    Back to Ken's question, I think there would be interest in it as-is, and you should get it into the store asap, pref sold by a unit length (one unit could be the length of the Mobo)

    I can't believe what you guys have tucked away there... sheesh

    tubular
  • Ken GraceyKen Gracey Posts: 7,386
    edited 2009-06-03 20:28
    @John R.

    I can cut whatever length you want of this material - just let me know what you want and I'll get it together for you. 3" or 3' or anything else; your choice.

    Ken Gracey
    Parallax, Inc.
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2009-06-03 21:24
    I can wait until I come over for UPEW, but I would also be interested in a chunk of this
    extrusion material. Question I don't see in the replies: What size board fits the slots?
    Did I understand half sized protoboard?

    I don't mind cutting a board down to fit. I'd love to see the end-caps.

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Visit the: The Propeller Pages @ Warranty Void.
  • TubularTubular Posts: 4,620
    edited 2009-06-03 21:40
    Is it possible to get an engineering drawing of this profile, or even better a DXF cad file?

    tubular
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-06-03 22:36
    OBC,

    The slots are sized for a board 1.35" (34.3mm) wide (i.e. MoBos and daughterboards) and spaced on 1/8" centers.

    Tubular,

    That would be up to Parallax.

    -Phil
  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2009-06-04 00:55
    Phil

    ······································· smile.gif

    I like this POST and will keep reading this one and keep up the good work

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ··Thanks for any·idea.gif·that you may have and all of your time finding them smile.gif

    ·
    ·
    ·
    ·
    Sam
  • HumanoidoHumanoido Posts: 5,770
    edited 2009-06-04 02:24
    Phil said...
    Here's a copy of the file that's automatically loaded into the MoBoStamp-pe by the PC host program that produced the scan shown above:
    Where is the code that moves the servo, and how does it keep in step with the image acquisition software? Also, where are your code comments?

    humanoido
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-06-04 02:58
    Here's the program that moves the servo. I just pressed the reset button when the scan was near the left edge of the window.

    ' {$STAMP BS2}
    ' {$PBASIC 2.5}
    
    FOR W0 = 1100 TO 300
      FOR W1 = 1 TO 7
        PULSOUT 15, W0
        PAUSE 20
      NEXT
    NEXT
    
    
    


    It's not synchronized to the camera program. It's strictly a matter of timing, and I adjusted the inner loop timing to produce the image with the best aspect ratio. 'Quick and dirty for an instant demo. smile.gif

    It would not have been difficult for it to trigger the host slave program, though, since that feature is built in. It uses one of the data lines that's common to socket A and socket B on the MoBo for the trigger.

    There are no comments in the slave program for the host, since it was never meant for human eyes. It exists only in the Perl source code for the PC monitor program and is uploaded automatically when the monitor program starts. I posted it here only because you asked.

    The docs for the TSL1401-DB explain all the ins and outs of interfacing with the AVR driver program and include many example code snippets. It's easily the best place to start.

    -Phil
  • ElectricAyeElectricAye Posts: 4,561
    edited 2009-06-04 04:08
    So I'm looking at this extrusion stuff and how your camera fits into it so nicely and I'm thinking.... If I've got 3 feet of that extrusion and that camera can slide along in that groove without too much wiggling.... could that be a way of scanning something kinda long? I mean.... would the camera's scan line be perpendicular to the length of the extrusion???

    Just wondering out loud here.

    smile.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Watching the world pass me by, one photon at a time.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-06-04 04:27
    The camera's scan line is, in fact, perpendicular to the length of the extrusion. I have to warn you, though, that the extrusions are bowed inward a little*, so the top boards are a tight fit. That's not an issue for a static enclosure but might be if the boards have to slide along effortlessly. It may be possible to spread the sides, however, by driving an oversize form through the top slot.

    In a typical industrial environment, it's the product that's moving on a conveyor, sometimes with an encoder signal present, so the camera doesn't have to move.

    -Phil

    *This is a natural consequence of extruding a U-shaped form. The only way to avoid it would have been to include a supporting web across the top and then machine it out. But that would have added enormously to the overall cost.
  • TubularTubular Posts: 4,620
    edited 2009-06-04 06:13
    Phil,

    A minor request for the next revision - could we have some kind of indication on the PCB as to the scan line orientation? One less thing to think about.

    I worked it out from the experiment photo of the money

    thanks
    tubular
Sign In or Register to comment.