Let's Make Robots!

PC Ball Mouse = Rotary Position Sensor

Vendor's Description: 

Computer mice with balls contain two (or sometimes three, if the have a scroll wheel) rotary position sensors. These are not mechanical switches, but optical ones. (Just to confuse you, this is why "ball mice" are "optical mice".) A pair of receivers is placed on the opposite side of a slotted wheel from a transmitter. As the ball rotates, it spins the wheel and the sensors detect the direction and speed. Two such arrangements are placed perpendicual to one another.

If anyone wants to try (I'd love to do this, if I could find the time) PS/2 or serial port mice have a little chip in them which does all the speed/position decoding for you AND outputs a serial data stream containing the information. I know this because in a past life I hooked a serial mouse to a PIC with sucess.

If anyone has the time, and an old mouse, please take it apart, attach the slotted wheels to your robot's wheels, hook the chip to your PICaxe and decode the data stream.

The data stream is documented here.

These would make an ideal (and virtually free) position sensor.

Tell us how you get on.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
oh snaps!
nothing, it just means I think it's really cool.
I've been meaning to try this...too bad I got rid of most of my old spare mice....  :(
I kept all the innards when I took apart the mouse that I built my first robot in.  Hopefully I'll find a use for them in the near future.  :)

would it be possible to get a bit more info on this? like how to connect it to a picaxe and what code to use?

Dunno about code, but the protocol from the mouse (it's one-way RS-232 at 9600 baud, 8n1) is widely documented on the net.