Transimpedance amplifier inconsistent reading

I'm building a brightness meter using the Arduino UNO. I'm reading the output of the photodiode using a multimeter and getting good stable readings. Increases with light, decreases with less light as it should. But when I try reading with the Arduino serial monitor, the readings don't make any sense. Random fluctuations nothing stable, nor correlating with light levels.

int sensorPin = A0;    // select the input pin for the potentiometer
int sensorValue = 0;  // variable to store the value coming from the sensor
float temp = 0;

void setup() {
  Serial.begin (115200);
  analogReference(DEFAULT);
}

void loop() {
  // read the value from the sensor:
  sensorValue = analogRead(sensorPin);
  temp = (analogRead(sensorPin) * 5.0)/1024;
  Serial.println(temp);
  // stop the program for 1000 milliseconds:
  delay(1000);
}

I'm attaching the schematics as well.

Thanks a lot,

Where is the photodiode?

Fluorescent lights? They flicker faster than your eye can see. Some LED lights may also flicker... but probably at a higher frequency but still not too fast for a photodiode.

Your meter will tend to smooth the readings but with the Arduino you'd have to add that to your hardware or software. (And the delay will "kill you" if you are just reading one flickering sample per second.)

1 Like

Why the useless delay?

The photodiode is the 'D1'

So I have to smooth it on the software? Like averaging for 1 sec all the readings?

Push a number 103 cermaic cap into Aref and gnd.

Use a software filter like

or

I found a 1M resistor works a bit better and reverse bias the photodiode but then again I did not use a preamp.

Okey. The symbol for a photo diode is usually a diode with and a flash arrow pointing to it as I remember....
Suppose You have used a good application note.
As @DVDdoug DVDdoug says, other light sources likely interfere.

Thank you! Going to take a look into it!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.