-
• #2
Hi @Gordon
I don't know your application, but why not go with a gesture sensor, ie https://www.sparkfun.com/products/12787. The APDS-9960 is funny piece of chip. -
• #3
... or, if you are behind low cost 'imaging', have a look at http://copter.ardupilot.com/wiki/common-optional-hardware/common-optical-flow-sensors-landingpage/common-mouse-based-optical-flow-sensor-adns3080/ .
-
• #4
Hmm, APDS-9960 looks fun - but it only has 4 sensors so while it does up/down/left/right, an actual image is a bit beyond it!
The last link uses another mouse sensor, the ADNS3080. It seems difficult to buy just the chip one-off, but there are at least some modules on eBay for sensble prices.
That's probably the best bet at the moment - and it comes with a lens that'll focus further than a few inches (I guess)
-
• #5
I just opened up a £2.50 wireless optical mouse and it's got a
KA8 E4230DB
sensor in it. Seems to have roughly the same pinout as other sensors:_______ LED --| |-- SCK GND --| |-- SDA VCC --| |-- not connected Van --|_______|-- not connected Van = analog volts - just a capacitor to GND
But looking at the data on SCK/SDIO I get:
// If no movement : 0x00, 0x30, 0x02,0x0Z // If movement 0x00, 0x30, 0x02,0x8Z, ....bytes with DX/DY data in...
Where Z is 4,5 or 6 depending on the mouse DPI (this must have been set somewhere).
It's around 360kHz bitrate, and sck left high on idle. However if I disconnect the little wireless module I'm really struggling to be able to drive it myself.
It'd be great if I could find a datasheet, but I can't see anything that's even remotely like it :( Shame, it'd be excellent for little robot projects. Even better if I could figure out what to send to read the framebuffer from it.
-
• #6
Some progress now! I got a second optical mouse and it's a different PCB, but basically the same inside, with the same sensor (see pic) - albeit marked
KA8 DB280DA
this time.I was just about to post a question on stackexchange about the mythical KA8 sensor and I stumbled across the PAW3204 datasheet
The protocol looks the same (but the chip has a different pattern of markings on it), so it seems like the KA8 is probably a clone of the PAW3204:
0x00 // Query: product ID 0x30 // Response: Product ID, 0x30 default 0x02 // Query: Motion_Status 0x?? // Response bitfield: Bit 7 = motion, Bits 2-0 = resolution
So that's all great - apart from the bit where this particular sensor doesn't seem to do the sensor readout thing (which pretty much all the others do!). Looks like it'd be trivial to use as an optical flow sensor, but unless there are hidden registers in there for debugging (which seems likely) it's not capable of doing the sensor readout :(
1 Attachment
-
• #7
There's now a page with a module and information on the ADNS5050 Optical mouse sensor
It seems pretty easy to wire up and get an image out of.
-
• #8
hi @Gordon
I know this post is 3 years old but I would like to make a small wireless mouse. Judging from your experience can the APDS-9960 be used as a mouse sensor?
https://www.sparkfun.com/products/12787Thanks for your help.
-
• #9
I think APDS-9960 only has a handful of sensors, enough to detect a hand swipe, but not what you'd associate with an optical mouse.
So you could kind of do a mouse, but it'd be amazingly slow - you'd have to swipe you hand over it multiple times to get to where you want - a bit like trying to do it by pressing arrow keys, but worse :)
There are other sensors that could be used though. Pretty much all of the mouse-related ones are 0.1" pins so are dead easy to solder to...
-
• #11
I actually started from the other end - I just searched for optical mouse sensors and then did a quick datasheet search to see if one that I could buy had an interface that'd work with Espruino, and went from there.
Your other option is to just buy a cheap mouse or two (sometimes 'pound shops' in the UK have them for £1), crack them open, look up the IC and see if it can be interfaced to.
If you get the raw chip, often it won't come with a lens - which is actually pretty important. The sensor element is really pretty small so quite a specialist lens is required - plus you want to shine light in at an angle.
While wasteful, gutting a cheap mouse is probably the best way to get you everything you need...
I don't suppose anyone has come across an easy to source optical mouse sensor?
I was just browsing and came across the ADNS2620 (on sparkfun) but they're not selling it any more (and neither are other distributors). It seems you can get sensors from alibaba pretty easily, but I'm struggling to find a 'current' one on Octopart.
While by itself it's not that exciting, it looks like most of the Avago ones at least have a debug mode that lets you read the pixel data straight off the sensor. It's low res but high frame rate, and I imagine it could be quite a fun toy when connected to Espruino.