Shop OBEX P1 Docs P2 Docs Learn Events
Tsl1401-db — Parallax Forums

Tsl1401-db

SailerManSailerMan Posts: 337
edited 2013-07-19 09:21 in Accessories
May I ask where the lense for the TSL1401-DB comes from? It's similar to a CMUCam that I have... I'm looking for a source to so I can give my CMUCam a fixed lense.

Thanks for any help

Eric

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-01-21 00:34
    Eric,

    It came from Korea. Here are some U.S. lens distributors who should be able to accommodate your needs:

    ····www.ukaoptics.com
    ····www.mars-cam.com/optical.html
    ····www.sunex.com/

    For a color camera, you need to specify a lens with an IR-cut filter.

    -Phil

    Post Edited (Phil Pilgrim (PhiPi)) : 1/21/2010 8:52:52 PM GMT
  • SailerManSailerMan Posts: 337
    edited 2010-01-21 18:00
    Phil,

    Thanks... I started looking at these sites... the first one did not work.. The others have so much that I'm not sure what I'm looking at... When you were working on your project... how did you decide on a lense.

    Eric
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-01-21 21:01
    Sorry, I mistyped the link. It's fixed now.

    The TSL1401's 128 pixels cover an area 8mm wide. I needed a lens that had an 8mm focal length, since I wanted a field of view to equal the subject distance. To cover the entire sensor width without vignetting, it had to be suitable for at least a 1/3" format. I chose a "standard lens" (as opposed to wide-angle or telephoto) to minimize distortion, since it would be used in measurement applications. Finally, it had to have a standard 12mm threaded barrel, so I could select from a broad range of lens holders. The lens I picked happens to have an IR-cut filter, although it's not necessary for B/W imaging.

    -Phil
  • SailerManSailerMan Posts: 337
    edited 2010-01-26 18:12
    Phil,

    Thanks for the info... I have been recently working with theTSL3301-LF... I found an application note on their website for connecting to a microcontroller... I'm slowly getting there... then I finally realised that you wrote this in 2001.. Wow you do get around. Can I ask you if you got this sensor to work with a basic stamp or a propeller? I'd love to look at your code to see if I'm on the right track. I'm working in SPIN right now.

    My code mimics your application note.

    If I upload what I have would you be willing to take a peek at it?

    What is a good amount of time for integration?

    Thanks in advance for any help,
    Eric
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-01-26 18:36
    Eric,

    The Prop (in assembly) would be a much better match for the '3301 than the BASIC Stamp, due to the speed required to clock the commands in and the pixels out. (Actually, this is one case where the SX is an even better match than the Prop, due to its raw single-processor speed.) I haven't written any code for the '3301 for either Stamp or Prop, though. I picked the '1401 for the linescan camera daughterboard because it's so much easier to use, despite it's having an analog output; and it's potentially faster with one clock per pixel, compared with ten for the '3301. Plus, it has more pixels.

    If you post your '3301 code, I'd be happy to take a look at it; but I haven't used the '3301 since my app note was written nearly nine years ago, so I might have to relearn it myself!

    As to integration time, that's entirely dependent on the application and the amount of light available. In an ambient office environment with fluorescent lighting, multiples of 1/120th second are recommended to minimize the effects of flicker.

    -Phil
  • SailerManSailerMan Posts: 337
    edited 2010-01-26 18:47
    I received some samples for TAOS... I will post my code when I get home tonight. Thanks for offering to look... Basically I'm just outputting the Pixel Values to the terminal program but they are all 255... I know I have a glitch somewhere. [noparse]:)[/noparse]

    My basic goal is to read the Pixel Values and create a bar graphic using the graphics object in spin as a visual feedback of the sensor.. I have not thought this all of the way through.. First priority Read the Pixels. [noparse]:)[/noparse]

    Regards,
    Eric
  • SailerManSailerMan Posts: 337
    edited 2010-01-26 22:04
    Ok phil,

    Here is my messy Code.

    What am I doing wrong. Thank again.

    CON
    
      _clkmode      = xtal1 + pll16x
      _xinfreq      = 5_000_000
    
      SClk          = 0
      SDin          = 1
      SDOut         = 2
      
    OBJ
    
      Debug   :  "Parallax Serial Terminal"
       
    
    PUB  Start|Temp
    
      Debug.start(19_200)
      OUTA[noparse][[/noparse]SClk]~
      DIRA[noparse][[/noparse]Sclk]~~
      DIRA[noparse][[/noparse]SDin]~~
      DIRA[noparse][[/noparse]SDOut]~
    
      Reset
      SetUp
    
      repeat
        Integration   
        'WaitCnt(Cnt+800_000)
        Debug.Str(String("Integration Done",13))
        Pixel_ReadOut
        Debug.Str(String("Pixel Readout Done",13))
    
    Pub Integration
      Send($08)
      Pulse(22)
      WaitCnt(Cnt+80_000)
      Send($10)
      Pulse(5)
      
    Pri Pulse (Times)
    
      Repeat Times
        OUTA[noparse][[/noparse]SCLK]~~
        WaitCnt(Cnt+((clkFreq/1_000_000)*50))
        OUTA[noparse][[/noparse]SCLK]~
        WaitCnt(Cnt+((clkFreq/1_000_000)*50))
    
    Pri Send (Data)|Count
        
        OUTA[noparse][[/noparse]SDin]~
        Pulse(1)
        Repeat 8
          OUTA[noparse][[/noparse]SDIn]:=Data & %1
          Pulse(1)
          Data >>= 1
        
        OUTA[noparse][[/noparse]SDIn]~~
        Pulse(1)
        OUTA[noparse][[/noparse]SCLK]~
        
    Pub Pixel_ReadOut|PixelValue,PX
        Send($02)
        Repeat
           IF INA[noparse][[/noparse]SDOut]==0
              Quit
            
           Pulse(1)
         
        Repeat PX From 1 to 102
          PixelValue:= Receive
          Debug.Str(String("Pixel "))
          Debug.Dec(PX)
          Debug.Str(String("="))
          Debug.Bin(PixelValue,8)
          Debug.newline
              
    Pri Receive|Bit,Index,Value
      Pulse(1)
      Value:=0
      Repeat Index From 7 to 0
        Bit:=INA[noparse][[/noparse]SDOut]
        Bit<<=Index
        Value |= Bit
        Pulse(1)
      
      Pulse(1)
      
      Return Value  
        
    Pri Reset
        OutA[noparse][[/noparse]SClk]~
        OUTA[noparse][[/noparse]SDin]~
        Pulse(30)
        OUTA[noparse][[/noparse]SDin]~~
        Pulse(10)
        Send($1B)
        Pulse(5)
        Send($5F)
        Send($00)
          
    Pri SetUp
      Send($40)
      Send($81)
      Send($41)
      Send($05)
      Send($42)
      Send($81)
      Send($43)
      Send($05)
      Send($44)
      Send($81)
      Send($45)
      Send($05)
    
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-01-26 23:11
    Eric,

    I think you'd be better off doing this in assembly. One possible result of reading the pixels out too slowly is that they may discharge (droop) before you get to them all. At the very least, you should read them into an array as fast as possible, then output them to the debug terminal.

    -Phil
  • SailerManSailerMan Posts: 337
    edited 2010-01-27 00:33
    Does my code look sound? am I on the right track?

    Thanks,
    Eric
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-01-27 01:26
    Eric,

    There's a lot there. It's going to take me some time to sift through it...

    -Phil
  • sjevsjev Posts: 10
    edited 2011-05-11 02:39
    Phil,

    I also have a question about the M12 optics. I'm designing a machine vision application, something similar to low-cost usb microscopes something like this one: ada2_usb_digital-_microscope.jpg . It seems that these are becoming a commodity, but I have no idea about the price of the used optics.
    Could you tell me what I can expect to pay for a M12 lens assembly coming from one of the suppliers you mentioned above? (will probably be ordering low quantities of a couple of 1000 pcs).

    Thanks,
    -Jev
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-05-11 08:24
    Jev,

    If you're ordering in the 1000s, I would recommend buying directly from China. The U.S.-based distributors are handy for small quantities, but their markups are extreme. My preferred manufacturer is Alaud Optical, but you can find others on sites like alibaba.com. (Caveat: Alibaba has recently been rocked by scandal, due to their listing of untrustworthy companies. Buyer beware!) For simple lenses with either plastic optics or a small number of glass elements, including an IR-block filter, expect to pay between $1.50 and $3.00, plus a dime for the lens holder. More complex lens assemblies will run a little more. Also, depending on the Harmonized Code the supplier ships under, there could be a few percent of import duty, but it's not much, and you might get U.S. Customs to rescind the duty by pointing out a different and more appropriate Harmonized Code. (I will be facing this in the coming week, so I will post about it if my appeal is successful.)

    -Phil
  • sjevsjev Posts: 10
    edited 2011-05-12 01:23
    Thank you Phil, this is very helpful.

    -Jev
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-05-12 13:28
    I got the bill from FedEx today for the duty on my lenses (2.3%), which amounted to $36.80 (plus a $6.00 "advancement fee"). It's not much, but I thought I'd try to appeal it anyway. A very nice lady at FedEx informed me that the amount in dispute has to be at least $50 to appeal. Oh, well.

    -Phil
  • mclparkermclparker Posts: 15
    edited 2013-07-19 09:21
    Hi again Phil,

    As regards the TSL1401 daughter board, I have a question on the optics (the Viewtech folks are unresponsive)....

    The drawing for the V79055IG1 shows the "image plan[sic]" as 7.5 mm dia and located at 3.78 mm from the end of the lens body. Also, the entrance pupil diameter is not explicitly detailed (I don't think). Although the drawing does give the focal point as 7.9 mm, it does not detail its physical location on the drawing.

    Literature searches are conflicting and ambiguous.

    So here are my questions:

    1. If you know the entrance pupil diameter can you give it to me?

    2. Where is the focal point of the incident light beam - is it at the drawing stated "image plan" = 3.78 mm from the end of the lens body?

    3. If the 7.9 mm focal point is not at the "image plan", do you know where it lands with respect to the drawing?

    4. In one of your notes (Document Number: MPC5604B), you state "the image plane is of 1/3". Those same notes have a figure 8 showing the image plane as different from the focal plane. Did you intend that the lens focal plane land at the surface of the 1401 chip?

    The reason for my questions is that I am trying to determine Airy disk diameter for different wavelengths and where those diameters land with respect to each pixel. I know, its ambitious and possibly impractical, but I want to give it a try anyway.

    Thanks,

    Mike
Sign In or Register to comment.