Fluctuations of OP-amp from Photodiode

Hi guys

I’ve been trying to make a colorimeter with in-built motor to shake the cuvette. I’ve been struggling with noise from analogRead as in “With noise.png”. The noise appear when the wires from the 12V power-supply come near the wires going from my Photodiode to the OP-amp. I’ve tried to connect a 100pF, 400µF capacitor, respectively, to Vin and Gnd or to the two Photodiode wires - with no luck. I’ve also tried having a mosfet to control the current from the powersupply - that didn’t do it either. It is not possible to separate the 12V powersupply wires from the photodiode circuit physically. I can solve the problem by holding a wire, which is connected to Vin-port, with my fingers, but that is not a durable solution.

Can anybody help me? What electrical feature does my fingers have that fixes the noise?

With noise.png

Without noise.png

That is high impedance circuitry, and exposed wires make fine antennas.

Use shielded wire for the leads to the photodiode, and ground the shield at the amplifier end. The amplifier board should be shielded as well (put it in a small tin box) and ground both the box and the amplifier at the Arduino. Keep the detector circuit as far from the motor and power leads as possible.

~3.7volt (A/D ~750) from an LM358 (non-rail2rail) sounds like it's pegged against it's highest output voltage.
Are you sure you got that photo diode circuit right.
Do you really need an op-amp for that.
Leo..

I think the op amp (+) input should be biased
up to a positive voltage, not left floating.
Herb

That op amp has way too high an input bias current to be using a 5M feedback resistor. That will produce a huge DC offset at the output.

herbschwarz:
I think the op amp (+) input should be biased
up to a positive voltage, not left floating.
Herb

The non-inverting input of the opamp should be grounded in this circuit. Opamps always need bias.
In low light the output voltage should be zero.

The image on this page shows the basic photodiode circuit:

https://www.analog.com/en/technical-articles/optimizing-precision-photodiode-sensor-circuit-design.html

And yes there are far better opamps for this than the LM358.

And, as with most application notes, the power supply
is not shown. It is assumed to be + and - of equal
voltages.

jremington:
That is high impedance circuitry, and exposed wires make fine antennas.

Use shielded wire for the leads to the photodiode, and ground the shield at the amplifier end. The amplifier board should be shielded as well (put it in a small tin box) and ground both the box and the amplifier at the Arduino. Keep the detector circuit as far from the motor and power leads as possible.

I covered about 90% of the leads and haven't covered the OP-amp yet and it helped a little. I'll try to do the project completely and see if it works!

MarkT:
The non-inverting input of the opamp should be grounded in this circuit...

And yes there are far better opamps for this than the LM358.

My mistake, the non-inverting input is grounded - should have included that in the schematic.

What OP-amp do you recommend for such a project?

should have included that in the schematic.

Please post a correct, hand drawn schematic, with correct component values and pin numbers. Don't waste your and our time drawing one on a computer.

shayfone:
What OP-amp do you recommend for such a project?

What project.
Do you want us to guess most of it?
Leo..

Wawa:
What project.
Do you want us to guess most of it?
Leo..

What do you mean, Leo? What OP-amp do you recommend to replace the LM358P? I've found a MCP6241-E/P - has a 20pA of input bias current.

You need to START your post with the photo diode DATASHEET !

What do you mean, Leo?

Let me guess the basic question:

What the h*ll is "a colorimeter with in-built motor to shake the cuvette" and how and why is it supposed to do whatever it does? And why have you not posted the correct schematic, with components identified?

colorimeter

cuvette

turbidity

My guess is that OP wants to make some sort of turbidity sensor.
Leo..

Here we go again with "20 Questions"

shayfone:
What do you mean, Leo? What OP-amp do you recommend to replace the LM358P? I've found a MCP6241-E/P - has a 20pA of input bias current.

The main problem with the LM358 is output swing,
but you might be able to correct that by changing Aref of your (unspecified) Arduino.
(Fritzing toddler art is rarely what it really is).

You should change that anyway, because the photodiode/opamp requires an absolute/voltage A/D.
Not seen any code yet (inside code tags), and no mentioning of hardware, so no recommendation yet.
Please read the "How to post" sticky.
Leo..