IR infrared emitter and reciever
I should use the forward bias for the emitter led but what should I do for the reciever part?
An IR receiver usually uses a photo-diode or photo-transistor at its input.
A photo-diode that is reverse-biased is fast because the bias reduces its capacitance. Light makes it leak current.
A photo-diode with no bias is a mini solar cell that produces an output when lit.
The collector-base of a photo transistor leaks current when lit and the transistor amplifies it.
A typical position sensor light barrier (e.g. in a printer drive) uses a photo transistor with a several kohm pull-up resistor.
The essential point is that you can avoid extraneous light hitting the sensor. In applications where this can't be guaranteed by design, a modulated light barrier should be considered.
What specs for ;
gap? power avail?
range of RPM, LED block duration minimum time?
ambient light? visible marker?
Modulated light avoid false triggering, you should consider make this general circuit, once it works, then adapt it.
http://www.capacitance-meter.com/Opto.html