Strange voltage offset and low sensibility on the analog input

Hi, guys. First, sorry for any language errors (I'm brazilian).

In my project, I intent to measure voltages from a photodiode (properly coupled with a CA3140 op amp). The problem is a difference of measures between the analog pin and the oscilloscope. Because there is a stepper motor in the box, I now there is some sort of noise. Then I've already shielded the amplification circuit using aluminum foil. Noise is currently controlled, but the analog pin reads about 1.2 V even with very low illumination. The oscilloscope reads less than 100 mV.
With certain illumination, the oscilloscope reads the maximum allowed for the positive rail (about 3 V), but the analog pin reads less than 1.5 V. I have no idea what's going on.

Obviously, the stepper is powered externally with 12V. This power supply is still conected with my Arduino Uno, and I use the USB for send commands via serial and debug readings. Oh, I've conected both grounds of Arduino and external power supply.

Any suggestions about this?

Show us a schematic and picture of your circuit.

Oh, sorry for that. Here're the schematics.

I actually don't know the schematics of the trigger, but this purpose is generate a electrical spark (using a coil). This circuit is powered with about 3 V. The nebulizer is powered with 5 V.

It sounds to me like either a grounding problem or a problem with the code used to read the analog pin. Can you post your source code?

PS - which 5V supply is the op amp powered from: the Arduino +5V pin or the 7805? Try powering it from the Arduino +5V pin, and try connecting the op amp circuit grounds (all 3 of them in your schematic) direct to an Arduino ground pin that is not used for anything else.

The op amp is powered with 5 V Arduino pin and I've conncected its ground to external source ground. All componentes are close to each other. I wonder if my Arduino still affected by some kind of interference. I know the ground loop is killed because I can turn on or off all components perfectly. Later I'll post my code :slight_smile:

With the 100k ohms in series with the op amp output, the Arduino might form a voltage divider that makes a different result from the oscilloscope. Add a unity gain opamp to buffer the output.

The photodiode is in reverse direction to drive the op amp - input lower for more light.

If the op amp does not allow rail to rail operation the inputs may be at voltages that are too close to the power supplies.

What value is R2?

The pot may be controlling the circuit, without the photodiode controlling it. Try reversing the diode. Try not grounding the + input, use a voltage that matches the expected bias point of the - input under open loop conditions.

R2 = 10 Mohms.

Oh, the photodiode is already reverse biased (schematic error).
In fact, this op amp isn't RRO. Unfortunatly, here in Brazil is too dificult purchase good op amps.
Well, it's strange my multimeter reads same "offset" voltage.
AmbiLobe, even if I low the impedance with a buffer doesn't make difference, I'll try add bias voltage.

With R2 at 10 mega ohms the gain is very high. Also, you did not put aa resistor from the diode to the - input of the op amp.

Try this: make the feedback gain be -100. To do that, put a 100k ohm resistor from the diode to the - input of the op amp.

10Meg/.1meg = 100 = -gain

Bias the + input to 1 volt or to a voltage that the op amp will operate at. I did not read the spec on the op amp. Find out any limitation on the input voltage range.

I've set R2 to this value because less values doesn't give sensibility necessary for my purposes. Is there issues if I choose a very high gain?
A resistor before the inverting input? Why?

"I've set R2 to this value because less values doesn't give sensibility necessary for my purposes. "

10 Meg is a good value.

"Is there issues if I choose a very high gain?"

Yes. A gain of 100,000 will make the output a digital 1 or 0. The output will not be seen in the middle voltage unless exceptional conditions occur.

"A resistor before the inverting input? Why?"

For a negative feedback op amp, the new resistor is standard operating procedure. It allows the - and + inputs to become equal in voltage to each other so that linear operation is achieved.

I see. An electric engineer told me to use the schematic above for amplification. It's make use of this standard configuration, a transimpedance or current to voltage amplification.

That's why my question. I don't see where I put the other resistor exactly.

I looked at the data sheet for your CA3140 op amp...

The power supply Vcc minimum is 5.0 volts : that is what you use. Good.

The input voltage allows the 0v input, so your 0v on + is good.
(Common Mode Input Voltage range -0.5 to 2.6v when Vcc=5v)

This may be a problem: the maximum voltage at an input is 2.6 volts.
(Common Mode Input Voltage range -0.5 to 2.6v when Vcc=5v)

This op amp allow inputs at -0.5 volts, so your circuit is good there.

Make sure you circuit does not put more than 2.6 volts on the - input.

"That's why my question. I don't see where I put the other resistor exactly".

Put it at the - input, where it says "IB" at the negative input to the op amp.

AmbiLobe, can I use a resistor less than 10k (like 4k7) instead of add a "buffer" configuration?

Pianco, your circuit is OK as it is. You are using the op amp as a transimpedance amplifier, so you don't need an input resistor. Whether 10M is too high a value for the feedback resistor depends on how sensitive the photodiode is, and how much light will be falling on it.

Pianco:
The op amp is powered with 5 V Arduino pin and I've connected its ground to external source ground.

What do you mean by your "external source ground"? If it's the same Arduino ground pin used to connect output devices and/or external power, then the shared ground wire may carry noise. That's why I suggested dedicating a ground pin to the op amp circuit. All the same, the discrepancy you are seeing is very high to be accounted for by ground noise alone.

AmbiLobe:
With the 100k ohms in series with the op amp output, the Arduino might form a voltage divider that makes a different result from the oscilloscope. Add a unity gain opamp to buffer the output.

Not necessary. The Arduino ADC input resistance is 100Mohms typical. It is true that you can get crosstalk issues between different analog input pins when you use a source resistance >10K (due to the lack of provision for more than the minimum possible sample-and-hold time in the analogRead function), however your 1uF capacitor between the input pin and ground will avoid any such issues.

dc42:
What do you mean by your "external source ground"?

This is the ground of external power source (ajustable voltage supply, 12 V), but in my final design I'll use a 12 V battery.

It seems the ground of oscilloscope is somehow affecting the circuit (or it shouldn't). But also there's some dark current in the photodiode that's supposed to be amplified.

How I perform such dedicated ground to op amp circuit?

Edit: I've solved this problem. USB still powering Arduino even with external source. Then the ground of USB and the external source wasn't connected, generating some current. Strange, it's supposed to Arduino Uno change the suply automatically, but it is not what happen.

The question is now how I can use Serial Communication with the cable without power the board...