Offset Compensation for High Gain AC Amplifiers
By Vadym Grygorenko, Sr. Application Engineer, Cypress Semiconductor
|
A simple solution is proposed to cancel DC offset in high gain AC amplifiers. This solution is based on external DC feedback-coupling. Included with this Application Note is the supporting PC application to estimate amplifier frequency response results. |
Introduction
The typical PSoC™ device application includes
signal conditioning and processing from various
sources. Often, a weak AC signal needs processing.
That signal can be from a microphone, photodiode,
magnetic head, PIR sensor and so on. A Programmable
Gain Amplifier (PGA) User Module is commonly
used for weak signal conditioning. Problems
arise when the desired gain is greater than 100.
This problem is caused by the PSoC internal amplifier
input offset voltage, which may be as much
as 10mV. The amplified offset voltage distorts the
symmetry of the AC output signal and decreases
the dynamic range of successive signal processing
stages (ADC, etc.). The generic solution to this
problem is to use an additional RC-circuit between
two PGAs (see Figure 1).

Figure 1. Typical AC amplifier circuit
The disadvantage of this generic solution is it
requires several PSoC analog I/O pins for analog
ground (AGND) output and for the RC-circuit
between PGAs. To rectify the disadvantage, this
circuit can be modified by adding DC feedback-coupling
between the output and input, which
frees up the I/O pins for other purposes.
Amplifier with DC Feedback
The modified AC amplifier circuit is shown in
Figure 2.

Figure 2. AC Amplifier with negative feedback
This circuit uses only two analog I/O pins (instead
of the four in the generic solution). PGA2 is
replaced by an Inverting Amplifier (AMPINV) User
Module to achieve inverted output as opposed to
input.
This allows the connection of output to input via the
additional RC-circuit to form negative feedback-coupling.
Capacitor C2 suppresses the AC component
of the feedback signal. The DC component
passes from output to input without any changes,
which forms 100% DC negative feedback. This
permits the output DC voltage to be close to analog
ground, independent of the amplifier’s input offset
voltage.
The circuit in Figure 2 seems to be very simple.
Nevertheless, it is not easy to estimate the gain-frequency
characteristic of the whole amplifier due
to frequency-dependent feedback. For analysis
purposes, the amplifier circuit should be slightly
modified as shown in Figure 3.

Figure 3. Amplifier equivalent
The resistor R1 is added, taking into account
the AC signal source output resistance. PGA and
AMPINV coupled in series are replaced by one
equivalent inverting amplifier with gain equal to k.
Using Kirchhoff’s laws and simple algebra, the
frequency-response function for the circuit shown
in Figure 3 can be written as follows:
Equation 1 describes a combination of high-pass
and band-pass filters with the same roll-off
frequency.
In order to facilitate the estimation of frequency-gain
response characteristics at middle frequencies,
a simple PC application was developed.
This application tabulates and plots a frequency
response curve according to Equation 1. The
interface is shown in Figure 4.

Figure 4. PC application
To estimate frequency-response characteristics,
the component values are entered and the
“Calculate” button clicked. All resistances are
expressed in kilohms, capacitors in microfarads.
The “Gain” value is equal to the product of the
gains of the PGA and AMPINV (see Figure 2).
There are no restrictions for selecting component
values. Even so, the roll-off frequency,
(Equation 2), should be set relatively low, less
than 1-2kHz in order to ensure stability of the
circuit. To decrease the resonant peak on the
frequency plot, R4 should be increased.
DC Feedback via Modulator
The amplifier with feedback that is shown in Figure
2 uses two analog I/O pins for input and output.
Occasionally, all analog pins are required for
signal input purposes. In this case, the digital I/O pin
can be used to form the feedback loop. The analog
signal is transferred via a digital pin using the
analog-to-digital modulator on the type C switched
capacitor block. For details on modulator functions,
refer to Application Note AN2041 “Understanding
Switched Capacitor Analog Blocks”. The subsequent
device block schematic is shown in Figure 5.

Figure 5. DC feedback using modulator
The analog signal from the PGA output is routed
to the AD modulator. The modulator converts the
analog signal into a series of digital pulses. The
average value of these digital pulses is equal to
the analog input signal. The SCBlock User Module
parameters to form the AD modulator are shown
in Figure 6.

Figure 6. Parameters for AD modulator
The AD modulator produces digital pulses on
the corresponding analog column comparator bus.
To route this digital signal to the output pin, the
Digital Buffer (DigiBuf) User Module is used. For the
PSoC CY8C24x94 device family, the comparator
bus can directly drive the global output bus without
the Digital Buffer using the Comparator Bus to
Global Outputs Enable register (CMP_GO_EN).
If the digital signal is used for feedback, then inversion
can be performed by either the INVAMP or the
digital row LUT (see Figure 7).

