Operational amplifiers (op-amps) are the Swiss army knives of analogue electronics, enabling signal amplification, filtering, comparison, and mathematical operations with just a few external components. The LM741 and LM358 are the two most commonly available op-amps in India, and understanding their practical circuits is essential for sensor signal conditioning, audio projects, and instrumentation. This guide covers real-world op-amp circuits you can build today.
Table of Contents
- Op-Amp Basics and Ideal Behaviour
- LM741 vs LM358: Which to Use
- Comparator Circuit
- Inverting Amplifier
- Non-Inverting Amplifier
- Sensor Signal Conditioning
- Frequently Asked Questions
- Conclusion
Op-Amp Basics and Ideal Behaviour
An ideal op-amp has infinite input impedance (draws no current), zero output impedance, and infinite open-loop gain. Real op-amps approximate these ideals closely enough for most applications. The two key rules for analysing op-amp circuits with negative feedback:
- The voltage at the inverting (-) input equals the voltage at the non-inverting (+) input
- No current flows into either input
LM741 vs LM358: Which to Use
| Feature | LM741 | LM358 |
|---|---|---|
| Op-amps per IC | 1 (8-pin DIP) | 2 (8-pin DIP) |
| Supply voltage | ±5V to ±18V | 3V to 32V (single supply) |
| Input offset voltage | 2mV | 3mV |
| Single supply operation | No (needs dual supply) | Yes |
| Output swing to ground | No | Yes (to within 20mV) |
| Price (₹) | 10-15 | 10-15 |
Use the LM358 for Arduino projects because it works with a single 5V supply. The LM741 requires dual supply (±12V or ±15V) which adds complexity.
Comparator Circuit
The simplest op-amp circuit: compares two voltages and outputs HIGH or LOW. Used for threshold detection (e.g., “is temperature above 30 degrees?”).
// LM358 Comparator with LM35 Temperature Sensor
// LM35 output (10mV/°C) → Non-inverting input (+, Pin 3)
// Voltage divider (set threshold) → Inverting input (-, Pin 2)
// For 30°C threshold: LM35 outputs 0.30V
// Voltage divider: R1=47kΩ, R2=3.3kΩ → 0.33V on Pin 2
// Output (Pin 1): HIGH when temp > 30°C, LOW otherwise
// LM358 VCC=5V (Pin 8), GND=0V (Pin 4)
Inverting Amplifier
Gain = -Rf/Rin. A 10x inverting amplifier with Rin=1kΩ and Rf=10kΩ amplifies a 0.1V sensor signal to 1V (inverted). The negative sign means the output is phase-inverted, which matters for AC signals but not for DC measurement.
Non-Inverting Amplifier
Gain = 1 + Rf/Rin. A non-inverting amplifier with Rf=9kΩ and Rin=1kΩ gives a gain of 10. The input impedance is very high (op-amp input impedance), making it ideal for amplifying high-impedance sensor outputs without loading them.
Sensor Signal Conditioning
Many sensors output tiny signals that need amplification before connecting to an Arduino ADC (0-5V range). Examples:
- Thermocouple (K-type): 40µV/°C output. Need ~100x amplification. Use instrumentation amplifier (INA125) or LM358 with 100x gain.
- Strain gauge: millivolt output from Wheatstone bridge. Need differential amplification.
- pH sensor: High-impedance output needs buffer amplifier (unity gain, non-inverting).
Frequently Asked Questions
Can I use an op-amp as a comparator?
Yes, for non-critical applications. However, dedicated comparators (LM393) are faster, have open-collector outputs (for direct logic interfacing), and do not suffer from latch-up when inputs exceed supply rails. For Arduino threshold detection, LM358 as comparator works fine.
Why does my op-amp output only go to 3.5V on a 5V supply?
Most op-amps cannot swing their output to the supply rails. The LM358 can go down to near 0V but only up to Vcc-1.5V (about 3.5V on 5V supply). For rail-to-rail output, use a rail-to-rail op-amp like the MCP6002.
What are the 100nF capacitors on the supply pins for?
These are bypass/decoupling capacitors that prevent oscillation and noise pickup. Place 100nF ceramic capacitors as close as possible to the op-amp power pins. Without them, the op-amp may oscillate or produce noisy output.
Can I use op-amps in audio projects?
Yes. The LM358 is adequate for basic audio (microphone preamplifier, headphone amplifier). For higher fidelity, use audio-specific op-amps like NE5532 or OPA2134 which have lower noise and distortion.
Conclusion
Op-amps are indispensable for analogue signal processing in electronics projects. The LM358 is the go-to choice for Arduino-based projects due to its single-supply operation and low cost. Master the comparator, inverting amplifier, and non-inverting amplifier circuits, and you have the tools to interface virtually any analogue sensor with a microcontroller. Find op-amps and sensor components at Zbotic.
Add comment