New to this. Need advice with USB mouse interface

Hello all,

I am a researcher and we need a way to very precisely monitor position for a project that we are doing. We are currently using a high performance gaming mouse and tracking the position by actually tracking the position of the mouse cursor on our computer (using the DirectX commands in Windows). This is not ideal because it ties up the computers own mouse and makes it hard for us to synchronize inputs and outputs. Also, sometimes the computer slows down for whatever reason and we miss samples. Thus I would like to be able to read the mouse coordinates with a dedicated micro controller and convert those signals to analog signals to route to a data acquisition board. I know a little bit about the Arduino format but I could definitely use a lot of help. Cost is not a huge concern as this is important to us so it's OK if this requires a expensive add on boards. I was looking at these two options and I can't quite figure out which one I need and how this would work. Does anyone have any suggestions? I would greatly appreciate it (even if it's not an Arduino based suggestion).

Here is one board I found
http://www.circuitsathome.com/products-page/arduino-shields/usb-host-shield-2-0-for-arduino/

Here is something else. I can't tell if this is strictly for trouble shooting, or if I could use this for realtime data acquisition.

Thank you again for any help!!!
FB

If you use a USB mouse, you'll need a USB host port and mouse drivers to go with it. Perhaps you'll find them somewhere, but if not then you've got a lot of work to create your own.

If you're only using the mouse as a position input to generate the analog signal, and don't really need it for anything else such as PC display, have you considered just using a joystick and connecting to the potentiometers? I'm not sure what form your analog outputs to the data acquisition take, but if you're intending to output a slowly-varying DC voltage corresponding to the input positions then (a) you'd need to use an Arduino with a DAC, or add your own external DAC, and (b) can't you simple arrange the joystick potentiometers to directly generate the voltage you want?

What is the precise position needed for ?
A digital caliper is also very precise.
Some optical parts of a mouse can be controlled by an Arduino: Breakout for ADNS2620 Optical Mouse Sensor - BOB-10105 - SparkFun Electronics?
A hall sensor and a magnet could be used for precise movements.
But not many devices can beat the precision of a gaming mouse, so the USB host shield can be used to read the mouse, like this project: http://www.circuitsathome.com/mcu/controlling-robotic-arm-with-arduino-and-usb-mouse

As PeterH wrote, using analog makes it harder, and I think you will also loose all the precision. Why do you want to use an aquisition board ?

Hi again. Thanks for the input. I really appreciate it! What we are doing is studying the link between animal behavior and the nervous system to try to figure out how simple (neuronal) circuits make decisions. We need a way to study the animal's behavior, in this case locomotion, while the animal is restrained. So to do this we build a small treadmill and then measure the velocity of the treadmill to assay behavior while we can record from restrained animals that are fixed in place. We use the fruit fly model system because it has incredibly powerful genetic tools, so we can modify the animal's brain genetically and see how that alters decision-making and locomotion. The problem is that fruit flies are very small and so we need great precision. What we do now is to suspend a tiny 1/4" sphere on a stream of air and then place an optical mouse sensor right next to the sphere. The fly is then secured to a small pin and placed just on top of the sphere. As the fly runs, the sphere turns, and the optical sensor moves the computer's cursor on the monitor. We can track the cursor on the video screen and thus obtain the fly's forward and lateral velocity (with enough resolution to pick out single steps in the fly's walking pattern). This works because we chose a gaming mouse with a fairly precise sensor. We generally use Matlab for data acquisition and stimulus delivery and this current method is just nearly impossible to precisely synchronize data collection and stimulus delivery. For data acquisition, we generally use a National Instruments A/D board which just takes in an analog signal through BNC cables. So my hope was to have the Arduino take in the mouse sensor values and then just have Matlab sample the mouse values through the Arduino's analog outputs. So there would have to be a conversion from the mouse position values to a voltage signal which shouldn't be a huge problem. I imagine it going from SPI logic to a analog signal. I'm not certain if the Arduino is the best way to go but I thought it would act as good intermediate. The advantage of going this route for us over using the windows based method should be better temporal synching if everything goes through Matlab, and also this would allow us to more easily sample any number of these treadmills with a single computer. Additionally, if this works it seems that using the Arduino analog out signals as an instantaneous measure of locomotion would make it easier for us to develop closed loop assays where locomotion and stimulus delivery can be coupled. Does any of this make sense?
Thanks again,
FB

Yes, but the data path doesn't seem good to me.
I mean this: from gaming mouse to Arduino is possible, but the analog output to be able to use a multichannel analog input doesn't seem right to me.

Can you use an analog optical sensor and connect that directly to the A/D board ?

I'm not very familiar with Matlab setups, so I don't know what else would be possible.

Thank you again for responses everyone. I'm looking into analog optic flow sensors as well now thanks to the tip. I guess my thought was to do something like this to get the data into the arduino.

https://www.assembla.com/code/laser/subversion/nodes/trunk/Arduino/ADNS9500_test/ADNS9500_test.pde?rev=4

But the description of how to implement this is not really there. For example how to connect this to the arduino and how to set it up.

That is very interesting, but I can't open the Eagle schematics file.
Is the page more useful : http://fab.cba.mit.edu/classes/4.140/people/andy.bardagjy/input/index.html ?
The datasheet provides also example schematics : http://www.avagotech.com/pages/en/navigation_interface_devices/navigation_sensors/laserstream/adns-9500/
But it seems rather difficult.