
Yes, the LM358 can perform a threshold comparison—but only if the exact device and circuit meet the input, output, and response requirements. It is not a general substitute for a dedicated comparator. An LM393 may be the better candidate for a switching task, but its open-collector output needs a compatible pull-up and receiver. Start with the signal conditions and required response, then compare the documented behavior of each exact part.
Start with the Threshold Task
Define the Required Decision
A threshold detector decides whether a signal is above or below a reference. That differs from using an amplifier to scale an analog signal. In a comparison circuit, the amplifier output can be driven toward its limits. Its behavior there needs a separate review.
Describe the required result before choosing a device. Record the reference voltage, signal range, supply, receiving circuit, and allowed delay. A slowly changing sensor signal does not automatically make every LM358 circuit suitable. The decision may still need to reach a valid logic level within a defined time.
Check the Input Window Before Comparing Speed
Apply the Comparator Input Rules
Record both input waveforms, including the reference and their extremes. Check the selected device's common-mode behavior, allowed differential input, and input ratings separately. Being below the positive supply does not by itself establish acceptable operation. Absolute maximum ratings are not the normal operating window.
TI's application guide for LM324 and LM358 devices explains that this family's common-mode assessment in comparator operation uses the lower input voltage. Do not substitute the average of the two inputs. The other input still has its own applicable voltage and differential limits.
The applicable common-mode range includes ground on a single supply, but does not extend to the positive rail. Use the correct table in TI's LM358 family datasheet. It separates LM358 and LM358A from LM358B and LM358BA. Check the LM393 candidate separately rather than copying the same limits.
This step should produce an input window that the proposed device can support. If the supply, reference, or signal extremes are unknown, record that gap. Comparing timing values before resolving those inputs can lead to the wrong selection.
Separate Overload Recovery From Response Time
Every Timing Value Needs Its Conditions
Low signal frequency and acceptable decision delay are different requirements. Review what happens when the input crosses the threshold after the output has been driven toward a limit. Amplifier bandwidth and slew rate alone do not establish the response of that comparison circuit.
TI's comparator-use discussion also addresses recovery behavior. Its examples belong to the devices and conditions actually identified. An application-note waveform is not a measured result for every part sold under the LM358 family name.
The B and BA electrical-characteristics table in SLOS068AB includes a typical overload recovery time, tOR. It is therefore wrong to say the whole family has no recovery information. That typical entry is not a universal maximum response guarantee. The original LM358 and LM358A use a separate table.
For either candidate, retain the applicable test conditions. Relevant conditions include supply, temperature, input overdrive, output load, and the required transition. Comparator propagation delay and amplifier recovery measurements may use different tests or output criteria. Do not rank them as equivalent numbers or derive a universal operating frequency from them.
Match the Output to the Receiving Circuit
An Open Collector Changes the Interface
The LM358 has an amplifier output whose usable high and low levels depend on its specified conditions and load. Do not assume it produces both supply rails. Check those levels against the receiving circuit's actual input thresholds and current requirements.
The TI LM393 datasheet describes an open-collector output. When the output transistor is off, that node is high impedance. An external pull-up or equivalent bias network establishes the high level. When it turns on, the output sinks current. The pull-up voltage, resistance, and load must suit the exact device and receiver.
| Interface Check | LM358 Threshold Circuit | LM393 Candidate |
|---|---|---|
| High state | Verify the specified output swing under load | Verify the level established by the pull-up network |
| Low state | Verify the loaded low level | Verify the low level at the required sink current |
| Output transition | Review recovery and output movement under the actual conditions | Review propagation conditions, pull-up, and capacitance |
| Receiver connection | Check valid input levels and loading | Check valid input levels and the complete collector network |
A larger pull-up resistance is not automatically a better choice. TI identifies pull-up and capacitive loading as factors in LM393 response. The dedicated-comparator label does not remove the need to check the complete interface.
Decide Between LM358 and LM393 Against the Recorded Requirements
The Record Must Name an Exact Candidate
Keep the manufacturer and complete ordering code with the selection. An offer identified as LM358DR should not silently inherit LM358B timing data. Likewise, write the complete proposed LM393 code rather than approving a family name. Neither naming nor a matching package proves functional interchangeability.
If the design needs documented comparator response that the proposed amplifier data does not establish, prefer a dedicated comparator candidate. Select LM393 only if its input window, timing, and output network fit. If they do not, another comparator may be needed.
| Requirement to Record | Evidence to Review | Conclusion to Avoid |
|---|---|---|
| Supply and input window | Exact variant limits and expected signal/reference extremes | Any voltage below the supply is acceptable |
| Required response | Applicable timing conditions and the application's allowed delay | A typical number guarantees every transition |
| Output interface | Receiver thresholds, pull-up where needed, and loading | A dedicated comparator connects without interface review |
| Accepted candidate | Complete code, design revision, reviewer, and conditions | One sample result approves every offered unit or design |
Use the same discipline when recording an approved alternative in a BOM request. Keep a proposed change separate from an accepted one. If a test supports the decision, retain its device, circuit, conditions, and result. An inspection or test report answers only the questions its scope supports.
FAQ
Can LM358 Be Used for a Slow Threshold Detector?
It can be considered when the exact device meets the input, output, and response requirements. Slow signal movement alone is not sufficient. Confirm the input window, loaded output levels, and the delay the application can tolerate before accepting the circuit.
Does LM358 Have an Overload Recovery Specification?
Check the variant. TI's SLOS068AB lists a typical tOR entry for LM358B and LM358BA. Do not apply that entry to the original LM358 or turn a typical measurement into a universal maximum response guarantee.
Can an LM358 Output Connect Directly to a Microcontroller Input?
Only after checking the specific interface. Compare the amplifier's loaded output levels with the microcontroller's input limits and thresholds. Include the supply conditions. The two device names alone do not establish a valid logic connection.
Does LM393 Need a Pull-Up?
Its open-collector output needs an external pull-up or equivalent bias network to establish the high level. Select that network for the exact comparator, receiver, and load. Do not assume a larger resistor or a familiar logic voltage suits every circuit.
Is LM393 a Direct Replacement for LM358?
No general replacement follows from their names or package similarity. They perform different functions and use different output interfaces. Review the complete candidate against the actual task, input conditions, timing, and receiver before accepting a BOM change.
Keep the Choice with Its Conditions
For a threshold task, first establish valid inputs. Then review recovery and response, followed by the loaded output interface. Choose the exact device that meets those requirements. Keep any remaining uncertainty visible in the selection record instead of treating a family name or a single successful demonstration as approval.


