element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
    About the element14 Community
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      •  Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Community Hub
Community Hub
Member's Forum Programable Gain Amplifier
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Leaderboard
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Community Hub to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 11 replies
  • Subscribers 595 subscribers
  • Views 240 views
  • Users 0 members are here
Related

Programable Gain Amplifier

scottiebabe
scottiebabe 3 days ago

I have a project where I am in need of a amplifier with digitally adjustable gain.

There are many ways to construct a variable gain amplifier, one solution involves using a digital potentiometer in the negative feedback path around an op-amp.

A simplified schematic is shown below

image

Image sourced from Application note: ww1.microchip.com/.../01316A.pdf

The closed loop gain of the amplifier is now a function of the digiPOT’s wiper position:

image
Table for an 8-bit digiPOT, table 12 for a 7-bit device is full of mistakes

Half of the wiper codes map to closed loop gains between 1 and 2. There isn’t a lot of choice for larger gains after a gain of 64 then next available choice is 128.

Pretty Neat! I don’t happen to need more than 20 kHz of bandwidth, so finding an op-amp with a gain-bandwidth product greater than 20kHz*128 = 2.6 MHz is not a problem.

Breadboard

It just so happens I have some digital potentiometers laying around.
Specifically, the Microchip MCP4131 digital POT, which has 7-bit resolution and a total ladder resistance of 10k.

https://ww1.microchip.com/downloads/aemDocuments/documents/OTH/ProductDocuments/DataSheets/22060b.pdf

I also have some Renesas ISL28291 dual-opamps.

Both have been sent to me by element14 (and the cool breadbroad, thanks element14!)

I tossed them onto a breadboard and used a RPI pico to interface with the MCP4131 (github.com/.../main)

image


Just like a rotary potentiometer the digiPOT has 3 terminals: A, B, W

image

Instead of a having a continuous resistance track and a movable wiper contact, the digi pot has 128 small resistors in a series string and an analog mux that can select any of the 129 tap points.

If you apply a fixed potential across the A and B terminals, then with the wiper to set to mid-scale code, the output voltage is half the input. At a wiper code of 0, ideally the wiper voltage should be 0 (unfortunately due to the resistance of the terminal disconnect switch it slightly greater than 0).

User beware, behavior at the extreme tap-points is worse than advertised.

At a wiper code of 127, I measured a gain of 80x instead of the ideal value of 128x. Disappointing.

There also isn’t a lot of ‘gain resolution’, the previous wiper code of 126 provides an ideal gain of 64x.

Compounding 2 for more gain and resolution

To achieve a higher total gain and have more gain steps to choose from, I put 2 in series.

image

Now with 2 stages, there are 5363 unique gain values.

image

The vast majority of the unique gains are below 50 dB. Above 50 dB there are 55 unique gain values.

Here is a scopeshot of the PGA cycling between a gain of 1 and 6

image

The brief excursion on the scope plot is python being slow, micropython takes its sweet time between the spi write of the first and second digiPOT.

image

In summary, I am pretty happy with the dynamic range of the amplifier. The amplifier can be programed to provide gains of anywhere between unity and 10000x with 20 kHz of bandwidth and an input referred noise of approximately 3nV/rootHz.

Not bad for parts I had laying around. All the big name semi’s have PGAs with lower noise and more bandwidth all integrated within a single IC for reasonable prices. So, if you need one, you can shop around for a pre-engineered solution. 

  • Sign in to reply
  • Cancel

Top Replies

  • dang74
    dang74 2 days ago +4
    scottiebabe said: At a wiper code of 127, I measured a gain of 80x instead of the ideal value of 128x. Disappointing. Well on the bright side, for that one setting you made a decimal to hexadecimal converter…
  • michaelkellett
    michaelkellett 2 days ago +3
    For reasonable performance the amplifier needs a GBw product greater than 5 x max gain after feedback x working bandwidth. Your ISL29291s are fine (having Gbw of 60Mhz.). I'm impressed how well it works…
  • wolfgangfriedrich
    wolfgangfriedrich 1 day ago +2
    I am very interested in ultra-low noise opamps. I might plug this circuit into LTspice to see if the INOISE really lands close to 3nV/rtHz.
Parents
  • BigG
    BigG 1 day ago

    Your post has been enlightening. I recently learnt the hard way the importance of designing for capacitive loading when it comes to high sensitivity opamps - A case of RTFM... I failed to read the TSZ1x datasheet's specific section on this... tricky to solve too. I hadn't considered the Renesas options before and they're looking much better at dealing with capacitance. TSZ1x amps are also 400kHz GBW.

    image

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • BigG
    BigG 1 day ago

    Your post has been enlightening. I recently learnt the hard way the importance of designing for capacitive loading when it comes to high sensitivity opamps - A case of RTFM... I failed to read the TSZ1x datasheet's specific section on this... tricky to solve too. I hadn't considered the Renesas options before and they're looking much better at dealing with capacitance. TSZ1x amps are also 400kHz GBW.

    image

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
Children
No Data
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2026 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube