Mitsumi M28N-1 motor optical encoder problem

Hello

Recently I purchased a pair of Mitsumi M28N-1 motors with build-in encoder (these)
To familiarize myself with them, I intended to build a program that that would spin the motor at constant, predetermined speed, which requires reading of the data from the encoder.

Since I am a absolute beginer, I looked on the internet, but was only able to find loads of conflicting information.

for example this article says that i definitely shouldnt connect the middle pin directly to 5V, when all pictures and pinouts I was able to find say i am supposed to do exactly that.
meanwhile, this article suggests that i have to do additional wiring with transistor and several resistors to actually obtain usable data.

The main problem is, the internet is swarmed with tutorials for rotational quadrature encoders and there is little to nothing written about optical encoders in a way that I am able to understand.
Second issue is the vague description of pinout of the actual motor, whitch is, in order:

  1. motor pin 1
  2. motor pin 2
  3. 5V
  4. send
  5. receive

as you can see, there is no obvious GND pin, the first article i mentioned suggest its actualy the 'send' pin, but i am not sure
so, my questions are:

  1. Is it truly ok to connect 5V directly to middle pin?
  2. What, in context of optical encoders, the pins 'send' and 'receive' actualy mean?
  3. would it be possible to determine the direction of the spin using this encoder (I know the answer is very likely no, but the chinese website with description of this motor says something about two channels, whitch would be enough to determine the direction, but there appears to be simply not enough pins for that, whitch is weird in itself)

I am even considering unsmoldering of the encoder and replacing it with the rotational quadrature encoder, whitch is much more 'explored teritory', but first I want to ask.

Venrera:
so, my questions are:

  1. Is it truly ok to connect 5V directly to middle pin?
  2. What, in context of optical encoders, the pins 'send' and 'receive' actualy mean?
  3. would it be possible to determine the direction of the spin using this encoder
  1. Yes.
  2. Essentially, slot optical sensor is a pair of IR LED and IR photodiode, "send" is wired to led and "receive" to phd.
  3. No.
    More : https://www.instructables.com/id/How-to-use-photo-interrupters-with-your-ARDUINO/

I agree with the above; the encoder is an optointerrupter. I also think the wiring diagram in reply #1 of this post properly explains the send and receive pins. GND is actually external to the circuit board.

You probably won't need the transistor and associated resistors.

Build the circuit in that post using just the ~510 Ohm and 10K resistors (other nearby values will be fine for each), and measure the voltage between "receive" and GND as you slowly rotate the shaft. Let us know what you observe.

Finally, add a 10 nF cap across the motor terminals, as close as possible to the motor.

Thank you for all the replies!
Since i can now actually understand the schematics in the articles I posted, I believe I am on good track to solution, but since all the discrete parts I have been using so far are basicly from electrical scrap and I dont have enough of them, i will rather order more and wait, so I can ensure that all the relations are correct.
On a sidenote

jremington:
add a 10 nF cap across the motor terminals, as close as possible to the motor.

this puzzles me, I remember such a thing is usualy done to filter voltage spikes, but could these really affect the encoder, or does it serve some other purpose?

Motor voltage spikes may not affect the encoder, but they play genuine havoc with, and can even destroy, any electronics to which the motor winding is connected. The capacitor and for one directional motion a diode are usually necessary.