How to connect analog output of FS-N11MN Fiber Optic sensor to Arduino

Hi,

I am trying to get my FS-N11MN Fiber Optic sensor, which is an intensity-based sensor, to Arduino uno in order to get digital voltage value. I have already set up the circuit for the sensor trough an AC to DC converter and a relay as shown in the picture. Now, I am trying to connect the orange wire of the sensor, which is the analog output wire, to Arduino in order to get the light intensity change in voltage. I have posted the code that I am using for this purpose below, which is pretty simple. However, the serial monitor is sowing millions of values. I have connected the analog output wire of the sensor to pin A0, and grounded the Arduino to sensor's -V. Can you please let me know what I am doing wrong here in case of wiring and/or coding?

void setup() {
// initialize serial communication at 9600 bits per second:
Serial.begin(9600);

}

void loop() {
// read the input on analog pin 0:
int sensorValue = analogRead(A0);
// Convert the analog reading to a voltage (0 - 5v):
float voltage = sensorValue * (5.0 / 1023.0);
// print out th value you read:
Serial.println(voltage);

}

Fiber Optic Schematic.JPG

Fiber Optic Schematic.JPG

MW.jpg

Op's pictures, so we don't have to download them:
Fiber Optic Schematic.JPGMW.jpg
I assume there's an Arduiino at the end of one of the wires. :confused:

Why do you think the values you are getting are wrong? They might be right. This is an amplifier module
so will have noise.

Have you checked the values you get against a multimeter?

Thank you for the reply. No, I haven’t checked the output using multimeter. I will try that also. And yes it looks like it contains extreme noise. The values on the monitor screen changes in a very very fast pace that it is not possible to even read a value. Do you know how I can reduce the noise?