This circuit is used to:
- Read an encoder output and level shift it to 3V3 from 24V;
- Convert a 0-10V input signal to 0-3V3;
Both points 1 and 2 should be usable at the same time. Point 2 works correctly while point 1 has a strange output with a "notch".
Here's the schematic:
In both tests where GND is connected with GNDS and where not, there's no noticeable difference.
What oscilloscope is reading:
- A capacitor on R6 doesn't make any difference.
- A capacitor of between pin 2 and pin 3, create a sinusoid when signal should be low, even 1pF.
- I can remove this "notch" by adding a capacitor between R58 endings of about 22pF and this solves my encoder problem, but then the 0-10V conversion doesn't work anymore because a fixed input voltage is converted to a sinusoidal output.
I've double checked the power supply and ground of my board. I have a decoupling capacitor near the amplifier, a solid ground plane under it, GNDs via near each ground point on schematics. Also a clear +24V square wave, generated by a lab equipment, on amplifier input pin.
Another test I've done is to change MCP634 with a similar one, but nothing changed (just slew rate.)