Op Amp Design Techniques

Analog Adventures

Op amps can play useful roles in circuit designs linking the real analog world to microcontrollers. Stuart shares techniques for using op amps and related devices like comparators to optimize your designs and improve precision.

By Stuart Ball

Connecting the real world to your microcontroller circuit is what makes it useful for something more than blinking an LED. This is a broad topic. And several years ago, I wrote a book specifically about this: Analog Interfacing to Embedded Microprocessor Systems . What I want to do here is describe a few techniques that may save you some time and grief when connecting things to your own designs.

Op amp Voltage References

An op amp (Figure 1) is an amplifier that has an inverting input, a noninverting input and an output. The voltage difference between the noninverting input and inverting input is amplified by a high internal gain and presented to the output. Resistors or other components are connected between the output and (usually) the inverting input to produce a feedback circuit that controls the gain of the completed circuit.

Figure 1
Standard inverting amplifier with reference offset voltage. The reference is needed to level-shift the -2.5 V to 2.5 V input up to the 0 V to 5 V input needed by a microcontroller.

Generally, the rule of thumb is that, as long as the op amp is properly connected—not saturated, no floating inputs—the inverting and noninverting inputs will be at the same voltage. This is because the negative feedback loop will cause the op amp to drive the inverting input to a voltage that matches the noninverting input. If the op amp can’t drive the output so that the inputs are equal, the output will saturate in either the positive or negative direction.

The circuit in Figure 1 is a commonly used inverting amplifier circuit, and it is what you might use to convert a signal that swings from -2.5 V to 2.5 V to the 0 to 5 V input of a microcontroller’s analog-to-digital (ADC) converter. If your microcontroller had an ADC that could only handle inputs of 0 to 3.3 V or 0 to 2.5 V, the same principles would apply, but the component values would be different. The op amp pinout shown is typical of one half of an 8-pin, dual op amp.

The input signal might be the output of a device with a -2.5 V to 2.5 V range. Or it might just be a capacitor-coupled AC signal such as an audio waveform. Whatever the source, the -2.5 V to 2.5 V range is outside the range of your ADC input, so you have to shift the level so that it is within the range of the ADC.

The circuit shown is a typical inverting amplifier, which means that the output is 180 degrees out of phase with the input. When the input is at its maximum voltage, the output is at its minimum, and vice-versa. The gain of the amplifier is defined as RF/RI, which is a gain of 1 for this circuit since both resistors have the same value. For other applications you might need gain greater or less than one.

If you work through the math as shown in Figure 1, you can see that the output equation is (2REF – Input) or 2× the reference voltage (1.25 V) minus the input voltage (-2.5 V to
2.5 V). So, when the input is 2.5 V, the output is (1.25 × 2) – 2.5, or 0 V. When the input is -2.5 V, the output is (1.25 × 2) – (-2.5), or  5 V. So, the input is inverted and translated up 2.5 V to match the ADC input requirements at the op amp output.

Double Trouble

Now the potential problem: While the input voltage is multiplied by 1 (and level-shifted), the reference voltage is multiplied by 2. So, any noise or ripple on the reference voltage will show up doubled on the output. A 10 mV ripple signal will be 20 mV at the ADC input and will be combined with the input signal you are trying to measure.
A 50 mV DC error in the reference will translate to a 100 mV constant offset at the output.

Figure 2
A voltage divider provides a simple voltage reference but is subject to variation from ripple on the supply voltage, and the normal variation in the supply voltage. The supply voltage can vary with temperature, part tolerance and other factors.

Suppose that the reference voltage is generated as shown in Figure 2, with a pair of resistors to divide the 5 V supply down to 1.25 V. Using 1% resistors provides a reference voltage that is within about 01.7% of the intended value—provided the 5 V supply is exactly 5 V. However, this 5 V value can vary with temperature, with the input voltage and with the tolerance of the reference voltage inside the regulator circuit. The values of the resistors can also drift with temperature, although this effect is negligible in many applications.

In addition to the variation in the 5 V supply DC voltage, any AC signal on the
5 V supply will be transmitted to the op amp reference and will be multiplied by two at the op amp output. . …

Read the full article in the July 336 issue of Circuit Cellar

Don’t miss out on upcoming issues of Circuit Cellar. Subscribe today!

