Author |
Message |
rubendelacosta
Joined: Dec 25, 2005 Posts: 153 Location: lisbon
|
Posted: Mon Dec 26, 2005 5:09 am Post subject:
mouse IR.sensors |
|
|
hey!
I found this IR-sensors inside an old mouse(ok...every mouses have it...I just didn't know) and they look pretty cool, but i just cant figure out how to plug'em to a toy...each sensor has 4pins, and they look like transistors.
so...any of you guys have any ideia how connect them to a toy?
thank you! |
|
Back to top
|
|
|
Uncle Krunkus
Moderator
Joined: Jul 11, 2005 Posts: 4761 Location: Sydney, Australia
Audio files: 52
G2 patch files: 1
|
Posted: Mon Dec 26, 2005 5:41 am Post subject:
|
|
|
One side is an I.R. Led, and the other is a photo-transistor. It's not a simple interface, but it's not impossible. I'd start by trying out a simple buffer made out of a 2N3904 transistor or some other similar switching transistor. _________________ What makes a space ours, is what we put there, and what we do there. |
|
Back to top
|
|
|
rubendelacosta
Joined: Dec 25, 2005 Posts: 153 Location: lisbon
|
Posted: Mon Dec 26, 2005 6:04 am Post subject:
|
|
|
thanks!
but tha hard part for me is to figure out the pins part! they're four...and i don't know what is what... |
|
Back to top
|
|
|
jksuperstar
Joined: Aug 20, 2004 Posts: 2503 Location: Denver
Audio files: 1
G2 patch files: 18
|
Posted: Mon Dec 26, 2005 11:46 am Post subject:
|
|
|
Does the mouse still work? Do you have a Digital Multi-meter?
1st you can find the ground: One pin of the LED half should go to ground, the other should go through a resistor (for current limiting).
For the phototransistor half, 1 pin should go to power, and the other to a resistor, which in turn goes to ground. The phototransistor will be a short when it has no light going into it, or higher resistance when light enters. The ratio of it's "resistance" to the fixed resistor is your output. So tap onto this pin for your control voltage. This, in turn, could be amplified if needed as the Uncle suggested. |
|
Back to top
|
|
|
ian-s
Joined: Apr 01, 2004 Posts: 2669 Location: Auckland, New Zealand
Audio files: 42
G2 patch files: 626
|
Posted: Mon Dec 26, 2005 12:30 pm Post subject:
|
|
|
Have optical mice been around long enough to be considdered 'old'?
In any case, both types require support chips to do anything useful, The optical interrupter style has a sensor for each slotted disk, each sensor produces two clock pulse trains shifted by 90deg. The following logic chip can work out which direction the wheel is turning by which pulse goes high first. This can be done with a 4000 series flip flop I think,
I have no idea how the optical sensors, which emit visible light, work. _________________ We can dance if we want to, we’ve got all your life and mine. |
|
Back to top
|
|
|
jksuperstar
Joined: Aug 20, 2004 Posts: 2503 Location: Denver
Audio files: 1
G2 patch files: 18
|
Posted: Mon Dec 26, 2005 2:05 pm Post subject:
|
|
|
The true optical mouse your thinking of Ian actually use a small CCD camera, and track any edge or line that falls on a specific focal plane. It would be easier (in my book) to just interface to the PS2 serial interface that they have with a microcontroller (or PC software) than to jerry rig those.
However, the "other" optical mice, the ones with a ball and IR interrupter, could still prove to be useful somehow.
Oh, yeah, those with the mouse & optical interrupter might have either 2 phottransistors on each roller, or use an A>D converter. This is because the interrupter creates a 4-phase signal, which allows the sensors to detect direction, as well as speed. So the signal output from one of those photosensors might actually be a 4 step sequence (which moves through it's steps VERY quickly when you move the ball, maybe it'd make a good LFO?) |
|
Back to top
|
|
|
|