Trouble with phototransistor reading low number at first

So everything works fine with my phototransistor drop detection system except I get this when I run the code:

Welcome to the MultiFlow Lab! :smiley:
Please stand clear for your own safety!
Drop detection starting in…
3…
2…
1!
75
drop detected!

The phototransistor gives me a really low value at first and detects a drop on the first loop iteration?
the phototransistor value is always around 550 and below 500 when a drop falls.

heres the code

int sensorPin = A0; // connect phototransistor to pin A0 on arduino board
int IRLED = 13; // connect the IR LED to pin 13
int sensorValue = 1000; // initialize sensor value
int green = 12; // connect green to pin 12 on arduino board
void setup() {
  // put your setup code here, to run once:
pinMode(sensorPin, INPUT); // input sensorPin
pinMode(IRLED, OUTPUT); // output for IR LED
pinMode(green, OUTPUT); // output for Green LED
Serial.begin(9600);
Serial.println(" ");
Serial.println("Welcome to the MultiFlow Lab! :D");
delay(500);
Serial.println("Please stand clear for your own safety!");
delay(500);
Serial.println("Drop detection starting in...");
delay(500);
Serial.println("3...");
delay(500);
Serial.println("2...");
delay(500);
Serial.println("1!");
}

void loop() {
  // put your main code here, to run repeatedly:
digitalWrite(IRLED, HIGH); // turn on IR LED
sensorValue = analogRead(sensorPin); // read the value from phototransistor
Serial.println(sensorValue); // print the sensor value for user to view in serial monitor

     // go to [ tools > serial monitor ]

  if(sensorValue < 450 ){ // 
    digitalWrite(green,HIGH); // if drop interrupts the infrared light photoresistor is recieving then turn LED on
    Serial.println("drop detected!"); // telling user in serial monitor a drop was detected
    delay(5000); // delay to allow time for surface to move and camera to fire
  }
  if(sensorValue >= 450){ // this is the value if no drop is present
    digitalWrite(green, LOW); // turn green LED off
  }
}

You can sometimes get a more stable result from analogRead() by issuing the command twice and discarding the first result.
You could also experiment with a small delay after switching on the IR led before attempting to sense its status.

It took 18 reads to fix the bug xD

TStolpe29:
It took 18 reads to fix the bug xD

That sounds rather excessive and would imply that you are misusing analogRead() as a sort of delay() statement. Since you don't switch the IR emitter off in the loop(), why not switch it on in setup() then add a small delay after it.

Maybe also post a schematic. Usually an IR emitter / Phototransistor pair react very quickly.