Pages: [1]   Go Down
Author Topic: IR emitter / receiver from scrollwheel mouse question  (Read 311 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Full Member
***
Karma: 0
Posts: 116
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey there,
Trying to detect RPM of my motor. Took apart a mouse as per the advice of folks on the forum here, but I'm a little confused. The IR sensor has 3 pins, and all the tutorials are for sensors with 2 pins. Also, it's unclear which leg should be connected to ground on the IR emitter as it is flat and the legs are the same length. There is a FRONT to the emitter, however, so is there a common configuration of right/left positive/negative on those?

Oh, and I'm also seeing people doing both analog and digital reads on the IR sensor, which is correct?
Logged

Queens, New York
Offline Offline
Faraday Member
**
Karma: 65
Posts: 2931
"Of all the things I've ever lost, I miss my mind the most" -Ozzy Osbourne
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The IR has two in one. The mouse detects which of the two gets blocked first, then decides on which direction it is going.
Logged

Created Libraries:
NPV2 (NewPasswordV2),  TFT_Extension, OneWireKeypad, SerialServo.
Will provide libraries if asked in PM or forum.

Offline Offline
Full Member
***
Karma: 0
Posts: 116
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ah-ha! Makes sense. So is the middle ground, then?
Should I go ground from the middle, and then a 220ohm from either right or left to the pin? And should it be reading digital or analog? I'm doing analog now and it seems to be working but to test it I'll need to plug in the emitter, and I'm not sure which leg is which... any ideas?
« Last Edit: February 06, 2013, 12:29:46 pm by prismspecs » Logged

Queens, New York
Offline Offline
Faraday Member
**
Karma: 65
Posts: 2931
"Of all the things I've ever lost, I miss my mind the most" -Ozzy Osbourne
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I would assume the middle IS ground, but of all my years dealing with electronics and other situations, I've learned to NEVER assume.
Follow the traces on the circuit board, and see what pin goes to ground. It may or may not be the middle pin, you have to check.
« Last Edit: February 06, 2013, 12:51:57 pm by HazardsMind » Logged

Created Libraries:
NPV2 (NewPasswordV2),  TFT_Extension, OneWireKeypad, SerialServo.
Will provide libraries if asked in PM or forum.

Offline Offline
Full Member
***
Karma: 0
Posts: 116
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

How would I find out if the middle is ground on a component without the aid of a schematic?
Logged

Queens, New York
Offline Offline
Faraday Member
**
Karma: 65
Posts: 2931
"Of all the things I've ever lost, I miss my mind the most" -Ozzy Osbourne
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Follow the trace on the circuit board back to GND or V-.
Logged

Created Libraries:
NPV2 (NewPasswordV2),  TFT_Extension, OneWireKeypad, SerialServo.
Will provide libraries if asked in PM or forum.

Norfolk UK
Offline Offline
Edison Member
*
Karma: 52
Posts: 2214
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Maybe you could use a multimeter to check. If there are 2x diodes and 3x pins then one pin will probably be either a common anode or common cathode and the other 2 pins the opposite.
Logged

Handle every stressful situation like a dog. If you can't eat it or hump it. Piss on it and walk away.

Pages: [1]   Go Up
Jump to: