I am trying to read a quantum light sensor (spec sheet: http://goo.gl/R7mfm). Since the photodiode already has a built in resistor of 604 Ohms, I think I am limited to measuring the forward voltage (i.e., I cannot reverse bias the diode without modifying the sensor cables), correct?
When I hook it up to measure the voltage by reading one end of the sensor through an analog pin (as in Fig 1 here: http://goo.gl/7kL5H), I get values which jump around and do not respond to changes in light. I have tried adding additional resistors (up to 500k) across the sensor but this does not make any difference. Any assistance on how to correctly read this type of sensor would be appreciated. My code is below.
int lightPin = 5; //define a pin for Photo resistor
const int reads = 4;
float light[reads];
float lightTot = 0;
float lightAvg = 0;
void setup()
{
Serial.begin(9600); //Begin serial communication
for (int i = 0; i < reads; i++){
light[i] = 0;
}
for (int i = 0; i < 19; i++){
pinMode(i, OUTPUT);
digitalWrite(i, HIGH); // turn on pullup resistors
}
}
void loop()
{
lightTot = 0;
for (int i = 0; i < reads; i++){
light[i] = analogRead(lightPin);
Serial.print(light[i]);
Serial.print(", ");
lightTot = lightTot + light[i];
delay(500);
}
lightAvg = lightTot / reads;
Serial.println();
Serial.println("AvgDio: ");
Serial.println(lightAvg);
}