Searching \ for '[OT] Using a mouse as a cheap incremental encoder?' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/io/sensors.htm?key=encoder
Search entire site for: 'Using a mouse as a cheap incremental encoder?'.

Exact match. Not showing close matches.
PICList Thread
'[OT] Using a mouse as a cheap incremental encoder?'
1998\06\23@033305 by Charlos Potma

flavicon
face
I am working on a project where I use a BOURNS mechanical
incremental encoder to modify the frequency generated by
a DDS. The DDS and the encoder are connected to a PIC.
I would like to use a higher resolution optical encoder but
the price is prohibitive. I am now considering using a
PC mouse, or at least some part of it as an encoder.
The standard PC mouse seems to have a DATA and CLOCK
output. Does anyone here have detailed information on the
protocol used? Any information on the pinout of the
6-pin header that is frequently found on the PCB?
Any information on how the mouse is normally connected to
the PC hardware?

thanks,
Charlos Potma
spam_OUTcharlos.potmaTakeThisOuTspamrivm.nl

1998\06\23@124914 by Larry N. Fraysier

flavicon
face
Check out:   http://www.worldaccessnet.com/~dstixrud

Larry

----------
{Quote hidden}

1998\06\23@130150 by Mike Keitz

picon face
On Tue, 23 Jun 1998 09:20:36 +0200 Charlos Potma <EraseMECharlos.Potmaspam_OUTspamTakeThisOuTRIVM.NL>
writes:
> I am now considering using a
>PC mouse, or at least some part of it as an encoder.
>The standard PC mouse seems to have a DATA and CLOCK
>output. Does anyone here have detailed information on the
>protocol used?

Sounds like a PS/2 type mouse.  These use two TTL lines with
bidirectional synchronous signals very similar to a keyboard.  A serial
mouse would be simpler to use a since it sends data one way over one
wire.  The data is just standard asynchronous at 1200 baud.  Microchip
made some pre-programmed PICs once to use as mouse controllers.  The data
for these had fairly good descriptions of the signal format.

For a Microsoft-type serial mouse, groups of three 7-bit characters are
sent LSB first with start and stop bits just like standard async data.
The data is sent only after the user activates something on the mouse, if
it is sitting still no data is sent.  The characters are:

1(LB)(RB)(V7)(V6)(H7)(H6) - (LB, RB are 1 if the button is pressed)
0(H5)(H4)(H3)(H2)(H1)(H0)
0(V5)(V4)(V3)(V2)(V1)(V0)

The PIC would look at the MSB of each character and wait until one with a
1 is found, indicating the start of a new packet.  Then it could
accumulate the V and H bits in proper order.  I think the two 8-bit
numbers are two's complement reperesentation of how far the mouse has
moved since the last report.



_____________________________________________________________________
You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at http://www.juno.com
Or call Juno at (800) 654-JUNO [654-5866]

1998\06\23@141015 by Sean Breheny

face picon face
On Tue, 23 Jun 1998, Mike Keitz wrote:

> On Tue, 23 Jun 1998 09:20:36 +0200 Charlos Potma <Charlos.Potmaspamspam_OUTRIVM.NL>
> writes:
> > I am now considering using a
> >PC mouse, or at least some part of it as an encoder.
> >The standard PC mouse seems to have a DATA and CLOCK
> >output. Does anyone here have detailed information on the
> >protocol used?
>
> Sounds like a PS/2 type mouse.  These use two TTL lines with
> bidirectional synchronous signals very similar to a keyboard.  A serial
> mouse would be simpler to use a since it sends data one way over one
> wire.  The data is just standard asynchronous at 1200 baud.  Microchip
> made some pre-programmed PICs once to use as mouse controllers.  The data
> for these had fairly good descriptions of the signal format.

I thought that I'd seen simple (no IC's or active components, just wires)
adapters to go between a serial mouse and a PS/2 bus mouse port. If what
you are saying is true, how can a simple adaptor convert an asynchronous
signal to a bi-directional synchronus signal? I could be wrong, its just
that I seem to remember these adaptors.

THanks,

Sean


{Quote hidden}

1998\06\23@145942 by Joe Little

flavicon
face
part 0 3247 bytes content-type:text/plain------ =_NextPart_001_01BD9ED9.67C20AA0
Content-Type: text/plain

    The mice that work with those adapters ain't your everyday old
mouse.  They
    need to have both interfaces built in.  PS2 mice have clock and
data lines.
    Older mice have RS-232 RX & Tx.  The newest mice have all four
signals.
    The designers were clever selecting the pins, so that the unused
signals
    are connected where they will do no harm to the existing hardware.

    -------------------

    I thought that I'd seen simple (no IC's or active components, just
