LM358 top-view pinout
With the notch/dot upward, pin 1 is top-left. Pins count down the left side, then up the right.
Understand how op-amps compare voltages, amplify small signals and condition sensor outputs. Build two low-voltage LM358 circuits and measure their behaviour.
An operational amplifier has two high-impedance inputs and one output. The non-inverting input is marked (+), the inverting input (−). The output responds to the difference between input voltages. Its open-loop gain is very high, so even a small input difference can drive the output towards a supply limit.
Functional symbol, not a physical pinout. Use the exact IC datasheet to identify package pins.
Two operating modes: negative feedback can make a controlled linear amplifier. Without linear feedback, the circuit can act as a threshold detector, although a dedicated comparator is usually better for switching.
The LM358 contains two independent amplifiers in one 8-pin package. This diagram shows the common 8-pin DIP/SOIC pin assignment. Check the exact package and manufacturer datasheet before wiring.
With the notch/dot upward, pin 1 is top-left. Pins count down the left side, then up the right.
In a linear negative-feedback circuit, the output moves until the voltage difference between the inputs becomes very small, provided the output has not saturated and the device remains within its operating limits. This is called a virtual short. The inputs are not physically connected.
Conceptual illustration. Practical resistor feedback is shown in the build schematic below.
If the output cannot reach the voltage demanded by the feedback network, it clips or saturates and the virtual-short approximation no longer applies.
Signal enters through Rin to the inverting input. Rf connects output back to that input. The non-inverting input is held at a reference.
Signal enters the non-inverting input. Rf and Rg form a feedback divider at the inverting input.
Compares two voltages. If V+ is higher than V−, output moves high; if V+ is lower, output moves low. Actual output levels depend on the device and load.
Output connects directly to the inverting input and signal enters the non-inverting input. Ideal gain is one; it can buffer a high-impedance source within device limits.
Use one LM358 channel as a low-voltage comparator. One potentiometer creates a reference voltage and another creates a test voltage. Observe the output as the test voltage crosses the reference. This is a learning experiment, not a precision or safety alarm.
Each potentiometer is wired as a divider with its top end fed from +5 V through a 10 kΩ resistor and its bottom end at GND. This limits the wiper range to about 0–2.5 V. LED is connected from +5 V through 2.2 kΩ to pin 1, so it lights when the output is low.
Expected behaviour: pin 1 moves high when Vref at pin 3 is above Vtest at pin 2, and low when Vtest rises above Vref. The LED is wired active-low, so it lights in the low-output state. Offset and noise can cause uncertainty close to the threshold.
The LM358 is not a dedicated comparator. It can recover slowly after saturation and does not have a comparator-style output stage. For robust switching, use a suitable comparator IC and design hysteresis. Never use this experiment as a mains, battery-protection or life-safety circuit.
Use the second LM358 channel as a non-inverting amplifier. A small adjustable DC input is amplified by a resistor-set gain. A multimeter is sufficient for this first experiment; an oscilloscope and signal generator can later be used to study frequency response.
With equal Rf and Rg, ideal gain is 2.
Pin 5 receives the input. Rf connects pin 7 to pin 6; Rg connects pin 6 to GND. Pin 7 is the amplified output.
Example: 0.6 V at pin 5 with gain 2 gives an ideal output of 1.2 V. Small differences are expected from resistor tolerance, input offset and device behaviour. If output stops following input, check feedback wiring and output limits.
Illustrative limit only. Real output swing depends on supply, load and selected device.
This calculator uses ideal gain equations and a user-entered symmetric output limit. It does not model common-mode range, asymmetric output swing, bandwidth, slew rate or load effects.
Single-supply does not mean rail-to-rail. With 5 V supply, the standard LM358 input range is not guaranteed up to +5 V, and its output high level remains below +5 V. These activities keep inputs around 0–2.5 V and do not expect a 5 V output.
Read the Texas Instruments LM358 datasheet. LM358B/BA variants have different specifications; do not mix their figures with the original LM358.
Explore these open lessons at your own pace. For personalised explanations, project-specific troubleshooting, guided practical training or masterclasses, EazyLife offers paid support tailored to your learning goals.
Free or sponsored lesson referrals may be available through active programmes; they are not guaranteed.