Invisible "Air" control device?


Closed Thread
Results 1 to 8 of 8

Hybrid View

  1. #1
    Join Date
    May 2008
    Location
    Italy
    Posts
    825


    Did you find this post helpful? Yes | No

    Default

    Have a look @ this link:
    http://www.sparkfun.com/commerce/pro...roducts_id=242

    Cheers

    Al.
    All progress began with an idea

  2. #2
    Join Date
    Mar 2009
    Posts
    653


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by aratti View Post
    Have a look @ this link:
    http://www.sparkfun.com/commerce/pro...roducts_id=242

    Cheers

    Al.

    Many thanks Al - very interesting (though might be a bit obtrusive for where I'd like to put this - on a guitar)

  3. #3
    Join Date
    May 2010
    Location
    Chile
    Posts
    25


    Did you find this post helpful? Yes | No

    Default

    Already done it...

    The best way to do it and get some range is with an infrared led and a REGULAR phototransistor (No dark/vis coating), and it's really cheap. (Sorry I'm not a fan of $10usd sensors + 30$ shipping)

    On the detector part:
    Drive the phototransistor between ground and with a 4K7 resistor to 5V and "tap" in the middle to get your ADC readings

    On the emmiter part:
    Pulse modulate the led to 1%-10% duty and calculate your current resistor to about 100ma (can be even more current, but stop torturing the poor thing), Don't forget a transistor driver for it.

    On Software:
    At the beginning of your code:
    -Turn off the IR led, wait 500us, get an ADC capture
    -Turn on the IR led and wait about 500us
    -Get a second ADC capture, then turn off the IR led
    -Store the differential as a "Initial calibration"
    At the main loop:
    -Turn off the IR led, wait 500us, get an ADC capture
    -Turn on the IR led and wait about 500us
    -Get a second ADC capture and then turn off the IR led
    -Store the differential as a "Captured value"
    -Get the differential between "initial calibration" and "captured value"

    *Congratulations you got a value proportional to the distance of the reflected IR light

    It needs some other filtering and maybe a linearization (because reflected light to the sensor is not lineal), but works really well in interior ambient light conditions (not daylight, too much IR) with a range of about 30-40cm even more if you don't need an extreme resolution.
    Last edited by El_AMPo; - 7th October 2010 at 21:05.
    "If at first doesn't work, kicking it wont help either"

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts