Photoelectric sensor TRCT5000 and fast moving, small object


I have wired up a TRCT5000 photoelectric sensor to an Arduino nano.
I have pulled out the two diodes of the sensor board and placed them in a casing facing each other with about 10mm gap between them.
While the sensor diode is receiving IR-light nothing should happen, when the IR-signal gets interrupted an LED strip should flash once for 40ms.
So far it is working quite fine, if I for example move a pencil quite fast through the gap between the diodes the LEDs flash like they should.
But for the actual application the photoelectric sensor should detect a 6mm diameter sphere moving about 90m/s, which is not working. I already tried maxing out the baud rate (see code below), which made me able to detect the 6mm sphere falling through the sensor.
Is this configuration actually able to detect such a fast moving object or do I need other components?

Thank you very much

const int pinIRd = 8;
const int pinIRa = A0;
const int pinLED = 9;
int Trigger = 1;
int IRvalueA = 0;
int IRvalueD = 0;

#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
 #include <avr/power.h>
#define LED_PIN    4
#define LED_COUNT 15
Adafruit_NeoPixel strip(LED_COUNT, LED_PIN, NEO_GRB + NEO_KHZ800);

void setup() {

  #if defined(__AVR_ATtiny85__) && (F_CPU == 16000000)

  strip.begin();    ;           

void loop() {
  IRvalueA = analogRead(pinIRa);
  IRvalueD = digitalRead(pinIRd);

  if ((IRvalueA > 30) && (Trigger == 1)){ //IRvaluaA output ~25 in idle

  //Turn on
  for (int i=0; i <= LED_COUNT ; i++){

  //Duration on

  //Turn off
  for (int i=0; i <= LED_COUNT ; i++){
  Trigger = 0;

if (IRvalueA < 30){
  Trigger = 1;

Can you post a schematic, not a frizzy thing. It appears the A/D cannot keep up. A large part of ;your problem could be mechanical alignment if the A/D is keeping up. If you have a scope measure the pulse width and let us know.

Solved it already thanks to the German Community on this board. I got it to work with an interrupt reading the digital output of the IR-module.

Can you share the circuit diagram of it. The projects look great 7 Most Commonly used Types of PCB (Printed Circuit Board) - The Engineering Projects