cancel
Showing results for 
Search instead for 
Did you mean: 

Unexpected Gain in OPAMP_PGA in G431

HDaji.1
Senior

I am testing Examples/OPAMP/OPAMP_PGA/ in G4 package code, only to find the gain is not consistent as showed below:

0693W00000GWAeJQAX.jpgThe OPAMP input values are 0.01,0.03, ..., 0.15, and gain is 16.

However, I measured output at ADC side, the gain drops significant as input values increase.

What went wrong?

1 ACCEPTED SOLUTION

Accepted Solutions
Igor Cesko
ST Employee

Hi HDaji.1 ,

I have verified the example "OPAMP_PGA" - with small modification to input values (not sinewave waveform used in RAM but DC voltage in RAM). I used OPAMP input voltages (DAC output to OPAMP input) below 120mV to not overload the OPAMP output (120mV * gain16 = 1.92V). I have tested gains 2 .. 16 and all gains are correct.

I have tested voltages from DAC: 120mV and 12mV. For 12mV I have tested also gains 32 and 64. All gains are correct. I have measured OPAMP input and output voltages by multimeter. I have used DAC without output buffer to be able to reach such low voltages on DAC output (because DAC with buffer is not rail to rail). From measurement I determined that the OPAMP offset is about -1.5mV (no offset calibration used). This offset influences a bit the output voltage (because gain amplifies also offset) - because offset is added into input voltage.

Please measure in your configuration OPAMP input and output by multimeter/voltmeter - to determine exactly the correct gain values (oscilloscope is not precise for such low voltage measurement). If gains are correct then the problem is in ADC sampling the OPAMP output. Minimum sampling tine for OPAMP output is (according datasheet) 200ns.

Regards

Igor

View solution in original post

20 REPLIES 20
TDK
Guru

How is the output connected and how are you measuring it?

If you feel a post has answered your question, please click "Accept as Solution".

I connect a DAC voltage source to PA1 (OPAMP3_VINP), and OPAMP output pin PB1 to ADC input pin PC0.

The voltage source has been verified with scope and ADC readings separately without any problem.

Maybe overloaded opamp output. Is there anything connected to it? Do the ADC readings match measured voltage? Try increasing ADC sampling time.

JW

HDaji.1
Senior

There is no load connected to opamp output pin, other than ADC input pin.

My ADC sampling time is ADC_SAMPLETIME_2CYCLES_5, which I guess is the fastest already, isn't it?

Piranha
Chief II

> Try increasing ADC sampling time.

> is the fastest already

Read and rethink again...

changing sampling time does not help.

Looks like somebody reported similar issue one year ago, but with another type of board.

The annoying part is that there is no response from ST.

Igor Cesko
ST Employee

Hi HDaji.1 ,

I have verified the example "OPAMP_PGA" - with small modification to input values (not sinewave waveform used in RAM but DC voltage in RAM). I used OPAMP input voltages (DAC output to OPAMP input) below 120mV to not overload the OPAMP output (120mV * gain16 = 1.92V). I have tested gains 2 .. 16 and all gains are correct.

I have tested voltages from DAC: 120mV and 12mV. For 12mV I have tested also gains 32 and 64. All gains are correct. I have measured OPAMP input and output voltages by multimeter. I have used DAC without output buffer to be able to reach such low voltages on DAC output (because DAC with buffer is not rail to rail). From measurement I determined that the OPAMP offset is about -1.5mV (no offset calibration used). This offset influences a bit the output voltage (because gain amplifies also offset) - because offset is added into input voltage.

Please measure in your configuration OPAMP input and output by multimeter/voltmeter - to determine exactly the correct gain values (oscilloscope is not precise for such low voltage measurement). If gains are correct then the problem is in ADC sampling the OPAMP output. Minimum sampling tine for OPAMP output is (according datasheet) 200ns.

Regards

Igor