I need to measure input voltage by 16bit ADC with 2.5 V reference. There are two different input voltage levels: 0 - 100 mV and 0 - 30 V. I designed the circuit below which should work in the following way:
- Range 0 - 100 mV: Optocoupler OK1 is off and OK2 is on, so that input voltage flows via resistor R1 to op amp which works as non-inverting amplifier with gain 25.
- Range 0 - 30 V: Optocoupler OK1 is on, so that resistors R1 and R2 form a voltage divider. The optocoupler OK2 is off, so that op amp has only 24k resistor in the feedback and works as voltage follower.
My problem: When I select the range 0 - 30 V, the output is very noisy. When I sample it by 16bit ADC, the noise is several hundreds of ADC divisions. Also I noticed the bigger is the input voltage, the bigger is the output noise. When I replace R3 by 0R, the noise is gone, but the circuit is not able to measure the second voltage range :(
EDIT: I switch the circuits by optocouplers, but I could not find them in the schematic editor, so I drew MOSFETs instead.
Thank you for suggestions. Klasyc
simulate this circuit – Schematic created using CircuitLab