Sensor for detecting an occlusion, race track toy

Hi,
I'm working with a race track toy similar to this:

I need a sensor that detects when the toy car go beyond a finishing line:

The sensor must have an high detection frequence, about 5 milliseconds or best (preferably 2 milliseconds or best).

Which kind of sensor can I use?

That will not tell you which car crossed first though.

Boardburner2:
Overview | IR Breakbeam Sensors | Adafruit Learning System

That will not tell you which car crossed first though.

Although if space permits you could have one pair per lane

Put them vertically, one in each track.

Alignment will be critical if you need great accuracy.

Weedpharma

One 360° IR source between the tracks and individual sensors outside each track. Position sensors with carpenters square aligned with track edge. Connect each to an interrupt then read system millis() or micros() on trigger. Lowest number wins by time difference of the two readings.

Thanks all :smiley: