Research: IR Sensor to catch moving object

Need: Toy racing cars run down a track, and we want to know how fast it takes to get from one end of a 5m track to the other.

Requirements: IR Beam equipment at the Start and End of the track to record the start and finish times. Raspberry PI computer to work out the time comparison and display on a screen. Beam distance is about 20 cm

Learning:

Options:

Parts that might be needed for wire length: