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:
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?
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
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."
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?