Note: We’ve made the October 2017 issue of Circuit Cellar available as a free sample issue. In it, you’ll find a rich variety of the kinds of articles and information that exemplify a typical issue of the current magazine.

High-Voltage Amplifiers Target Error-Sensitive Applications

Texas Instruments (TI) has introduced three new amplifiers that offer a combination of high speed and high precision, allowing designers to create more accurate circuits for error-sensitive applications.  With maximum supply voltages ranging from 27 V to 36 V, the new devices support more precise measurement and faster processing of a wide variety of input signals in test and measurement, medical, and data-acquisition systems.

Designers can select the amplifier architecture that meets their system requirements, with input voltages, bandwidths and key features. The OPA2810 is a 27-V junction gate field-effect transistor (JFET)-input dual operational amplifier (op amp) with 120-MHz bandwidth and 500-µV max offset voltage. The OPA189 is a 36-V zero-drift op amp with 14-MHz bandwidth and is multiplexer (MUX) friendly. And finally, the THS3491 is a 32-V current-feedback amplifier with
900-MHz small-signal bandwidth and ±420-mA output current.

The high bandwidths of the OPA2810 and OPA189 enable high-gain configurations and faster response times for more accurate measurements. Designers can use the THS3491 current-feedback amplifier’s wide small-signal bandwidth, high slew rate and output current of ±420 mA to achieve low distortion and high output power levels. The THS3491 is capable of 10-Vpeak-to-peak output levels at 200 MHz into 100-Ω loads for test and measurement systems, such as arbitrary waveform generators, laser diode drivers and high capacitive load drive applications.

With an industry-leading maximum offset and lowest voltage noise of 5.7 nV/√Hz for 27-V amplifiers in the 100- to 200-MHz bandwidth range, the OPA2810 op amp allows engineers to achieve more precise measurements in data-acquisition and signal-processing applications. According to TI, the OPA189 is the widest bandwidth zero-drift op amp with the lowest noise of 5.2 nV/√Hz. With a low maximum drift of 0.02 μV/°C, the OPA189 also minimizes temperature error without calibration, increasing system accuracy over an extended temperature range.

The 120-MHz OPA2810 op amp offers best-in-class current consumption of 3.6 mA, while providing excellent signal-to-noise ratio and distortion. Designed for applications that require high gain and low distortion in power-sensitive designs, the OPA189 is the lowest power zero-drift op amp with a 14-MHz bandwidth. This device enables engineers to design high-resolution, noise-sensitive industrial systems while only consuming 1.3 mA of quiescent current, which can benefit analog input modules, and battery and LCD test equipment. TI’s new high-voltage amplifiers are available with at prices ranging from $1.98 to $6.20.

Texas Instruments | www.ti.com

July Circuit Cellar: Sneak Preview

The July issue of Circuit Cellar magazine is coming soon. And we’ve rustled up a great herd of embedded electronics articles for you to enjoy.

Not a Circuit Cellar subscriber?  Don’t be left out! Sign up today:


Here’s a sneak preview of July 2018 Circuit Cellar:


Wireless Standards and Solutions for IoT  
One of the critical enabling technologies making the Internet-of-Things possible is the set of well-established wireless standards that allow movement of data to and from low-power edge devices. Here, Circuit Cellar’s Editor-in-Chief, Jeff Child, looks at key wireless standards and solutions playing a role in IoT.

Product Focus: IoT Device Modules
The rapidly growing IoT phenomenon is driving demand for highly integrated modules designed to interface with IoT devices. This Product Focus section updates readers on this technology trend and provides a product album of representative IoT interface modules.


EMC Analysis During PCB Layout
If your electronic product design fails EMC compliance testing for its target market, that product can’t be sold. That’s why EMC analysis is such an important step. In his article, Mentor Graphics’ Craig Armenti shows how implementing EMC analysis during the design phase provides an opportunity to avoid failing EMC compliance testing after fabrication.

Extreme Low-Power Design
Wearable consumer devices, IoT sensors and handheld systems are just a few of the applications that strive for extreme low-power consumption. Beyond just battery-driven designs, today’s system developers want no-battery solutions and even energy harvesting. Circuit Cellar’s Editor-in-Chief, Jeff Child, dives into the latest technology trends and product developments in extreme low power.

Op Amp Design Techniques
Op amps can play useful roles in circuit designs linking the real analog world to microcontrollers. Stuart Ball shares techniques for using op amps and related devices like comparators to optimize your designs and improve precision.

