Shop OBEX P1 Docs P2 Docs Learn Events
analog input — Parallax Forums

analog input

lenny1337lenny1337 Posts: 26
edited 2008-02-12 21:03 in BASIC Stamp
What is the easiest way to interface analog signal w/ bs2?

is it the RCTIME method?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Lenny Bogdanov
Systems Concept Center

Comments

  • dandreaedandreae Posts: 1,375
    edited 2007-07-31 17:34
    You can use an LTC1298 A to D chip with the BASIC Stamp.· Here is a link for more information:· http://www.parallax.com/detail.asp?product_id=604-00001

    Dave

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Dave Andreae

    Parallax Tech Support·
  • Tracy AllenTracy Allen Posts: 6,666
    edited 2007-07-31 18:04
    What is the analog signal?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2007-07-31 18:36
    The MoBoStanp-pe (BS2pe-based) has four analog input channels built-in via its two AVR coprocessors. The factory-programmed (but user alterable) AVR firmware gives access to these via PBASIC's OWOUT/OWIN statements.

    -Phil
  • lenny1337lenny1337 Posts: 26
    edited 2007-07-31 22:16
    analog signal is a 0-5v from a tsl1402R sensor

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Lenny Bogdanov
    Systems Concept Center
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2007-08-01 03:00
    Lenny,

    I'm currently documenting a TSL1401 daughterboard that I've designed for the MoBoStamp-pe. Do you really need 256 pixels? Or would 128 be enough? If the latter, you could save an enormous amount of effort by waiting a bit. Attached is a photo of the MB/DB combination. Also attached is a screenshot from the PC-hosted real-time monitor program.

    Can you tell me more about your app?

    -Phil
    800 x 616 - 92K
    528 x 603 - 70K
  • lenny1337lenny1337 Posts: 26
    edited 2007-08-01 04:47
    phil, 128 would indeed be enough. Unfortunately i can not discuss the application specifically - but i'm attempting to measure variable levels of the absensce of reflected white light.

    (essentially approximate edge detection on a black wedge).

    Im also thinkign about just going to somethign like the tsl3301 (or whatever model) the only taos opto linear array with a built in ADC.
    I may also just purchase some external ADC...

    Time is a real priority for me

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Lenny Bogdanov
    Systems Concept Center

    Post Edited (lenny1337) : 8/1/2007 5:00:29 AM GMT
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2007-08-01 05:04
    Lenny,

    What is your timeframe exactly? Given that the BASIC Stamp won't be able to contain all 128 8-bit pixel values, are you able to do your analysis on the fly, or are you planning to have a connected PC do that for you after receiving the pixel values?

    -Phil
  • lenny1337lenny1337 Posts: 26
    edited 2007-08-01 15:47
    deadline for me is august 18th. As for storing the pixel values - because i'm gathering basically statistical data this can be done on the fly. (how much white light reflected here, how much here, how much here - etc.)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Lenny Bogdanov
    Systems Concept Center
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2007-08-01 18:18
    Your deadline is still doable with the TSL1401-DB. I'm finishing up the section in the docs that pertains to the AVR commands, and this is my number one priority right now. If you were to obtain a MoBoStamp-pe from Parallax, I could send you one of the TSL1401 boards to beta test and use in your project. This board comes with a 7.9mm lens, which gives a field of view that's nearly equal to the subject distance. I don't know if this lens will work for you or not. Any lens like this will exhibit a "cosine effect" which renders central pixels somewhat brighter than those near the edge. If you're interested in absolute brightness values, you may need to take this into account.

    Altenatively, if you need something right now, TAOS's TSL3301EVM may do the trick for you. It's not programmable and has only 102 pixels, but you can send it commands and read pixel values from it using the documented protocol from your own PC host program. The TSL3301EVM uses the same lens as the TSL1401-DB, but it also comes with a SELFOC lens for 1:1 contact imaging.

    -Phil
  • lenny1337lenny1337 Posts: 26
    edited 2007-08-01 23:26
    Hey Phil

    Thank you very much for the offer - currently, i've managed to get this thing working with a TLC0831 ADC and i'm now getting the appropriate values that i'm looking for. If this changes and I find myself in need of a better interface (and UC) I'll let you know and we can work something out.

    BTW do you find that "white" LEDs are the most effective for lighting? also how important is having a lens?

    Thanks for your time.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Lenny Bogdanov
    Systems Concept Center
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2007-08-02 00:43
    Lenny,

    I'm glad you got something going so quickly!

    The TSL1401/1402 has a peak response in the red region of the spectrum, so I would use ultrabright red LEDs with it.

    A lens is critical if you're doing imaging and not just trying to detect ambient light levels. However, it is possible to project a shadow directly onto the chip without a lens. This might be the case if you're trying to do precision edge location over an area smaller than the 8mm or 16mm sensor length. The edge won't be in focus, unless the backlight source is a pinhole or well-collimated beam, but this can work to your advantage. By analyzing the Gaussian intensity distribution across the shadow, you can obtain a position that's precise to a fraction of one pixel width.

    Since you're dealing with reflected light — presumably from a diffuse surface — I can't see how you'd be able to do anything useful without a good lens.

    Also, if you're reading the A/D converter with a BASIC Stamp, be sure to read out all the pixels as fast as you can. Otherwise, you'll be confronted with "pixel droop", which occurs when the capacitors that hold each pixel's charge start to self-drain. This will be particularly noticable in the last pixels read out, since they've had to sit the longest. The TSL1401/1402 datasheet specifies a minimum readout clockspeed of 5KHz, but you can probably get by with 1KHz or even slightly less.

    -Phil

    Post Edited (Phil Pilgrim (PhiPi)) : 8/2/2007 12:52:34 AM GMT
  • luxorluxor Posts: 1
    edited 2008-02-12 21:03
    Hello,
    My name is James T. Norman and I am interested in your tsl1401 mobo-pe daughter board, how can I acquire some? do you have the spec's available yet? and how much are they? appreciate your time, look forward to your response.

    thank you,

    BIOTRAQ Inc.
    903-871-3127
    James T. Norman /ceo-cto
    jamesnorman@luxorsensoptics.com

    I'm currently documenting a TSL1401 daughterboard that I've designed for the MoBoStamp-pe. Do you really need 256 pixels? Or would 128 be enough? If the latter, you could save an enormous amount of effort by waiting a bit. Attached is a photo of the MB/DB combination. Also attached is a screenshot from the PC-hosted real-time monitor program.
Sign In or Register to comment.