Stufin
Home Quick Cart Profile

LM358

Buy Now on Stufin

Component Name

LM358

Component Type

Dual Operational Amplifier (Op-Amp)

Description

The LM358 is a dual operational amplifier (op-amp) integrated circuit (IC) designed for a wide range of applications, including audio, industrial, and consumer electronics. It is a versatile and popular device used to amplify, filter, and condition electrical signals. The LM358 is manufactured by Texas Instruments and is available in a variety of packages, including DIP, SOIC, and TSSOP.

Functionality

The LM358 is a dual op-amp, meaning it contains two independent operational amplifiers within a single package. Each op-amp can be used to perform various functions, such as

Signal amplification

amplifying weak signals to increase their strength and quality

Signal filtering

filtering out unwanted frequencies and noise from a signal

Signal conditioning

modifying a signal to prepare it for further processing or transmission

Voltage regulation

regulating voltage levels to ensure stable operation

Key Features

  • Dual Operational Amplifiers: The LM358 contains two independent op-amps, each with its own input, output, and power supply pins.
  • High Voltage Gain: The LM358 has a high voltage gain of 100 dB, making it suitable for high-gain applications.
  • Low Input Offset Voltage: The LM358 has a low input offset voltage of 2 mV, ensuring high accuracy and stability.
  • Low Input Bias Current: The LM358 has a low input bias current of 20 nA, making it suitable for high-impedance sources.
  • Wide Operating Voltage Range: The LM358 can operate from a single power supply voltage of 3 V to 32 V, making it suitable for a wide range of applications.
  • Low Power Consumption: The LM358 has a low quiescent current of 0.5 mA, making it suitable for battery-powered devices.
  • Internal ESD Protection: The LM358 has internal electrostatic discharge (ESD) protection, ensuring device reliability and robustness.
  • Package Options: The LM358 is available in a variety of packages, including DIP, SOIC, and TSSOP, making it suitable for different design requirements.

Pinout Diagram

The pinout diagram for the LM358 DIP package is shown below
+-----------+ | 1 8 16 | | IN1+ | VCC | IN2+ | IN1- | GND | IN2- | OUT1 | PIN | OUT2 +-----------+

Applications

The LM358 is suitable for a wide range of applications, including

Audio equipment

Industrial control systems

Medical devices

Consumer electronics

Robotics and automation

IoT devices

Supply Voltage Range

3 V to 32 V

Input Offset Voltage

2 mV

Input Bias Current

20 nA

Voltage Gain

100 dB

Bandwidth

1 MHz

Slew Rate

0.5 V/s

Quiescent Current

0.5 mA

Operating Temperature Range

-40C to 125C

Conclusion

The LM358 is a versatile and reliable dual operational amplifier suitable for a wide range of applications. Its high voltage gain, low input offset voltage, and wide operating voltage range make it an ideal choice for many designs. With its low power consumption and internal ESD protection, the LM358 is a popular device among engineers and designers.

Pin Configuration

Code Examples

LM358 Dual Operational Amplifier
The LM358 is a dual operational amplifier (op-amp) featuring high gain, low power consumption, and a wide range of operating voltage. It is widely used in various electronic circuits, including audio amplifiers, filters, and sensor interfaces.
Pinout Diagram:
The LM358 has an 8-pin DIP package with the following pinout:
```
  +--------------+
  |            |
  |  1   OUT1  |
  |  2   IN1-  |
  |  3   IN1+  |
  |  4   VCC   |
  |  5   GND   |
  |  6   IN2+  |
  |  7   IN2-  |
  |  8   OUT2  |
  +--------------+
```
Code Examples:
### Example 1: Non-Inverting Amplifier
In this example, we will use the LM358 as a non-inverting amplifier with a gain of 2.
Circuit Diagram:
```
  +-----------+
  |          |
  |  R1  1k  |
  |          |
  |  Vin  -->|-->  IN1+
  |          |
  |          |
  |  R2  2k  |
  |          |
  |  OUT1 <--|-->  R2
  |          |
  +-----------+
```
Arduino Code:
```c
const int inputPin = A0;  // Input voltage
const int outputPin = 9;  // Output voltage
void setup() {
  pinMode(outputPin, OUTPUT);
}
void loop() {
  int inputValue = analogRead(inputPin);
  int outputValue = map(inputValue, 0, 1023, 0, 255);
  analogWrite(outputPin, outputValue);
}
```
### Example 2: Differential Amplifier
In this example, we will use the LM358 as a differential amplifier to measure the voltage difference between two signals.
Circuit Diagram:
```
  +-----------+
  |          |
  |  Vin1  -->|-->  IN1+
  |          |
  |          |
  |  Vin2  -->|-->  IN1-
  |          |
  |          |
  |  R1  1k  |
  |          |
  |  OUT1 <--|-->  R1
  |          |
  +-----------+
```
Python Code (using Raspberry Pi):
```python
import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM)
input_pin1 = 17  # Vin1
input_pin2 = 23  # Vin2
output_pin = 18  # OUT1
GPIO.setup(input_pin1, GPIO.IN)
GPIO.setup(input_pin2, GPIO.IN)
GPIO.setup(output_pin, GPIO.OUT)
while True:
    vin1 = GPIO.input(input_pin1)
    vin2 = GPIO.input(input_pin2)
    output_voltage = vin1 - vin2
    GPIO.output(output_pin, output_voltage)
    time.sleep(0.1)
```
These examples demonstrate how to use the LM358 as a building block for various analog circuits. By leveraging the LM358's high gain and wide operating voltage range, you can design and implement a wide range of IoT projects, from simple sensors to complex signal processing systems.