Wire Wrapping Revisited
Wire wrapping may seem old fashioned, but this tried and true technology can solve some tricky problems that arise when you try to interconnect different kinds of modules like Arduino, Raspberry Pi and so on. Wolfgang Matthes steps through how to best employ wire wrapping for this purpose and provides application examples.


BLDC Fan Current
Today’s small fans and blowers depend on brushless DC (BLDC) motor technology for their operation. In this article, Ed Nisley explains how these seemingly simple devices are actually quite complex when you measure them in action. He makes some measurements on the motor inside a tangential blower and explores how the data relates to the basic physics of moving air.

Electronic Speed Control (Part 1)
An Electronic Speed Controller (ESC) is an important device in motor control designs, especially in the world of radio-controlled (RC) model vehicles. In Part 1, Jeff Bachiochi lays the groundwork by discussing the evolution of brushed motors to brushless motors. He then explores in detail the role ESC devices play in RC vehicle motors.

MCU-Based Motor Condition Monitoring
Thanks to advances in microcontrollers and sensors, it’s now possible to electronically monitor aspects of a motor’s condition, like current consumption, pressure and vibration. In this article, Texas Instrument’s Amit Ashara steps through how to best use the resources on an MCU to preform condition monitoring on motors. He looks at the signal chain, connectivity issues and A-D conversion.


Verifying Code Readout Protection Claims
How do you verify the security of microcontrollers? MCU manufacturers often make big claims, but sometimes it is in your best interest to verify them yourself. In this article, Colin O’Flynn discusses a few threats against code readout and looks at verifying some of those claimed levels.

Thermoelectric Cooling (Part 1)
When his thermoelectric water color died prematurely, George Novacek was curious whether it was a defective unit or a design problem. With that in mind, he decided to create a test chamber using some electronics combined with components salvaged from the water cooler. His tests provide some interesting insights into thermoelectric cooling.


Low Cost 1 W DC-DC Converters Sport Dual Outputs

As a follow on to its R1SX 1W DC/DC converters, RECOM has extended its portfolio with the R1DX series to cover dual output voltage applications. The R1DX series is ideal for EIA/TIA-232 bus isolation and a wide range of industrial automation control equipment, sensors, isolated operational amplifiers and test and measurement equipment that require bipolar supply voltages.

The R1DX series are high-quality open-frame SMD converters, which deliver stable performance on symmetric dual outputs at a very competitive price. They operate from 5V and offer ±5, ±9, ±12 or ±15 dual outputs. There is no minimum load required, and the quiescent consumption is less than 150 mW. The pin-out is industry standard and compatible with the R1S/R1D series. High isolation of up to 3 kV DC (/H option) make them an ideal solution for isolating data transfer lines in legacy communication protocols (such as RS-232) and for isolated DAC and sensor applications.

The modules operate at a wide temperature range from -40°C to +95°C without derating and can drive up to ±1000 µF capacitive loads, which is multiple times higher than the competition. The series is fully certified to IEC/UL/EN62368-1 and UL60950-1 and is 10/10 RoHS-conform. Class A EMC conformity requires only an input capacitor and a simple low cost LC filter is all that is needed for Class B EMC. Samples and OEM pricing are available from all authorized distributors or directly from RECOM.

RECOM | www.recom-power.com

Negative Feedback in Electronics

Lead Image Novacek

A Look at the Opposite Side

Besides closed-loop control systems, negative feedback is found in many electronic circuits—especially in amplifiers. And just like positive feedback, negative feedback can significantly change or modify a circuit’s performance.

By George Novacek

Following last month’s discussion of positive feedback, let’s now take a look at its opposite: the negative feedback. Besides closed-loop control systems, it is found in many electronic circuits, especially in amplifiers. As we have already seen, feedback significantly changes or modifies a circuit’s performance. The end of the 19th century and the beginning of the 20th century was the era of introduction of the telephone. For long distance calls, amplifiers were needed along the telephone lines to make up for their transmission losses.

Vacuum tube amplifiers of the day suffered from many ailments: drift, high distortion and generally poor performance, making the long-distance voice communications nearly unintelligible. Harold Stephen Black, an AT&T engineer, was one of many working to solve this problem. Eventually—because he was familiar with the effects of negative feedback in mechanical systems—he tried to apply it to a vacuum tube amplifier. The result was astonishing and amplifiers with negative feedback have been with us ever since.

