@Gustav great progress. Thanks for data sheets too - sorry I didnt spot them in your second post.
Part numbers
Phototransistor is PT333-3B,
important characteristics are
dark current 100nA &
On State Collector Current 3mA
Emitter is 5mm Infrared LED,T-1 3/4IR333C/H0/L10
important characteristics are
Forward voltage Vf = 1.4V at If = 20mA
Lets get the idea working first and deal with any problems as we meet them.
You need to drive your LED with a square wave from the NANO. An output pin can provide up to 40mA max but lets just go for 20mA. Vol is about 0.7V at 20mA and Vf for the diode about 1.4
so we have 5V -(0.7 +1.4) = 2.9V left and 2.9V 20mA = 150 ohms
If the phototrans is passing 3mA when the LED is ON then you need 3mA 5V = 1k6, 2k2 or so
schematic looks like this

run the program and tell us the high and low value readings
/* copied from arduino examples
Blink - Turns on an LED on for one second, then off for one second, repeatedly.
AnalogRead example
This example code is in the public domain.
*/
int led = 4;
int det = A0;
int val = 0; //value from adc
void setup() {
pinMode(led, OUTPUT); // initialize the digital pin as an output.
Serial.begin(9600); // setup serial
}
void loop() {
digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level)
val = analogRead(det); // read the input pin
Serial.println(val); // debug value
delay(1000); // wait for a second
digitalWrite(led, LOW); // turn the LED off by making the voltage LOW
val = analogRead(det); // read the input pin
Serial.println(val);
delay(1000); // wait for a second
}
