connecting IR sensor to read fan rpm

Hi

I have connected a motor to a breadboard with a simple circuit. This is connected to an arduino with a basic program to change the fan speed.

I want record the fan speed (RPM) with an IR LED and a receiver. Could someone help me understand how to create the circuit for the IR LED and receiver and how to connect it with my current circuit.

Thank you very much

Have the IR LED constantly on and shining through the blades. Have an IR phototransistor on other side.

Have a 10k resistor from 5v to the phototransistor with digital read from the junction. When the IR hits the phototransistor the level will be low.

Count the pulses to get speed.

Weedpharma