Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Looking for an optical odometry chip

BobW

Active Member
I'm looking for what is essentially a one dimensional version of an optical mouse sensor. I need to have a non contact sensor that can detect lateral movement of a target in one dimension only. I could use an optical mouse sensor, and use only one axis output, but all of the current mouse chips I've seen have only a USB output which are very difficult to interface to. Some early chips (eg., the PS/2 versions) had quadrature outputs as well so that they could emulate a standard quadrature encoder, but it appears that those chips are all obsolete and unavailable.
Is anyone aware of a sensor that would work in this application and has an easy to use output interface?
 
There is a Chinese supplier here that still has good stock of the Agilent ADNS-3060 serial output mouse sensor:


The price is under $0.50 each.

Datasheet:
 
How did you find the price? When I click on the link, I don't get any price info unless I submit a price request (which I don't want to do). I doubt that they'd be selling them for $0.50 each unless I order several thousand.
 
Okay thanks. Giving this some more thought, I think my best bet is to find an old PS2 mouse and salvage the chip and optics from it. Because I'm going to need the optics no matter what.
 
What software do you intend to use to communicate with the chip?
 
I'll probably use a PIC, so it would be PIC assembly language. But I'm also considering an Arduino, in which case it would be C.
 
Long ago I managed to read a mouse using the PS2 protocol. Software was written in Assembly for PICs (the old one). If I find all data from my project (could take some time) I could post it here. Are you interested?
 
This chip (on a breakout board has been my favorite for gesture control - it is not exactly what you asked but super easy with I2c comma.

 
Long ago I managed to read a mouse using the PS2 protocol. Software was written in Assembly for PICs (the old one). If I find all data from my project (could take some time) I could post it here. Are you interested?
Yes, if you can find it, it would save me a lot of time.
 
This chip (on a breakout board has been my favorite for gesture control - it is not exactly what you asked but super easy with I2c comma.

Thanks. I'd been looking at gesture controller chips, but it wasn't clear to me how they worked, and I didn't realize there was a breakout board available. They're cheap enough, so I'll probably order one, and check it out.
 
Hola BobW

It took time but I found my files (schematic, software (assembly and PS/2 protocol timing diagram). Are you still interested?
 
Yes definitely, it would save me a lot of time. Thanks.
 
OK BobW. Here we go with the schematic used for developing the code and further tests.

NB the chip is turned ON after the micro has finished the initial chores (initialization) otherwise you could never detect in time the codes emitted by the IC at power on.
 

Attachments

  • PIC and an optical mouse.pdf
    393.9 KB · Views: 28
BobW

Here is the timing diagram of the PS/2 protocol; doubt you could find any better in the Web.

I used this to write and test the code with a DSO (invaluable help).

Worked basically with little tweaking. That was 13 years ago.
 

Attachments

  • PS2 protocol timing ATFN.pdf
    22.6 KB · Views: 29
Thank you. It's much appreciated.
Do you have any source code that you can post?
 
Sure, give me time. Busy now.
 
BobW

The whole thing is attached below as a .zip with 39 compressed files. Checked them with Microsoft AV and reported clean.

Go straight to:

000 OPTICAL MOUSE CONTROLLED BY PIC 03.ASM

While it could seems convoluted to you (or not?), worked for me.

After 13 years there are many details I should refresh and at 77yo it would take longer than in that distant past.

The chip I used came from a from striped mouse. If I find the pin out I will post it later.
 

Attachments

  • OPTICAL MOUSE CONTROLLED BY PIC 03.zip
    536.1 KB · Views: 25
Last edited:
ATL A2188 was the chip.
Pin out and datasheet attached. I added another two; run across them when opening several mice.
 

Attachments

  • ADNS2051.pdf
    307.8 KB · Views: 29
  • ATL A2188 pinout.bmp
    683.9 KB · Views: 27
  • ATL A2188.pdf
    273.4 KB · Views: 32
  • PAN3401.pdf
    418.3 KB · Views: 33
Thank you very much. This will save me a lot of work.
 

Latest threads

New Articles From Microcontroller Tips

Back
Top