Op Amp Auto Gain with Arduino and a Digital Potentiometer

Published at : 23 Dec 2025

Using the X9C series of digital potentiometer with Arduino, I adapted another project using an op amp where I was able to manually change the gain in software using push button controls.

Now I can choose a target gain threshold and have the system auto calibrate the gain until the input signal is amplified or attenuated to the desired level.

This can be useful for auto-calibrating a sensor interface to apply customized gain on various sensors without needing unique dedicated hardware for each one.

Sketch: https://github.com/GadgetReboot/Arduino/tree/master/Uno/X9C_OpAmp_Gain_Control

Original X9C digital potentiometer op amp gain project:
https://youtu.be/XdbXkEkS0mc

More on controlling the X9C digital potentiometer with Arduino:
https://youtu.be/KqBruMXQjmA

Patreon: https://www.patreon.com/gadgetreboot
Pinterest: https://www.pinterest.ca/GadgetReboot
Twitter: @GadgetReboot https://twitter.com/gadgetreboot