Home / Electronic News / LM393 vs LM358: Key Differences and When to Use Each

LM393 vs LM358: Key Differences and When to Use Each

1. Introduction

In electronic circuit design, comparators and operational amplifiers (Op Amps) are two common components that, while having some functional overlap, are fundamentally different. A comparator is primarily used to compare the magnitude of two input signals and provide a switching output based on the comparison result, whereas an operational amplifier is typically used for signal amplification, filtering, and other analog signal processing tasks. While their operating principles share similarities, their output characteristics, application scenarios, and design requirements differ significantly.

A common question is: Why can’t comparators and op-amps be used interchangeably? This is mainly due to the significant differences in their output behavior. A comparator’s output is a switching type (such as TTL or CMOS-compatible open-drain or open-collector output), designed to trigger subsequent circuits. An operational amplifier’s output is a continuously varying signal, used for precise amplification of input signals. If used interchangeably, the circuit may not function correctly or may even damage other components.

LM393 vs LM358

The goal of this article is to compare the key features of two common devices—the LM393 (comparator) and the LM358 (operational amplifier)—to help readers understand their differences and make the right choice based on their specific needs.

2. Detailed Analysis of the LM393 Dual Comparator

2.1 Basic Structure and Function

The LM393 is a widely used dual-channel comparator with an open-drain output feature. This means that its output is connected to ground when the output is low, and when it is high, the output floats (disconnected), typically requiring an external pull-up resistor to generate a clear high level. This characteristic makes the LM393 highly compatible with different voltage-level systems (such as TTL or CMOS) and useful for voltage comparisons in systems with various power supplies.

In terms of design goals, the LM393 is focused on high-speed switching and voltage level comparison. It can quickly respond to input signal changes, making it suitable for applications requiring fast reactions. Due to its open-drain output, the LM393 is commonly used to compare signals at lower voltages and trigger subsequent actions, such as sensor triggering or PWM control.

2.2 Key Parameters

  • Input Offset Voltage: The LM393 has a maximum input offset voltage of 5mV, which determines its accuracy in performing precision voltage comparisons. A lower offset voltage means the comparator can provide higher accuracy when receiving input signals.

  • Response Time: With a response time of 1µs, the LM393 can perform rapid signal comparison, making it ideal for high-frequency response applications such as signal detection and digital control.

  • Output Drive Capability: The LM393's open-drain output can drive low-current loads (typically 20mA) and, with its low-power consumption (typical quiescent current is 200µA), is well-suited for low-power devices.

  • Supply Voltage Range: The LM393 supports a wide supply voltage range: single-supply voltage from 2V to 36V, and dual-supply voltage from ±1V to ±18V. This broad voltage range allows it to be used with a variety of power configurations, meeting different application needs.

2.3 Typical Applications

The LM393 is widely used due to its fast response and low power consumption. Some common applications include:

  • Overvoltage/Undervoltage Detection: In battery management systems, smart power supplies, or voltage monitoring circuits, the LM393 is used to detect if a voltage exceeds a preset threshold. If the voltage is abnormal, the comparator will trigger a signal to activate an alarm or shut down the system.

  • PWM Generation: In PWM (Pulse Width Modulation) control, the LM393 is often used to generate a comparison signal for controlling current or voltage regulation. By accurately comparing voltages, it enables efficient power management.

  • Sensor Threshold Triggering: In sensor circuits, the LM393 is used to detect changes in external sensor signals. When the sensor signal exceeds or falls below a specific threshold, the LM393 generates a corresponding trigger signal to drive subsequent circuit actions.

With its fast response, low power consumption, and strong output driving capability, the LM393 is an ideal choice for a wide range of voltage comparison and control tasks.

3. Detailed Analysis of the LM358 Dual Operational Amplifier

3.1 Basic Structure and Function

The LM358 is a dual operational amplifier with a push-pull output characteristic. Unlike the open-drain output of a comparator, the LM358’s push-pull output can provide both positive and negative current, enabling linear output. This allows the LM358 to offer higher precision and stronger driving capability during signal amplification. The LM358 is designed for linear amplification and signal conditioning, making it ideal for precision signal gain and processing applications such as filtering and amplification. As a result, it is an excellent choice for circuits that require linear gain, such as high-quality audio processing and sensor signal conditioning.

3.2 Key Parameters

The most important parameters for the LM358 are the gain-bandwidth product and the slew rate. The gain-bandwidth product is 0.7MHz, meaning the LM358 can provide stable gain within the mid-to-low frequency signal range. Its slew rate is 0.3V/µs, ensuring stable signal amplification at higher frequencies without distortion. Additionally, the LM358 features a high input impedance, making it suitable for signal conditioning tasks that require high input impedance. It supports both single-supply and dual-supply configurations, providing greater design flexibility for various power configurations.

3.3 Typical Applications

The LM358 is widely used in active filters, current/voltage buffers, and small signal amplification. As an active filter, the LM358 can perform frequency-selective amplification of signals, filtering out noise and enhancing the target signal's quality. In current/voltage buffer applications, the LM358 effectively isolates different circuits, improving signal transmission efficiency and preventing load effects. In small signal amplification, the LM358 can provide high gain for amplifying weak input signals, making it widely used in sensor interfaces and analog signal processing systems. Its versatility and high performance make the LM358 a core component in many analog circuit designs.

4. Core Differences Between LM393 and LM358

4.1 Input/Output Characteristics

The input and output characteristics of the LM393 and LM358 differ significantly. In terms of input characteristics, the LM393, as a comparator, does not require phase compensation. Its primary focus is on rapidly responding to changes in input signals for level comparison. The LM358, as an operational amplifier, requires phase compensation at the input to ensure linear amplification and stable operation, especially under high gain or high-frequency conditions, to prevent oscillation.

In terms of output characteristics, the LM393 uses an open-drain output, which requires an external pull-up resistor to generate a high-level signal when the output is high. This makes it suitable for applications like voltage level comparison and triggering controls. On the other hand, the LM358 uses a push-pull output, which provides stronger output drive capability and is better suited for applications that require linear amplification and continuous output.

4.2 Speed and Stability

In terms of response time, the LM393 is faster, capable of completing signal comparison within 1µs. This gives it an advantage in applications that require high-speed detection and response. However, the LM358 prioritizes linear stability. Its design goal is to provide precise gain and stable output, so it is slower with a slew rate of 0.3V/µs, making it more suitable for signal amplification rather than high-speed reaction applications. Additionally, the LM393 is not suitable for use in negative feedback applications or closed-loop amplification circuits, as it is designed for open-loop operation with a switching output. In contrast, the LM358 can effectively operate in closed-loop systems, providing stable gain and feedback control, making it ideal for linear amplification circuits.

4.3 Power Consumption and Driving Capability

In terms of quiescent current, the LM393 has a very low quiescent current of just 200µA per channel, making it suitable for low-power designs. In comparison, the LM358’s quiescent current is slightly higher, with a typical value of 300µA per channel, but it still falls within the low-power range, suitable for general analog signal processing tasks. Regarding output current capability, the LM393’s open-drain output can drive relatively small loads (typically 20mA), while the LM358’s push-pull output can drive stronger loads. This makes the LM358 suitable for applications that require higher current driving capabilities, especially in current amplifiers and voltage buffer circuits, where the LM358’s output can provide stronger driving currents, ensuring stable signal transmission.

5. Application Scenario Comparison Analysis

5.1 When to Choose LM393?

The LM393 is best suited for applications that require a digital logic interface. For example, when driving a microcontroller (MCU), the LM393’s open-drain output characteristic allows it to output standard high/low signals and effectively interact with the MCU in digital signal processing. This feature makes the LM393 widely used in signal triggering, logic decision-making, and other applications that require direct integration with digital systems. Additionally, the LM393’s high-speed switching control capability makes it ideal for applications that require fast response, such as motor speed control. Due to its low response delay, the LM393 can quickly monitor input voltages and generate corresponding digital outputs, making it very suitable for real-time motor drive and control systems.

5.2 When to Choose LM358?

The LM358 is ideal for analog signal amplification or integration/differentiation circuits. Its push-pull output feature enables it to perform excellently in circuits that require continuous linear amplification, such as in audio amplification, voltage amplification, and sensor signal processing. The LM358 also stands out in low-power sensor signal conditioning applications. Its low quiescent current makes it an excellent choice for portable or battery-powered systems. In sensor interface circuits, the LM358 can efficiently amplify weak analog signals, providing accurate signal processing while maintaining low power consumption, making it suitable for long-running applications.

5.3 Warning on Incorrect Usage

In some cases, replacing an operational amplifier with the LM393 can lead to oscillation issues. Since the LM393 is a comparator, it is designed without negative feedback, which can cause instability or oscillation in closed-loop amplification circuits. If the LM393 is used in a linear gain circuit that should have used an operational amplifier, the system may become unstable, causing erratic outputs or noise. On the other hand, replacing a comparator with the LM358 can result in excessive delay. The LM358’s slower response time, especially in high-speed switching control and over-voltage protection applications that require real-time response, can cause control delays or signal distortion. Therefore, it is crucial to carefully choose between the LM393 and LM358 based on actual application requirements to ensure the proper functioning of the system.

6. Design Considerations

6.1 Key Points for Peripheral Circuit Design

Pull-up Resistor Configuration for LM393:

Since the LM393 is an open-drain output comparator, an external pull-up resistor is needed at the output terminal to generate a valid high-level output. When designing, it is necessary to choose an appropriate pull-up resistor based on the load requirements and operating voltage. For low-power devices or logic circuits, higher resistance values for the pull-up resistor (such as 10kΩ) are typically used. If the output is driving an LED or other load, lower resistance values (such as 1kΩ to 5kΩ) may be required to ensure sufficient current and stable voltage. It is important to note that the choice of pull-up resistor will affect the output signal’s response speed and power consumption, so it should be adjusted based on the specific application.

Phase Compensation and Interference Immunity Design for LM358:

As an operational amplifier, the LM358 requires phase compensation, especially in high-gain applications. Phase compensation helps stabilize the gain and prevent high-frequency oscillations or instability. In terms of interference immunity, EMI (electromagnetic interference) can be reduced using appropriate filters, shielding, and power decoupling techniques to minimize its effect on the LM358’s performance. To ensure stability and immunity, suitable filter capacitors can be added at the input and the PCB layout should be compact to reduce high-frequency noise interference.

6.2 Power Supply and Noise Management

Common-Mode Voltage Limits for Single-Supply Operation:

Both the LM393 and LM358 can operate in a single-supply mode, but it is important to consider the common-mode input voltage range when designing. The LM393’s common-mode input voltage range includes ground, so it can be directly connected to ground-level signals. However, for the LM358 in single-supply operation, the lower limit of the common-mode input voltage is typically above ground. It requires a certain input voltage "headroom" to operate correctly. When choosing a single-supply power source, it is essential to ensure that the input signal voltage range meets the device’s requirements, otherwise, signal distortion or comparator failure may occur.

Layout Techniques to Avoid Ground Loop Interference:

When designing the PCB, ground loop interference can affect the performance of the LM393 and LM358, especially in noise-sensitive applications. To avoid this issue, a star grounding layout should be adopted, where all ground traces are connected to a single ground point to prevent loop formation. It is also advisable to minimize signal path lengths to reduce transmission time and the effect of noise. Additionally, adding a ground plane can enhance power decoupling capabilities and minimize interference between the power and ground, thereby improving the overall system stability and noise immunity.

7. Frequently Asked Questions (FAQ)

Can the LM358 be used as a comparator? How to optimize it?

The LM358 is fundamentally an operational amplifier and is not specifically designed for comparator functions, so there are some limitations when using it as a comparator. For example, the LM358 has a slower response time, does not feature open-drain output, and cannot directly drive digital logic levels, which may result in unstable or delayed output signals. To optimize the LM358 for use as a comparator, the following approaches can be considered:

  • Add an appropriate hysteresis circuit in the feedback loop to improve its switching characteristics and reduce noise interference.

  • Use external clipping circuits or level shifters to ensure the output signal reaches the required digital logic levels.

  • Include suitable filtering capacitors to reduce noise in the input signal, ensuring stable operation of the comparator.

Why does the LM393 require a pull-up resistor on its output?

The LM393 is an open-drain output comparator, meaning its output only provides a "low" state (ground level) and a "high impedance" state, and does not directly provide a high-level output. Therefore, a pull-up resistor is needed at the output terminal to pull the signal high and ensure a valid high-level output. Without the pull-up resistor, the output cannot generate a high-level signal, and the signal cannot be recognized by subsequent circuits (such as a microcontroller or LED). The value of the pull-up resistor typically depends on the load current requirements and operating voltage, with common values ranging from 10kΩ to 1kΩ.

Q3: How do they perform in low-voltage systems (e.g., 3.3V systems)?

The compatibility of the LM393 and LM358 in 3.3V systems has its pros and cons.

  • LM393: The LM393 supports single-supply operation, and its common-mode input voltage range includes ground, making it compatible with low-voltage systems like 3.3V. However, when used at low voltages, the selection of the pull-up resistor is critical. It must provide enough current to drive subsequent circuitry.

  • LM358: The LM358 also supports 3.3V single-supply operation, but its minimum input signal voltage generally cannot be lower than ground. Therefore, in a 3.3V system, the input signal must have a certain voltage offset to operate correctly (i.e., it cannot be at ground level). Additionally, the LM358 has a slower response time, so in applications where speed is critical, it may not be suitable to use the LM358 as a comparator.

Jason Lin

Jason Lin is a seasoned electrical engineer and an accomplished technical writer. He holds both master's and bachelor's degrees in Electrical and Computer Engineering from Xi'an Jiaotong University, and currently serves as a Senior Electrical Engineer at BYD company, specializing in the development of IGBT and integrated circuit chips. Not only is Jason deeply knowledgeable in the technical domain, but he also dedicates himself to making the complex world of semiconductors understandable to the average reader. His articles frequently appear on a variety of engineering and electronics websites, providing readers with insights and knowledge on the cutting-edge of the semiconductor industry.

Electronic Parts Index
More
# 0 1 2 3 4 5 6 7 8 9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

We value your privacy

Our website uses cookies to ensure you are getting the best browsing experience, serve personalized content, and analyze our traffic.
By clicking "Accept Cookies", you consent to our use of cookies. Privacy Policy