The receiving IR diode is connected directly to the 5V digital output, and a potentiometer can be used to control the sensitivity (distance between the object) to which the receiving diode is responding. The module is powered by the Arduino 5V, it is also used to deliver a transmitting IR diode that emits light permanently at 38 kHz at a wavelength of 950nm / 940nm (depending on the diode used). The module is available from resellers (Aliexpress and others) under the name KY-032, respectively obstacle sensor. There are several versions, I used the first version, which is designed very easily.
The sensor responds to an obstacle at a certain distance (set by a potentiometer) 2-40 cm. When an obstacle is detected, a 5V signal is applied to the output of the module processing Arduino. One of the (i) advantages of IR diodes is that light can reflect from shiny surfaces. That is, the shiny surface is detected at a shorter distance than the matte surface. This made me think of using this sensor differently as a tachometer. On the matte surface ̵