Photointerupter

Can someone tell me how to use this sensor to measure rpm on a stepper motor. Specifically I would like to know how this sensor works and how to connect the 4 pins from the sensor to my arduino. I have attached the data sheet for a similar sensor (i think).

1.http://i1062.photobucket.com/albums/t494/xan213/100_5040.jpg

  1. http://i1062.photobucket.com/albums/t494/xan213/100_5046.jpg

3.http://i1062.photobucket.com/albums/t494/xan213/100_5050.jpg

xan213:
Can someone tell me how to use this sensor to measure rpm on a stepper motor. Specifically I would like to know how this sensor works and how to connect the 4 pins from the sensor to my arduino.

I think that once you know how to connect and read the sensor, the rest will follow.

I have attached the data sheet for a similar sensor (i think).

Where?

The 4 pins probably comes in pairs. Two of them is for the emitter (arduino +5 -> resistor -> arduino ground).
One of the other two is the output from the sensor .. but you'll have to look up what else. It's not unusual that the sensor can take a higher voltage than the +5 arduino.

Look at SFE: Photo Interrupter - GP1A57HRJ00F - SEN-09299 - SparkFun Electronics
there is data sheet, though may be not exactly the same, but don't think they differ much.
And more on software (advanced level ?) : Wheel Encoder Set - ROB-09209 - SparkFun Electronics

Magician,
The photointerrupter you link to has 5 wires.
You'll be surprised at what you can find on the net:

http://www.datasheetcatalog.org/datasheet/fairchild/H21A1.pdf