An amplificador operacional (operational amplifier or op-amp) is a high-gain, DC-coupled voltage amplifier with differential inputs and a single output that forces the voltage difference between its inputs to near zero when negative feedback is applied. In a real circuit, it changes a weak, noisy, or high-impedance sensor signal into a robust, low-impedance voltage that a microcontroller's ADC can reliably sample. Beginners commonly confuse it with a simple audio power amplifier or a comparator, but an op-amp operates in the linear region via continuous feedback, whereas comparators are designed specifically for open-loop, rail-to-rail switching.
The Core Math and a Worked Numeric Example
At the bench, we rely on the "virtual short" concept. When an op-amp is operating in its linear region with negative feedback, the voltage at the inverting input (-) is forced to match the voltage at the non-inverting input (+). This allows us to set exact gains using standard resistor networks.
Let's look at a standard non-inverting amplifier configuration. You are reading a thermistor voltage divider with an ESP32, and the maximum sensor output is 0.45V. To maximize the resolution of the ESP32's 0-3.3V ADC, you want to scale that 0.45V up to roughly 2.5V.
The formula for a non-inverting amplifier is:
Vout = Vin × (1 + (Rf / Rg))
We need a gain of 5.55. Therefore:
5.55 = 1 + (Rf / Rg)
4.55 = Rf / Rg
If we select a standard 2.2kΩ resistor for Rg (the resistor to ground), we can solve for Rf (the feedback resistor):
Rf = 4.55 × 2200 = 10,010Ω
A standard 10kΩ resistor is close enough. Let's verify the actual output:
Gain = 1 + (10000 / 2200) = 5.545
Vout = 0.45V × 5.545 = 2.495V
This 2.495V signal now has a very low output impedance (typically fractions of an ohm), meaning it can drive the ESP32's ADC sampling capacitor without the reading drooping or introducing conversion noise. For a deeper dive into the internal transistor topology that makes this possible, the All About Circuits semiconductor textbook provides excellent schematic breakdowns.
Where You Meet the Amplificador Operacional in Practice
You will rarely see an op-amp used as a simple voltage booster in modern digital designs; dedicated ADC drivers or instrumentation amps often handle that. Instead, you meet them in three critical analog conditioning roles:
- High-Impedance Buffering: Piezo vibration sensors and raw pH probes output tiny signals with source impedances in the megaohm range. If you connect these directly to a microcontroller, the ADC's internal sampling switch will collapse the voltage. A unity-gain op-amp buffer (gain = 1) acts as an impedance transformer, presenting a megaohm load to the sensor and a low-ohm source to the MCU.
- Active Filtering (Sallen-Key): When you need to aggressively strip 60Hz/50Hz mains hum from a DC sensor line, passive RC filters require massive, expensive capacitors. An op-amp based Sallen-Key low-pass filter uses small, cheap ceramic capacitors and provides a sharp roll-off without attenuating the passband signal.
- Low-Side Current Shunt Amplification: To measure motor current, you place a 0.01Ω shunt resistor in the ground path. At 5A, the voltage drop is only 50mV. An op-amp configured for a gain of 50 scales that 50mV to 2.5V, safely keeping the motor's ground reference near 0V while giving your MCU a readable analog voltage.
Selecting the Right IC: LM358 vs. TL072 vs. MCP6002
Not all op-amps are interchangeable. As of 2026, supply chain stabilization has normalized pricing, but choosing the wrong part for your rail voltage or bandwidth will ruin your weekend. Here is how the most common hobbyist and bench ICs stack up.
| IC Model | GBW (Gain Bandwidth) | Slew Rate | Rail-to-Rail? | Typical Price (1pc) | Best Application |
|---|---|---|---|---|---|
| LM358 | 1 MHz | 0.3 V/µs | Output only (loses ~1.5V to VCC) | $0.15 | Low-speed DC buffering, basic LED drivers |
| MCP6002 | 1 MHz | 0.6 V/µs | Yes (Input and Output) | $0.45 | 3.3V MCU sensor interfacing, battery-powered IoT |
| TL072 | 3 MHz | 13 V/µs | No (Needs dual ±12V rails) | $0.85 | Audio mixing, synthesizers, high-voltage bench circuits |
| OPA2134 | 8 MHz | 20 V/µs | No | $6.50 | Hi-fi audio preamps, precision lab instrumentation |
For a comprehensive look at single-supply design limitations, the Texas Instruments Op-Amp Overview details how input common-mode ranges dictate your IC choice when running off a single 5V or 3.3V battery.
Common Failure Modes and Bench Debugging
When your circuit doesn't match the simulation, check these three physical realities:
- Output Swing Limitations: If you power an LM358 with a single 5V supply and try to output 4.5V, it will clip around 3.5V. The LM358 is not rail-to-rail on the output. Fix: Switch to an MCP6002 or increase the supply voltage to 9V.
- Phase Inversion: If the voltage at the input pins exceeds the chip's specified common-mode range (often VCC - 1.5V on older parts), the internal transistor stages saturate and the output abruptly flips to the opposite rail. Fix: Use a voltage divider to keep inputs within the datasheet's common-mode limits, or buy a modern RR-in part.
- Capacitive Load Ringing: Driving a long coaxial cable or a MOSFET gate directly from an op-amp output adds capacitance. This introduces a pole in the feedback loop, causing high-frequency oscillation (ringing) that destroys your signal and overheats the IC. Fix: Place a 22Ω to 47Ω isolation resistor in series with the op-amp output, before the feedback network taps off.
Frequently Asked Questions
How do I wire an amplificador operacional for unity gain buffering?
Connect your input signal directly to the non-inverting (+) pin. Then, wire a jumper directly from the output pin to the inverting (-) pin. This creates 100% negative feedback, forcing the output to exactly match the input voltage while providing massive current gain and impedance isolation. Do not leave any unused pins floating; tie unused outputs to their respective inverting inputs.
Why is my amplificador operacional output clipping before the supply rails?
This is almost always due to the output stage topology. Standard op-amps use bipolar push-pull output transistors that suffer from Vce(sat) voltage drops, meaning they physically cannot reach the positive or negative supply rails. On a 5V single supply, a standard part might only swing from 0.05V to 3.5V. To fix this, you must select an IC explicitly labeled as "RRIO" (Rail-to-Rail Input/Output) in the datasheet, which uses specialized CMOS output stages designed to pull within millivolts of the supply rails.
Can I use an amplificador operacional as a comparator for digital logic?
You can, but you shouldn't. While an op-amp will output a high or low voltage when used open-loop (no feedback), op-amps lack internal hysteresis, meaning noise near the threshold will cause chaotic, rapid-fire toggling. Furthermore, op-amp outputs are not optimized for fast switching speeds; recovering from saturation can take microseconds, resulting in severe propagation delay. Always use a dedicated comparator IC (like the LM393 or TLV3201) for digital logic thresholding.