Figure 7. LUT configuration
Important Tip
The incremental and sigma-delta ADC use the
analog modulator as a one-bit, analog-to-digital
converter. Therefore, the ADC’s modulator can be
used to form the compensation feedback signal.
You just need to route the ADC’s comparator bus
signal to the digital buffer input.
Conclusion
Described in this note is an AC amplifier with feedback
that can not only be used to cancel DC offset,
but also as an active hardware filter. This is due to its
transfer function, (Equation 1), which corresponds
to the second order analog filter. By modifying the
feedback chain, the frequency-gain characteristic
can be modified to form another filter type, for
example, a band-pass filter.
Test This Programmable Solution for Yourself with a Cypress CY3210-PSoCEVAL1 Kit and PSoC Designer v4.4 Software
This evaluation kit features an evaluation board and
MiniProg programming unit. The evaluation board
includes an LCD module, potentiometer, LEDs and
plenty of breadboarding space to meet all of your
evaluation needs. The MiniProg programming unit
is also included with the kit and will program PSoC
devices directly on the evaluation board, or on
other boards via a 5-pin header. This programming
unit is small and compact, and connects to a PC
via a provided USB 2.0 cable.
Kit includes
- Evaluation board with LCD module
- MiniProg programming unit
- PSoC Designer Software CD
- 28-pin CY8C29466-24PXI PDIP PSoC device sample
- USB 2.0 cable
- Getting Started Guide
PSoC Designer software helps users harness the
power and flexibility of PSoC devices by providing
“drag and drop” system design capability inside a
full featured development environment with C Compiler
and Assembler. This powerful easy-to-use
integrated development environment (IDE) for PSoC
applications comes with over 50 pre-configured,
pre-characterized embedded peripheral functions
called user modules, including the following
programmable analog and digital functions:
ANALOG
 |
- ADC
- Incremental 6– 14 bits
- Delta Sigma 6–13 bits
- DAC
- 6, 8 and 9-bit
- 6 and 8-bit multiplying
- Filters
- 2-pole low-pass filter
- 2-pole band-pass filter
- Notch filters
- DTMF dialer
- Modulator
- Peak detector
- V to I converter
- Amplifiers
- Programmable gain amplifier
- Instrumentation amplifier
- Inverting amplifier
- Comparators
- Programmable comparator
- Hysteresis comparator
- Zero-Crossing comparator
- CapSense
|
 |
|
|
DIGITAL
 |
- 8, 16, 24, 32-bit timer
- 8, 16, 24, 32-bit counter
- 8, 16, 24, 32-bit PWM
- 8, 16-bit dead band generator
- Pseudo random source
- Cyclic redundancy check
|
 |
|
COMMUNICATIONS INTERFACE
 |
- I2C Master
- I2C Slave
- SPI Master
- SPI Slave
- Full Duplex UART
- Tx, Rx
- Full Speed USB V2.0
|
 |
|
|
Upgrade to real mixed-signal programmability
today with the revolutionary Cypress PSoC
mixed-signal array, a complete system-level
solution offering
- The integration of an ASIC
- The flexibility of an FPGA
- The industry’s easiest system-design software tools
“MiniProg” Programmer
The MiniProg provides a simple to use and cost effective programming solution that is superb for a development environment. It consists of a USB interface to the development PC and a 5-pin header that is used to connect to the target board. It works in conjunction with the GenProg software available through download as part of the PSoC Designer tools on the Cypress website. The MiniProg can also be used in conjunction with the CY3216 to program devices out-of-system, or with the CY3655-PLG to program enCoRe II devices through the USB connector.
The CY3217 kit consists of the same programmer that is available in the PSoC CY3210-MiniProg1, but provided as a stand-alone item without the PSoC evaluation board. This kit is an ideal item to enable quick turn programming at multiple development/test sites.
The CY3217 “MiniProg” USB Programmer includes:
- (1) MiniProg programmer board
- (2) Std-A to Mini-B USB cable
I2C to USB Bridge Debugging/Communication Kit
The I2C to USB Bridge is a quick and easy link from any design or application’s I2C bus to a PC via USB for design testing, debugging and communication. The bridge is based on 1 of Cypress’ CY8C24894, which contains 6 analog blocks supporting ADCs, DACs and filters, 4 digital blocks supporting PWMs, timers and counters and a full-speed USB 2.0 peripheral.
Featured Products
| Part Number |
|
Description |
Data Sheet |
App. Notes |
|
| CY3210-PSOCEVAL1 |
|
PSoC Development Kit
|
|
|
|
| CY3217 |
|
"MiniProg" Programmer Kit
|
|
|
|
| CY3240-I2USB |
|
I2C to USB Bridge Debugging/Communication Kit
|
|
|
|
refers to New Product Introduction