USB Optical mouse as motor encoder
Last friday an idea came to my mind, I just wanted to share an original idea :) [maybe not original, who knows maybe someone has already done it.. who knows..]
It is to use an ordinary USB Optical mouse as an optical encoder. Some obvious benefits are:
-it tracks direction
-it tracks speed
-it's high resolution
-it's dumb cheap and hyper easy to get
-it's all ready to use/ circuit made/ nice components
-no mechanical or optical high precition stuff to calibrate.
-no need of hard to find absolute or progressive rotary discs, nor printing them.
NOTES:
-must not rubbing (for obvious reasons)
-It has to be really near to rotary surface, AT MOST 1 milimeter.
-surface must be opaque, uniform and clean.
-ideally be in dark environtment (inside a box or whatever)
-for more resolution, just move away from center.
-for less resolution, come closer to center.
I began my mouse lab experiments connecting it to my PC with some C++ and API software stuff to intercept mouse data, and I got incredible presition. A limitation is high speed sensing.
Up to now, I've achieved some 1000 RPM's without problems, comparing to my standard quadrature encoder in a PIC16F628A. over 1000 there are differences...
I don't know wich is the faulty, if my PC optical mouse or my 16F628 optical encoder [show data on LCD]
My next experiments will be:
-test with other motors I have with included quad.encoder at different speeds
NOW I want to do the NO PC versión. Here is PicBasic Pro in action. I'm actually goring my mouse guts and trying to experiment with data and it's speed limits with a PIC18F4550 and trying to conect it. I just begun PIC version some hours ago but can't read data from mouse to PIC.
Any suggestion?
I'll share my advances as soon as they happen.
(I'm addicted to it... USB has some hypnotizing powers that can't almost let me sleep, been all weekend in it, even I've dreamed with USB TX/RX, female connectors, well, whatever. In fact, here in my country it's now 5:43am and I haven't slept.)
[sorry my english]
regards,
Rodrigo
Santiago - CHILE
The part i dont get about USB yet
Hola Rodstar
Well i'm sure you have worked around USB devices a lot more than i have since i just made my first steps, and must surely i am wrong, and you can clear a black hole in my mind but..... USB is not as simple bidirectional comunication as RS232. What i mean is that you might need a USB host controller in order to connect USB devices to it (PC brings one), with PIC micros you can only make devices to be connected since it doesnt have the host controller, so you can't connect a USB mouse to a PIC and expect to receive the data.
On the other hand it would be really usefull to emulate someway the controller behavior with the pic since you can find tons of ideas where a USB device is controlled by a uC. I am just considering USB cameras(cheap), uSB keyboard, MOUSE, USB memory for storage, etc. I had this same question in the USB demo by mister_e asked sometime ago, someone there proposed a small device that could be used to control USB things but it was external and far away from Colombia and Chile ;).
check this:
http://dataweek.co.za/news.aspx?pklN...lCategoryID=34
i Have Never seen one inside
I am so tempted to open the one in my hand..... mmm....
Good luck