DPRG List  

[DPRG] can i use a bulb mounted on an object for identificati on?

Subject: [DPRG] can i use a bulb mounted on an object for identificati on?
From: Dan Miner miner at centtech.com
Date: Thu May 18 10:57:38 CDT 2000

> From: Sluggy [mailto:slugmusk at home.com]
> Sent: Thursday, May 18, 2000 10:25 AM
> > And i think that i may try to hack the shaft
> > encoders from a mouse. As some of you taught me that I can 
> hack the wheels
> > and the light emitter and receivers but I don't know how I 
> can interface
> > theses to the i/o ports of my controller board and what is 
> the operation
> > of the receivers?
> I have been intrigued by the concept of hacking a mouse for wheel
> feedback. Long ago, I looked into this a little and I think that it's
> doable. It would take some careful analysis of the output of a mouse
> under such conditions, but there seems no reason why one could not
> update positional registers from the encoders, one for each wheel.
> You might be able to find some mouse programming info online somewhere
> and modify that as needed.

My robot Drilbert uses the encoder wheels from inside a mouse for
its motor encoders.  I did not use the RS-232 interface - I cut out
the parts I wanted and mounted them to the motor output shaft.

>From my mouse parts (yours may be different), on one side of the wheel,
there is a 2 pin device (an IR LED) and a 3 pin device (a dual IR photo
transistor).  Before you cut anything apart, power up the mouse in the
normal way (hooking to a PC and powering up) then look at the signals
with an oscilloscope.  Then power down and trace out the circuit.

The way a mouse gets power is that the PC sends a specific character
with alternating 0101... (such as ASCII "U").  The mouse circuit uses 
this as +/-12V AC and rectifies and filters it to a capacitor 
generating +12VDC and -12VDC (actually quite a bit less due to an 
inefficient circuit).  From these voltages, it uses DC to DC converter 
methods the generate the +5VDC it needs.  Also, the +/-12VDC is
used for the RS-232 codes sent back to the PC.

The dual phototransistor acts as a quadrature encoder so that the 
mouse can determine the direction (and distance) it is moving.
Perfect for a robotic wheel encoder!

One VERY IMPORTANT tip: the mechanical alignment of the mouse 
encoder wheel to the phototransistor is CRITICAL.  I strongly suggest
you keep the mechanical mount for the encoder wheels from the mouse if 
possible.  I just cut out the whole assembly: wheel, mount and part
of the circuit board.  Then just wired up to the circuit board traces
and/or the pins of the IR LED and detector.

				- Dan Miner

More information about the DPRG mailing list