Connect with us

Sharp IR Proximity sensor help

Discussion in 'Sensors and Actuators' started by dwreck, Oct 24, 2012.

Scroll to continue with content
  1. dwreck

    dwreck

    27
    0
    Aug 19, 2012
    Hi all,

    I have the Sharp GP2Y0A21YK IR proximity sensor.

    I'm using it in a simple application, i.e to detect on object, with the arduino uno. I have power with the +5V line and then GND. The sensor takes a reading every 50ms. I've been monitoring the readings and of course there's a lot of variation. Example, the readings are varying from 0 to 100, but at one instant it'll just jump to around 160 without anything in the sensor's way. The sensor is not moving in any direction.

    I've tried connecting a 10 micro-farad capacitor between +V and GND but no significant changes.

    Summary: If I leave the system for let's say, 2 minutes alone and it taking readings, at some point it will get a reading as if there was an object in proximity..

    Any help or advice please? Thanks in advance.
     
  2. Harald Kapp

    Harald Kapp Moderator Moderator

    10,088
    2,155
    Nov 17, 2011
    As I see it, this sensor operates by detecting reflected light. It will possibly be sensible to incident light from other sources, too.
    Try to shiled it from other light sources (especially infrared).
    Does this help?

    Harald
     
  3. CocaCola

    CocaCola

    3,635
    5
    Apr 7, 2012
    This is normal, they simply detect sudden changes in temp, a sudden cool breeze or a hot breeze will trigger them, as will say a cool mist or what not passing by... This is why you have to adjust the threshold that they trip to filter out as many false triggers as you can... Or as Harald suggested narrow/limit it's field of view to help reduce false triggers... They are a good general purpose sensor but they are far from accurate int he end...
     
  4. dwreck

    dwreck

    27
    0
    Aug 19, 2012
    Thanks. I will try shielding it to see if it makes any changes.
     
  5. dwreck

    dwreck

    27
    0
    Aug 19, 2012
    My current threshold value is now 150. The sensor has that value at around 30cm from it. And this is the range that I want (around 30 to 35cm). If I increase the threshold, I think I will get a lower range.
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-