Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: IR sensors for local presence / distance sensing ...

  1. #1
    Automated Home Legend chris_j_hunter's Avatar
    Join Date
    Dec 2007
    Location
    North Lancashire
    Posts
    1,713

    Default IR sensors for local presence / distance sensing ...

    'thought these IR distance / presence sensors might work well with a QAI, in situations where very-localised presence-sensing is wanted :

    http://www.oomlout.co.uk/infra-red-d...283364ff2260f9

    Infra Red Distance Sensor ... will return an analog voltage proportional to the distance between the sensor and an object in front of it ... signal ranges from 0.4 volts at 80cm to 3 volts at 10cm ... simple three wire interface (power & analog output) ... includes: distance sensor (SHARP GP2Y0A21YK) ...

    current consumption is around 30mA ...


    Various versions (various ranges, etc) of the sensor are also available - eg: from RS :

    GP2Y0D21YK - 10-80cm type

    http://www.sharpsma.com/Page.aspx/am...rt/GP2Y0D21YK/

    http://uk.rs-online.com/web/search/s...D21YK&x=32&y=8

    GP2Y0D21YK0F - 24cm type

    http://www.sharpsma.com/Page.aspx/am.../GP2Y0D21YK0F/

    http://uk.rs-online.com/web/search/s...21YK0F&x=0&y=0

    GP2D150AJ00F - 3-30cm type

    http://docs-europe.origin.electrocom...6b80a711a6.pdf

    http://uk.rs-online.com/web/search/s...0AJ00F&x=0&y=0


    Other, more basic PCB-mounting versions, current consumption around 7mA, also available :

    GP2Y0D810Z0F - 100mm type

    http://document.sharpsma.com/files/gp2y0d810z_e.pdf

    http://uk.rs-online.com/web/search/s...810Z0F&x=0&y=0

    GP2Y0D805Z0F - 50mm type

    http://document.sharpsma.com/files/gp2y0d805z_e.pdf

    http://uk.rs-online.com/web/search/s...805Z0F&x=0&y=0

    plus, PCB to go with them, here :

    http://www.pololu.com/catalog/product/1133


    There are other versions, too - all are listed here (p.10) :

    http://www.sharpsma.com/opto_docs/Op...rd_Sensors.pdf



    NB: Key aspects of the QAI :

    four-way analogue input ... multiplexed, non-isolated ... 0V to +5V ... eight-bits monotonic ... update rate ~30Hz ...

    channels can be interrogated at any time ...

    one of the four channels can be selected for Reflex functions ... signal level equals or exceeds ... equals or falls below ... exceeds user defined Delta limit (auto-datuming) ...

    module-wide Reflex functions: time interval trigger ... 1-127 seconds / 1– 127 minutes ... module initialise trigger ...

    user-defined trigger enabling pattern ...

    each event trigger can generate a pre-defined response and/or several user-programmable responses ...

    status indicator LED ...

    12-15VDC ... 20mA (max) ...

    0V, 5V (current limited) references provided for analogue inputs ...

    ISTM the Reflex functionality might be v.useful (if it can be used like this) as a device for alerting Cortex without tying-up Cortex ... not sure how the so-called user-defined trigger enabling pattern works - ie: is the pattern defined, for individual inputs, in terms of voltage vs time (if so, might be v.useful for identifying & distinguishing between a variety of user inputs - moving hand towards meaning one thing, away another, for example, or wave-across once, twice, three-times, etc) ... ???
    Last edited by chris_j_hunter; 19th June 2010 at 11:17 AM. Reason: clarity of questions at end

  2. #2
    Automated Home Legend Karam's Avatar
    Join Date
    Mar 2005
    Posts
    863

    Default

    Yes we have used one or two of these sensors in the past but only in digital mode. I recall it was possible to alter a component to extend the sense range e.g for use as a room entry sensor.

    Regarding the QAI, the user definable trigger pattern is perhaps a bit misleading - a set of different triggers exist eg. on going above, going below, on change by user defined amount, on timer etc. and it is the pattern within this set that can be arbitrarily user selected. So it is not a trigger based on some user defined temporal behaviour, though that is an interesting idea...

  3. #3
    Automated Home Legend chris_j_hunter's Avatar
    Join Date
    Dec 2007
    Location
    North Lancashire
    Posts
    1,713

    Default

    an example application of one of these sensors, for water-level measurement :

    http://chattyhome.com/blog/ChattyHom...el_sensor.html

    http://howmuchsnow.com/waterlevel/

  4. #4
    Automated Home Legend Paul_B's Avatar
    Join Date
    Jul 2006
    Location
    Eastbourne, UK
    Posts
    608

    Default

    Hi all,

    Hoping that Karam may pop by and respond to my query. What does the circuit look like to achieve digital output using a Sharp 2Y0A21 F, based on the quote:

    Quote Originally Posted by Karam View Post
    Yes we have used one or two of these sensors in the past but only in digital mode....
    I've bought a couple of these sensors from Coolcomponents to act as beam break proximity sensors for my stairs.

    Cheers

    Paul

  5. #5
    Automated Home Legend chris_j_hunter's Avatar
    Join Date
    Dec 2007
    Location
    North Lancashire
    Posts
    1,713

    Default

    maybe :

    https://minibots.wordpress.com/2013/...-sharp-2y0a21/

    ie:

    https://minibots.files.wordpress.com...1/sharp_bb.png

    ??

    Chris

    PS: ah, sorry, not digital (!) ... but keen to hear how you get on ...

    PPS: OTOH, wonder if just connecting the analogue outputs to a digital input would work OK - given the electrical characteristic shown by the output graph (short way down in the first link, above) ... ?

    PPPS: there's a digital output version ... (!) :

    https://www.sparkfun.com/datasheets/...GP2Y0A21YK.pdf
    Last edited by chris_j_hunter; 20th June 2015 at 11:15 PM.

  6. #6
    Automated Home Legend Karam's Avatar
    Join Date
    Mar 2005
    Posts
    863

    Default

    It was Vivian who experimented with these but I think it was just to adjust the range of a digital output variant (might have been the GP2D15). Looking through Farnell web site I find for example: GP2Y0D02YK0F has an 80cm detection range with digital output. The analogue one may produce an output high enough to trigger a digital input at close range but at longer range looks like the output is close to 0.5V which wouldn't be sufficient. A QAI could be used and set to trigger above 0.4V say but I don't know if there will be any dynamics related issues i.e duration of signal at that level during walk by. Another thing to consider is that these sensors appear to require a 5V supply.

  7. #7
    Automated Home Legend Paul_B's Avatar
    Join Date
    Jul 2006
    Location
    Eastbourne, UK
    Posts
    608

    Default

    Chris, Karam,

    Thanks both for responding. I hooked up the 2Y0A21 to a 5V power adaptor which in turn is hooked up to the 12V supply of Idranet (e.g. this http://www.amazon.co.uk/dp/B008VORAD...986871_TE_item) I've tested the setup with a voltmeter and can observe a voltage of ~1V at 25cm and the device appears pretty good at picking as I walk by. But connecting the Vout to a digital input of a QRH-001 and associating it with a proximity sensor object in Cortex doesn't work. Any suggestions?

    Paul

  8. #8
    Automated Home Legend Karam's Avatar
    Join Date
    Mar 2005
    Posts
    863

    Default

    Apologies, don't know what I was thinking .. You'll need an NPN transistor (and base resistor) between the IR unit and the digital input. So output signal goes via base resistor (say 1k-4k7) to base of the transistor. Collector goes to the digital input channel and emitter goes to 0V on IR unit and digital input 0V.

  9. #9
    Automated Home Legend Paul_B's Avatar
    Join Date
    Jul 2006
    Location
    Eastbourne, UK
    Posts
    608

    Default

    Karam,

    Thanks once again. I'm a complete novice when it comes to electronics so appreciate your detailed description. I have a BC5478 transistor in an Arduino starter kit I bought recently, can I use this? From your description I need to wire it according to the following schematic

    Paul

    IR_Circuit.jpg

  10. #10
    Automated Home Legend Paul_B's Avatar
    Join Date
    Jul 2006
    Location
    Eastbourne, UK
    Posts
    608

    Default

    Well a bit of DIY electronics with a breadboard had a successful outcome based on the components listed above. I am getting detection up to about 45cm from the sensor (it is a 10 - 80 cm variant) registered by the proximity object in Cortex. I am going to start a new thread on what I am trying to achieve.

    Paul

Posting Permissions

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