I can confirm that the light sources above the sensor is stable, but the returned values on analog pin 0 are oscillating between 0-3 somewhat periodically (report interval is 1000ms):
1.86 V
2.02 V
2.17 V
2.29 V
2.31 V
2.33 V
2.33 V
2.34 V
2.34 V
2.29 V
2.24 V
2.20 V
2.14 V
2.08 V
2.01 V
1.94 V
1.83 V
1.57 V
1.27 V
1.04 V
0.85 V
0.69 V
0.54 V
0.42 V
0.37 V
0.33 V
0.30 V
0.28 V
0.32 V
0.42 V
0.47 V
0.53 V
0.59 V
0.65 V
0.73 V
0.80 V
0.88 V
1.14 V
1.44 V
1.68 V
1.87 V
2.03 V
2.19 V
etc...
I have tried this sketch at 5V as well to see if there is an issue with the board's power stability, and yet the result is the same. As a sanity check I disconnected analog 0 and can confirm that the reported voltage is 0.0.
Does this suggest something wrong with the sensor itself? Anything else I can try?
Well acording to your code the report interval is just over 100msec.
delay(100);
The module DOES use very low currents - but is buffered by an op amp so the output impedance is low and it will not be significantlty affected by interference if the leads are reasonably short.
The obvious first step in fault finding is to remove the sensor and put a potentiometer across the supply rails with the slider to the analog input - and a capacitor to ground.
Also you are sampling near a subharmonic of mains frequency, so a different update time may help - you may have to experiment with that.
I can confirm that the light sources above the sensor is stable