U2---Infrared pair tube
R9---LED current limiting resistor in infrared pair tube
R10--Photosensitive transistor in infrared pair tube The collector resistance
The LED emits infrared light. When the phototransistor receives it, it will be turned on, otherwise it will be turned off. There is a light-shielding film in the part where the speed needs to be measured, which is blocked once per revolution or a specified number of times, so that the speed becomes a pulse signal of a certain frequency.
Q3---transistor
R12--base resistance of Q3
R8---collector resistance of Q3
Q3 plays the role of signal amplification and shaping, making the signal easy to read by the microcontroller.