enter image description here

Hi, I'm feeding a 500 Hz PWM signal to the Op Amp's V_IN using Arduino DUE.

The Op Amp, which is ADA4000-2 from Analog device, is connected to +12V, -12V using an external power supply.

The power supply's GND is also connected to Arduino's GND.

The R1 part is replaced with a potentiometer to adjust the gain and R2 = 10k Ohms.

The signals from Vout were amplified as I expected.

However, I wanted to read the gain using my Arduino, maybe using the ADC, and print that out using the serial UART.

What methods or circuits should be used to get the Op Amp's gain?

I'm curious this both works for inverting/non-inverting case.

Thanks for your help!


2 Answers 2



simulate this circuit – Schematic created using CircuitLab

You can try this circuit. Thanks to voltage follower your output signal doesnt has distortion when read output signals. Also there is voltage divider because output signal level can damage your arduino. Maximum output signal level is 12V and voltage divder can reduce this level to 4V. So your arduino doesnt damage from signal high signal level. Your gain is ADC Value * 3 /1024. Your R1 values is (gain -1)*10k. Note: You must use pwm for input signal. Otherwise output signal maybe has negative value and this can damage your arduino.


As the input to op-amp is known, either the output can be measured with the ADC to calculate gain, or the potentiometer can be changed to a dual-gang pot to measure the position of the pot.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.