fluorometer reading problems

Hi,

Im building a fluorometer using the Arduino UNO. Im 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 dont make any sense. Random fluctuations nothing stable, nor correlating with light levels.

Reading simultaneously using the meter and the monitor show completely different results as well, with the multimeter being the more expected result. I attached my code and circuit.

My Code which reads the input from the photodiode and prints every 1 second:

#define inPin0 0

void setup(void) {
  Serial.begin(9600);
  Serial.println(); 
}
void loop(void) {  
  int pinRead0 = analogRead(inPin0);
  float pVolt0 = pinRead0;
  Serial.print(pVolt0*5/1023);
  Serial.println();
   
  delay(1000); 
}

Screen Shot 2016-11-15 at 12.39.24 PM.png

Normally, you would use a transimpedance amplifier, if you want accuracy in reading a photodiode (as shown below).

Please post a circuit diagram, showing your present setup (hand drawn, not Fritzing).

what happens if you put say a battery on the ad input ?Does it read ok.

jremington:
Normally, you would use a transimpedance amplifier, if you want accuracy in reading a photodiode (as shown below).

Please post a circuit diagram, showing your present setup (hand drawn, not Fritzing).

I uploaded the circuit diagram as an attachment on the original post, my apologies for not directly showing it on the post. It uses a transimpedence amplifier that you suggested.

If the readings aren't stable, there is something wrong with the ENTIRE circuit, which includes the connection to the Arduino. Did you connect the grounds?

Your circuit shows a -5 supply. It is possible you have had an accident while connecting up and damaged the input.

As jremington suggets whole circuit or possibly post a photograph.

Here is the circuit im using.

The reason why Im confused when you say theres something wrong with the circuit, is because im using a lab bench power supply with a voltage divider circuit to supply +5V, -5V, and ground inbetween the two and the circuit works perfectly fine WITHOUT the arduino. The arduino is only being powered by the USB and has the output from the circuit into the analog pin, thats the only thing connected to it.

Stable readings shown on multimeter, unstable readings on serial monitor from arduino

armandave:
Here is the circuit im using.

The reason why Im confused when you say theres something wrong with the circuit, is because im using a lab bench power supply with a voltage divider circuit to supply +5V, -5V, and ground inbetween the two and the circuit works perfectly fine WITHOUT the arduino. The arduino is only being powered by the USB and has the output from the circuit into the analog pin, thats the only thing connected to it.

Stable readings shown on multimeter, unstable readings on serial monitor from arduino

Ground is never mentioned - especially here: "and has the output from the circuit into the analog pin, thats the only thing connected to it."

No circuit posted.

The arduino is only being powered by the USB and has the output from the circuit into the analog pin, thats the only thing connected to it.

So you DID NOT connect the grounds?

There can be terrible problems with ground loops in the house wiring, when the Arduino is powered through a USB connection and the rest of the circuit by a power supply on a different AC branch.

Perfect! Thank you both for the help. Both readings match from arduino and multimeter. If you two have any time, do you mind giving me a sort of explanation? The arduino did not have a reference point for the input voltage from the photodiode to have an electrical difference from and thus the readings were unstable?

Many thanks again!

You have it .

Previously the arduino and circuit had no common ground except throughthe house wiring.

With a pc there may not even be a common ground, especially a laptop.

A related point is that lab supplies are often floating, normally there is a green terminal on the front when required.