Searching \ for '[EE]: Mouse Encoder Circuit Question' 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: 'Mouse Encoder Circuit Question'.

Exact match. Not showing close matches.
PICList Thread
'[EE]: Mouse Encoder Circuit Question'
2002\08\14@133635 by kben

picon face
Hi,

I am trying to hack a mouse encoder to use as a shaft
encoder for a mobile robot. I removed the slotted wheel,
IR LED, and what I assume is a photo-transistor from a mouse.
The Phototransistor is housed in black plastic and
has three leads. I was wondering if anyone could give me
a circuit so I can interface the (photo-transistor ?) to
a PIC. I want to power the IR Led and then use the int on
change function of portb to record the pulses from the
photo-transistor. ( It mat not be a photo-transistor,
but that's my best guess)

I have spent several hours searching the net for a circuit
on how to do this, but no luck.
Any help would be appreciated.

Thanks,
Kevin

--
http://www.piclist.com hint: To leave the PICList
spam_OUTpiclist-unsubscribe-requestTakeThisOuTspammitvma.mit.edu


2002\08\14@152026 by Olin Lathrop

face picon face
> I am trying to hack a mouse encoder to use as a shaft
> encoder for a mobile robot. I removed the slotted wheel,
> IR LED, and what I assume is a photo-transistor from a mouse.
> The Phototransistor is housed in black plastic and
> has three leads. I was wondering if anyone could give me
> a circuit so I can interface the (photo-transistor ?) to
> a PIC. I want to power the IR Led and then use the int on
> change function of portb to record the pulses from the
> photo-transistor. ( It mat not be a photo-transistor,
> but that's my best guess)

A phototransistor is like a regular bipolar transistor (usually NPN) except
that it also turns on when light shines on it.  The two important questions
are how much current will it pass when light is shining on it in your
application, and how much current will it leak when the light is being
interrupted.


*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com

--
http://www.piclist.com hint: To leave the PICList
.....piclist-unsubscribe-requestKILLspamspam@spam@mitvma.mit.edu


2002\08\14@152037 by Peter L. Peres

picon face
Examine the mouse board to find the common pin then use 100k pull-ups (if
common was GND) or pull-downs (if the common was +Vcc). Also route each
output to a PIC input pin.

Peter

On Wed, 14 Aug 2002, Kevin A. Benedict wrote:

{Quote hidden}

--
http://www.piclist.com hint: To leave the PICList
.....piclist-unsubscribe-requestKILLspamspam.....mitvma.mit.edu


2002\08\14@182417 by Brendan Moran

flavicon
face
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Just a note: Kevin, please don't use a reply-to address with your
piclist email.  It caused my reply to go straight to you, and not to
the list.  Many people on the list do not appreciate telling only one
person their answer.

Now back to my original message.
- ---

I assume that the mouse has two of these encoders, no?  If so, look
at the voltages on the still functioning encoder, and try to hack the
circuit out from there.

Also, I've been pretty sure that mice usually operate on two IR
LED/Phototransistor pairs.  So, each wheel has two sets, and they
produce a quadrature output when placed properly.  That will take
some adjusting to get it right.  Once you have a quadrature output,
you can either use a commercial quadrature decoder chip (eg. LS7084.
Go to http://www.chipcenter.com/questlink to find datasheets), or write your
own software to handle it.

- - {Original Message removed}

2002\08\14@212355 by kben

picon face
Hi Everyone,
Thanks for the input, I probably won't get to
experiment with the encoder until next week
unfortunately. :(

Brendan, the mouse I have only has one encoder
per wheel, but I will test out the circuit and
see what I come up with.
Also, I usually do delete my address in the reply to
field.  I must have forgot, at least I remember the
topic tags !!!

Thanks again,
Kevin

--
http://www.piclist.com hint: To leave the PICList
EraseMEpiclist-unsubscribe-requestspam_OUTspamTakeThisOuTmitvma.mit.edu


2002\08\15@005435 by kben

picon face
From David Duffy
>The 3 pin IR detector may be 2 IR detectors with a common lead?
>Does the encoder have 2 sections - one 2 pin and the other 3 pin?
>I'd think that it'd have to otherwise it couldn't detect the direction.

I got a nice Infrared Picture of the phototransistor,
and three other pictures of the mouse circuit, about
200kb all together.
www.members.dca.net/kben/misc/mouse.html
Like they say, a picture is worth a thousand words.

Any comments on interfacing the ir led and phototransistor
to a PIC are welcome.

Thanks,
Kevin

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2002\08\15@011637 by David Duffy

flavicon
face
Kevin wrote:
>Hi Everyone,
>Thanks for the input, I probably won't get to
>experiment with the encoder until next week
>unfortunately. :(
>
>Brendan, the mouse I have only has one encoder
>per wheel, but I will test out the circuit and
>see what I come up with.

The 3 pin IR detector may be 2 IR detectors with a common lead?
Does the encoder have 2 sections - one 2 pin and the other 3 pin?
I'd think that it'd have to otherwise it couldn't detect the direction.
Regards...
___________________________________________
David Duffy        Audio Visual Devices P/L
U8, 9-11 Trade St, Cleveland 4163 Australia
Ph: +61 7 38210362   Fax: +61 7 38210281
New Web: http://www.audiovisualdevices.com.au
___________________________________________

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2002\08\15@013804 by David Duffy

flavicon
face
> >From David Duffy
> >The 3 pin IR detector may be 2 IR detectors with a common lead?
> >Does the encoder have 2 sections - one 2 pin and the other 3 pin?
> >I'd think that it'd have to otherwise it couldn't detect the direction.

Kevin wrote:
>I got a nice Infrared Picture of the phototransistor,
>and three other pictures of the mouse circuit, about
>200kb all together.
>www.members.dca.net/kben/misc/mouse.html
>Like they say, a picture is worth a thousand words.

It's too hard to see the transistor properly in the picture.
I just opened up a cheap mouse here and it looks like each
IR receiver is indeed a dual unit. One pin on each receiver
goes to +5V and the other two pins on each go to the micro
using 4 port pins in all for detection. The IR LEDs are wired
in series with a 1K2 resistor & hung between 0V & +5V.
Yours should be very similar. The Q1 & Q2 designations are
a bit misleading. They're not photo-transistors in the "normal"
sense of the 3 pin variety with a base connection. :-)
I hope this helps.
Regards...
___________________________________________
David Duffy        Audio Visual Devices P/L
U8, 9-11 Trade St, Cleveland 4163 Australia
Ph: +61 7 38210362   Fax: +61 7 38210281
New Web: http://www.audiovisualdevices.com.au
___________________________________________

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2002\08\15@072854 by Roman Black

flavicon
face
Kevin A. Benedict wrote:
>
> >From David Duffy
> >The 3 pin IR detector may be 2 IR detectors with a common lead?
> >Does the encoder have 2 sections - one 2 pin and the other 3 pin?
> >I'd think that it'd have to otherwise it couldn't detect the direction.
>
> I got a nice Infrared Picture of the phototransistor,
> and three other pictures of the mouse circuit, about
> 200kb all together.
> http://www.members.dca.net/kben/misc/mouse.html

> Any comments on interfacing the ir led and phototransistor
> to a PIC are welcome.


Hi Kevin, that IR sensor is a dual IR photodiode.
It has one common pin and two pins for the outputs
of the 2 separate IR diodes.

These are easy to interface to the PIC, you can run
the LED with a few mA, normally about 5mA, and connect
the IR diode(s) via a high value resistor to +5v.
Try about 56k to start. The IR diode is REVERSED.

When NOT illuminated the IR diodes have little leakage
and will act open circuit, so the voltage to the PIC
is a logic HI.

When illuminated with IR, the diode resistance drops
to a few k ohms, and the voltage to the PIC goes to
a logic LO.

Like this:
             a   k
0v (gnd)------->|-------*----R1------- +5v
             IR diode   |    56k
                        |
                        |
                  output to PIC

-Roman
PS. Can you FIX your reply-to address!!!!

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2002\08\15@102455 by PICLIST

flavicon
face
Hi Roman, et all,

You are in deed correct. I put the photodiode on a breadboard,
and attached my DMM to it. I read 500K when no IR light was present.
I shined the IR light from my digital camera on the photohdiode
and the resistance dropped to practically nothing. Thanks !

P.S. I changed my reply to address to the piclist

{Quote hidden}

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2002\08\15@123120 by Brendan Moran

flavicon
face
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

> P.S. I changed my reply to address to the piclist

If you simply remove your reply-to address entirely, it will do the
same job. ;o)

- --Brendan

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 6.5.8 for non-commercial use <http://www.pgp.com>

iQA/AwUBPVvWCgVk8xtQuK+BEQJAJQCg4jzilvM1hGCUM497ZhJrzjxRnYgAoK1c
/ESoNIctMAnFbAYIA4eX8W8g
=kbjm
-----END PGP SIGNATURE-----

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


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