wires)
    adapters to go between a serial mouse and a PS/2 bus mouse port. If
what
    you are saying is true, how can a simple adaptor convert an
asynchronous
    signal to a bi-directional synchronus signal? I could be wrong, its
just
    that I seem to remember these adaptors.

------ =_NextPart_001_01BD9ED9.67C20AA0
Content-Type: text/html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.1960.3">
<TITLE>RE: [OT] Using a mouse as a cheap incremental encoder?</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp; The mice that work with those adapters
ain't your everyday old mouse.&nbsp; They </FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp; need to have both interfaces built in.
&nbsp; PS2 mice have clock and data lines. </FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp; Older mice have RS-232 RX &amp; Tx.&nb
sp; The newest mice have all four signals.&nbsp; </FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp; The designers were clever selecting th
e pins, so that the unused signals </FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp; are connected where they will do no ha
rm to the existing hardware.</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp; </FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp; -------------------</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp; </FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp; I thought that I'd seen simple (no IC'
s or active components, just wires) </FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp; adapters to go between a serial mouse
and a PS/2 bus mouse port. If what </FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp; you are saying is true, how can a simp
le adaptor convert an asynchronous </FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp; signal to a bi-directional synchronus
signal? I could be wrong, its just </FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp; that I seem to remember these adaptors
.</FONT>
</P>

</BODY>
</HTML>
------ =_NextPart_001_01BD9ED9.67C20AA0--

1998\06\23@150121 by Bob Blick

face
flavicon
face
On Tue, 23 Jun 1998, Sean Breheny wrote:
>
> I thought that I'd seen simple (no IC's or active components, just wires)
> adapters to go between a serial mouse and a PS/2 bus mouse port. If what
> you are saying is true, how can a simple adaptor convert an asynchronous
> signal to a bi-directional synchronus signal? I could be wrong, its just
> that I seem to remember these adaptors.

Hi Sean,

Those adapters only work on highly intelligent mice, the kind that figure
out what they are hooked upon powerup and communicate the correct way. All
the new Logitech mice are like that, probably some others too.

-Bob

1998\06\23@155545 by Brian Whittaker

flavicon
face
Hi Charles & Larry

Cool Web site but what is not said is the output waveform
from the detector section is 2-bit quadriture as follows

        clockwise rotation
     .---.   .---.   .---.
[a]___|   |___|   |___|   |___

   .---.   .---.   .---.   .-
[b]_|   |___|   |___|   |___|

    counter-clockwise rotation
   .---.   .---.   .---.   .-
[a]_|   |___|   |___|   |___|

     .---.   .---.   .---.
[b]___|   |___|   |___|   |___

Each mouse will have 4 outputs 2 for horizontal and
2 for vertical

Counting the transitions of both outputs and adding them
together doubles the counts per revolution

Detecting which output leads ( which goes positive first )
will tell you which direction you are turning

Please excuse the commercialism but the company I work for
sells mouse guts made by Logitech. They simply buffer the
quaditure waveforms with a ttl inverter and sends them to
the computer.

The small pcb has all of its parts including mounted encoder
wheels and micro switches. All that is missing is the cable
and case. Schematics are included. Price is 2 for $5 + S/H
>{Original Message removed}

1998\06\23@222146 by Louis Marquette

flavicon
face
Sean Breheny wrote:

{Quote hidden}

they exist, i have one, it is a ps2 to rs232 converter. it does not seem to
work though, when i plug my trackball into it and then plug it into my rs232
port(com1) it is not recognised, but trackball works when i plug it into rs232
port. maybe it only eorks for mice, not trackballs

{Quote hidden}

1998\06\24@151252 by Leon Heller

flavicon
picon face
In message <KILLspamPine.SOL.3.91.980623140529.23306A-100000KILLspamspamtravelers.mail.corn> ell.edu>, Sean Breheny <RemoveMEshb7TakeThisOuTspamCORNELL.EDU> writes
{Quote hidden}

I think that Charlos's best bet is to just use one of the encoders and
forget about the mouse electronics. It will generate an in-phase and
quadrature signal which can be sorted out with software or hardware to
get the required direction and count information.

Leon
--
Leon Heller: TakeThisOuTleonEraseMEspamspam_OUTlfheller.demon.co.uk http://www.lfheller.demon.co.uk
Amateur Radio Callsign G1HSM    Tel: +44 (0) 118 947 1424
See http://www.lfheller.demon.co.uk/dds.htm for details of a simple AD9850
DDS system. See " "/diy_dsp.htm for a simple DIY DSP ADSP-2104 system.

More... (looser matching)
- Last day of these posts
- In 1998 , 1999 only
- Today
- New search...