The IR sensor detects a reflective surface once per rotation. Arduino measures the time between detections, calculates RPM, and displays it on the LCD. If RPM exceeds 3000, the buzzer sounds an alert.