The device is small. The white on the photo is the sensor.
I also included images of the layout. The red is the layout of the front. The blue is the layout of the back. The sensor goes in the 6 pin slot.
Could the oscillation be associated with something inside the opamp. This opamp allows inputs below the rail so it probably has a charge pump to create a negative voltage. Could there be an interaction with the charge pump causing the oscillation. If so how would I eliminate it.
No, it just has a PNP-type input stage. Many op-amps (e.g. LM358, LM324, and many current ones) have input ranges that extend a few hundred mV below the 0V rail. It doesn't have a charge pump, but I'm not saying that it's not oscillating. I couldn't say.
I would like to see an exact, up-to-date, readable schematic of the construction you posted though.
Kris: You had asked for a schematic as the board was originally designed. It is the schematic I posted last night. The previous schematic showed how it was actually tested.
The differences are:
1) The virtual ground is indicated as virtual ground.
2) R4 - the resistor isolating the 3330 from the other capacitances is 1K. I eventually bypassed that with no effect.
3) There was an output cap on the 3330. I took it out with no effect
4) The sensor is not shown. I put a 1 meg resistor between pins 5 and 6 of the connector
"I'm running out of ideas"
Yeah me too. It must be a construction issue or just inherent noise in the circuit. Can you show a scope trace of your noise and show us how and where the scope is connected.
The gain margin listed for that amplifier is 29 dB. I am not at all sure what gain margin means, but I think it means that using negative feedback to get more than 29 dB of gain make the amplifier unstable. Your gain of 500 is 54 dB.
So, the real question is, why are you reducing the signal by a factor of 2000 (1M / 500) , then amplifying it by a factor of 500?
If you really need that much gain, you will have to use more than one stage of amplification.
(a) actually calculating the gain
(b) comparing it to datasheet figures
I will note that in post 11 I pointed out the issue with the voltage divider, and in hindsight this was a big miss on my part in not following that through and paying close attention to the datasheet.
Rich, I note that you have changed the voltage divider ratio and the gain, but I wonder if you shouldn't present an even larger signal to the op-amp. Attenuation followed by amplification is generally not a good thing. I suspect you want a small amount of gain so you can filter out high frequency noise, but I can't put any figures on that.
Also, I have to thank you for posting the images of the board and PCB layout. I pretty much ignored them once I saw it wasn't something on a breadboard with flying leads everywhere. I discounted that as a problem.
I think we've all learned something in this thread.
p.s. I did the attenuation/gain because this eventually needs to run off of a 3.65V battery and I am trying to avoid a boost converter. The 3330 needs 3.2 V, so I only have 0.4 volts left. The datasheet has several examples (figures 48, 52) where the gain is 100 so I thought I was OK.