Mouse sensor

Posted on
  • https://www.espruino.com/ADNS5050

    Has anyone got any experience with the mouse sensor above. The lens is hard to source. How well does the hemispherical clear stick-on foot work? I’m looking to get accurate x and y coordinates.

  • I've had a play around with it. The stick on foot is ok for detecting black lines on white/etc, but it's really not that great at other stuff. So you are actually trying to use it as a mouse?

    If so - and this is obviously a bit frustrating - you could just use the lens from an old optical mouse? AFAIK they also have a neat little bit in the side which lets an LED side-illuminate what it's looking at so bumps show up more.

    Another option is if you can get a mouse that you can make output PS/2 rather than USB (some do it, or you might find an old mouse) they're pretty easy to connect to Espruino 2v0+ as you can use setWatch(...,clkPin,{data:dataPin})

  • Thanks. Have you tried the pinhole camera approach? I am keen to use it to find the x,y coordinates.

    The lenses seem quite hard to source. Does a generic one work well?

    I am a but confused how that is an alternative option. Does this negate the need for a lens? Do you have any example model numbers I can look into?

    Thanks again

  • Are you trying to get XY coordinates using it as a mouse, or using it to look at something further away?

    Have you tried the pinhole camera approach?

    I have, yes - you get enough to see a wide black line (think masking tape), but it's not great. The issue is the sensor itself is tiny, so the smallest pinhole you could make is already a significant proportion of the sensor size, making stuff quite blurry.

    I haven't tried other lenses...

    Does this negate the need for a lens?

    If you're buying a mouse then it'll be complete with the lens and sensor and everything it needs to focus on the area the mouse is pointing at.

    Do you have any example model numbers I can look into?

    Just go to eBay and look up ps2 mouse - as long as you get one with the round PS2 connector on (and not USB) you should be safe.

    PS2 is basically just GND, 5V, data + clock - so it's easy enough to decode.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Mouse sensor

Posted by Avatar for user104121 @user104121

Actions