FIGURE 1 Transfer function of an operational amplifier with negative feedback

Transfer function of an operational amplifier with negative feedback

The op amp is the epitome of feedback application in electronic circuits. Because its comprehension is valid for all electronic feedback circuits, let’s take a closer look at the op amp. To analyze the negative feedback mathematically, we’ll consider an amplifier as a combination of two functional blocks: The open loop gain (OLG) block with transfer function A(s) and the feedback block with transfer function β(s). With monolithic amplifiers, the feedback is usually applied externally. The overall transfer function follows the principle shown in Figure 1.. …

Read the full article in the November 328 issue of Circuit Cellar

Don’t miss out on upcoming issues of Circuit Cellar. Subscribe today!
Note: We’ve made the October 2017 issue of Circuit Cellar available as a free sample issue. In it, you’ll find a rich variety of the kinds of articles and information that exemplify a typical issue of the current magazine.

November Circuit Cellar: A Sneak Preview

The November issue of Circuit Cellar magazine is coming soon. Want a sneak peak? We’ve got a great section of excellent embedded electronics articles for you.

Not a Circuit Cellar subscriber?  Don’t be left out! Sign up today:

Here’s a sneak preview of November Circuit Cellar:


IoT Gateway Advances Take Diverse Paths: Flexible Networked Solutions
The Internet-of-Things (IoT) phenomenon offers huge opportunities. Circuit Cellar Chief Editor Jeff Child explores how IoT gateways play a vital role in those systems by providing Nov 328 coverbidirectional communication between the devices in the field and the cloud.

Power Analysis Attack on RSA: Asymmetric Adventures
Colin O’Flynn has done a number of great columns about cryptography—in particular symmetric cryptography. This time he’s tackling an asymmetric algorithm: a RSA implementation. Colin describes what’s unique about an RSA cryptosystem and takes us through a power analysis attack.


Analog Solutions Fuel Industrial System Needs: Connectivity, Control and IIoT
Whether it’s connecting with analog sensors or driving actuators, analog ICs play many critical roles in industrial applications. Here, Circuit Cellar Chief Editor Jeff Child examines the latest analog technologies and products serving the needs of today’s industrial systems.

Using Power Audio Amplifiers in Untypical Ways (Part 2): More Alternative Uses
In Part 1 Petre Petrov described many interesting ways to use power audio amplifiers (PAAs) as universal building blocks similar to the op amps and comparators. Here, he discusses several more things that can be built from PAAs including wave generators and transformer drivers.


Gas Monitoring and Sensing (Part 2): Putting the Sensor to Work
Columnist Jeff Bachiochi continues his exploration of gas monitoring and sensing. This time he discusses some of the inexpensive sensors available that can be applied to this application. Jeff then tackles the factors to consider when calibrating these sensors and how to use them effectively.

Logger Device Tracks Amp Hours (Part 2): Alternative Energy Sources
n this follow on to Part 1 of his story, William Wachsmann describes putting to use the amp-hour logger he built using a microcontroller and a clamp-on ammeter. This time he discusses modifying the amp-hour software so it can be used as an analog input logger to measure solar and wind power.

Negative Feedback in Electronics: A Look at the Opposite Side
Complementing his discussion last month on positive feedback, columnist George Novacek now takes a look at negative feedback. Just like positive feedback, negative feedback can significantly change or modify a circuit’s performance.

LF Quartz Resonator Tester: A Stimulating Discussion
Ed Nisley returns to the rich topic of low-frequency quartz resonators. This time he describes a tester built with an ordinary Arduino Nano and an assortment of inexpensive RF modules.


Simulating a Hammond Tonewheel Organ (Part 1) Mimicking a Mechanical Marvel
Hammond tonewheel organs were based upon additive sine-wave synthesis. Because of that, it’s possible to simulate the organ using a microcontroller program that feeds its output waveform to a DAC. Brian Millier takes on this project, making use of an ARM-based Teensy module to do the heavy lifting.

Machine Auto-Sorts Resistors: MCUs, Measurement and Motor Control
Typical electronics lab benches become littered with resistors from past projects. These three Cornell University graduates tackled this problem by building a resistor sorting system. It enables users to input multiple resistors, measure their resistance and sort them. The project integrates motor controllers, resistance measurement and a graphical user interface.