Measuring travel with a mouse?

General Robotics Forum - All aspects of robots and their applications. 

Bookmark this page:  YahooMyWeb Yahoo!  Google Google  Windows Live Favorites Windows Live  del.icio.us del.icio.us  digg digg  Add to Netscape Netscape
Subject Author Date
Measuring travel with a mouse? Jeff Holinski 03-22-2007
If you were  Registered and logged in, you could reply and use other advanced thread options
Posted by Jeff Holinski on March 22, 2007, 8:43 pm
We just blew the linear encoder on our hydralic press at work. A new
one with 40" of travel is fairly expensive and I got to wondering if
you could use an optical computer mouse to measure distance traveled.

The idea is to mount the mouse to the base of the press and have a
piece of aluminum flatbar attached to the ram. The bar would pass in
front of the optical sensor on the mouse and a dedicated PC would
display the distance traveled.

Does anyone know if software to do this exists?
Failing that, is there any reason why Visual Basic shouldn't be able
to do this if I were to dig out my old copy and install it?



Remove nospam_ to reply by email

Jeff H........

Posted by on March 22, 2007, 8:58 pm

> We just blew the linear encoder on our hydralic press at work. A new
> one with 40" of travel is fairly expensive and I got to wondering if
> you could use an optical computer mouse to measure distance traveled.
> The idea is to mount the mouse to the base of the press and have a
> piece of aluminum flatbar attached to the ram. The bar would pass in
> front of the optical sensor on the mouse and a dedicated PC would
> display the distance traveled.
> Does anyone know if software to do this exists?
> Failing that, is there any reason why Visual Basic shouldn't be able
> to do this if I were to dig out my old copy and install it?
> Remove nospam_ to reply by email
> Jeff H........


I deal with glass scales all the time, if you're looking for precision then
even if you could get the mouse to work in that manner your accuracy would
not be there. If you're in Ontario the ministry would also take issue with a
device modified in that manner that was not OEM to the machine, should there
ever be an injury involving that machine. What make is the original scale? I
have found exact replacement scales for Heidehain scales that were half the
price from a guy in Chicago that deals with Fagor scales.



Posted by Joe Strout on March 22, 2007, 11:45 pm

> The idea is to mount the mouse to the base of the press and have a
> piece of aluminum flatbar attached to the ram. The bar would pass in
> front of the optical sensor on the mouse and a dedicated PC would
> display the distance traveled.

It certainly sounds worth a try. My only concern is that it might not
be precise enough (depending on how much precision you need).

> Does anyone know if software to do this exists?
> Failing that, is there any reason why Visual Basic shouldn't be able
> to do this if I were to dig out my old copy and install it?

I'm not sure, but REALbasic can certainly do it. You can't just look at
the mouse position, because that will run into the edge of the screen
and stop updating. But if you treat the mouse as a game input device
(in REALbasic, using GameInputManager and related classes), then you can
get the delta on every update, and keep adding these up as long as you
need.

Sounds like a fun project, so I'd be happy to work with you on writing
that RB software if you like.

Best,
- Joe


The site map in XML format XML site map
other useful resources:
Official Robosapien Website
Lego Mindstorms Website

Contact Us | Privacy Policy