The LM386 looks like an op-amp and gets mistaken for one constantly. It is not. It is a fixed-purpose audio power amplifier: gain is set internally, the output stage is built to drive a speaker directly, and the whole chip runs from a single supply as low as 4 V. That combination — no negative rail, no external biasing, milliwatt-to-watt output from a battery — is why a part introduced decades ago still ships in volume: it spent its first decades inside AM-FM radios, intercoms, and TV sound stages, and now sits on nearly every hobbyist audio module sold.
If your task is precision amplification, comparison, or signal conditioning, use an op-amp such as the LM358 or LM324. If your task is making a small speaker produce sound from a battery-powered circuit, the LM386 is the default answer.
LM386 Pinout and Pin Functions

| Pin | Name | Function |
|---|---|---|
| 1 | GAIN | Gain setting (used with pin 8) |
| 2 | −IN | Inverting input, normally grounded |
| 3 | +IN | Non-inverting input, signal input |
| 4 | GND | Ground |
| 5 | V<sub>OUT</sub> | Output, biased at half the supply voltage |
| 6 | V<sub>S</sub> | Supply voltage |
| 7 | BYPASS | Supply ripple rejection bypass |
| 8 | GAIN | Gain setting (used with pin 1) |
Two pin pairs define how the LM386 differs from a generic amplifier.
Pins 1 and 8 connect across part of the internal feedback network. Left open, the gain is 20. Components placed between these two pins raise the gain, up to 200. No other 8-pin audio part uses this arrangement, which is why LM386 boards always show two solder pads or a small electrolytic capacitor near the top edge of the chip.
Pin 7 connects to an internal bias node. A capacitor from pin 7 to ground filters supply ripple out of the signal path. Leaving it unconnected works on a clean bench supply; on a battery being shared with a microcontroller, or any noisy rail, it is the difference between a quiet amplifier and a humming one.
Both inputs are internally biased to ground. A signal source referenced to ground can drive pin 3 directly, with no coupling capacitor and no mid-rail divider. This is the detail that makes single-supply battery designs trivial.
Key Specifications
The LM386 ships in three variants that differ only in supply range and output power. Everything else — gain behavior, pinout, quiescent current — is identical.
| Parameter | LM386N-1 | LM386N-3 | LM386N-4 |
|---|---|---|---|
| Supply voltage | 4–12 V | 4–12 V | 5–18 V |
| Output power (typ) | 325 mW into 8 Ω at 6 V | 700 mW into 8 Ω at 9 V | 1,000 mW into 32 Ω at 16 V |
Shared characteristics, from the TI LM386 datasheet:
| Parameter | Value |
|---|---|
| Speaker load | 4 Ω to 32 Ω |
| Voltage gain | 20 to 200, externally set |
| Quiescent current | 4 mA typical |
| Total harmonic distortion | 0.2% typical (gain 20, 6 V, 8 Ω, 125 mW) |
| Input resistance | 50 kΩ |
| Bandwidth | 300 kHz at gain 20 |
| Power supply rejection | 50 dB (with pin 7 bypass capacitor) |
Two numbers deserve interpretation. The 4 mA quiescent current means four AA cells will idle an LM386 for weeks, which is why it dominates battery projects. The 0.2% THD figure holds at moderate output; pushed toward its power limit the LM386 distorts audibly, and the datasheet power ratings are specified at 10% THD — a level you can clearly hear. Treat the wattage numbers as clipping limits, not listening levels.
How the Gain Setting Works
Internally, the LM386 fixes its own feedback with two resistors: a 15 kΩ feedback resistor and a 1.35 kΩ resistor in the gain-setting leg, the latter brought out to pins 1 and 8. With pins 1 and 8 open, this network sets the gain to 20.
A capacitor across pins 1 and 8 shorts out the 1.35 kΩ resistor at audio frequencies, and the gain rises to 200. A resistor in series with that capacitor lands anywhere in between — 1.2 kΩ in series with 10 µF gives a gain of roughly 50. The capacitor is there to block DC so the internal bias is undisturbed; 10 µF is the standard value, positive terminal toward pin 1.
Choose the lowest gain that reaches full output with your source. Gain amplifies everything at the input — signal, hiss, and whatever the wiring picks up — so a gain-200 amplifier fed from a phone’s headphone output is not louder than a gain-20 one, only noisier. Gain 200 exists for genuinely small signals: electret microphone capsules, guitar pickups, low-level sensor audio.
Minimum Amplifier Circuit (Gain = 20)

This is the complete amplifier: the IC, one electrolytic capacitor, and two stabilization parts. Each component is load-bearing.
The 250 µF output capacitor blocks DC. Pin 5 idles at half the supply voltage, and connecting a speaker directly would push a constant current through the voice coil — heating it, offsetting the cone, and wasting the battery. The capacitor also sets the low-frequency limit with the speaker impedance: 250 µF into 8 Ω rolls off below about 80 Hz. For a small speaker that cannot reproduce deep bass anyway, 220 µF is a fine practical substitute; going smaller than 100 µF audibly thins the sound.
The 0.05 µF capacitor and 10 Ω resistor form a Zobel network from output to ground. A speaker is an inductive load, and its rising impedance at high frequencies destabilizes the output stage. The Zobel presents a resistive load at those frequencies and keeps the amplifier from oscillating ultrasonically. This is the network beginners omit because the circuit “works without it” — until the amplifier squeals, overheats, or radiates interference into everything nearby. Build it in every time; the two parts cost nothing.
Pin 2 goes to ground. Pins 1, 7, and 8 stay open in the minimum build.
Gain = 200 Circuit

The only change from the minimum circuit is the 10 µF capacitor between pins 1 and 8, plus the pin 7 bypass capacitor the datasheet’s own gain-200 schematic includes. At gain 200, discipline that was optional at gain 20 becomes mandatory: keep input leads short and expect audible hiss with nothing playing — 46 dB of gain amplifies the amplifier’s own input noise into the speaker. If the hiss bothers you, the gain is higher than the application needs.
Gain 200 is also where the LM386’s second life lives: guitar amplifiers. A passive guitar pickup delivers exactly the small signal this configuration wants, and driving the chip into clipping produces the raw overdrive that classic one-chip designs like the Smokey and the Little Gem are built around. In those circuits the LM386’s limitations — early clipping, modest power — are the sound, which is why the same IC appears in practice amps and DIY distortion pedals decades after cleaner alternatives became cheap.
Bass Boost

A 10 kΩ resistor in series with a 0.033 µF capacitor, connected from pin 1 to pin 5, sits in parallel with the internal 15 kΩ feedback resistor. At mid and high frequencies the capacitor conducts and the parallel combination increases feedback, pulling the gain down; at low frequencies the capacitor blocks and the gain stays at its full value. The result is about 6 dB of effective bass boost relative to the rest of the band.
The point of this network is the small-speaker problem: the drivers used with an LM386 are typically 40–70 mm cones with almost no low-end output, and the boost partially compensates. Two constraints apply. Do not take the resistor below 10 kΩ while pins 1 and 8 are open — the LM386 is only compensated for closed-loop gains above 9, and heavier feedback shaping makes it unstable. And the boost costs headroom: a boosted bass note clips sooner, so this circuit suits speech and casual playback at modest volume, not maximum-loudness designs.
Stopping Hiss, Hum, and Squeal: The Practical Circuit

Most LM386 problems reported in forums — motorboating, whining that tracks microcontroller activity, oscillation at high volume — are layout and bypassing problems, not defective chips. The practical circuit adds four things to the minimum build, and each one addresses a specific failure:
10 kΩ volume potentiometer at the input. It sets level ahead of the amplifier, and its ground leg gives the input a defined DC path. Use an audio-taper pot if you have one; linear works.
0.1 µF input coupling capacitor ahead of the pot. Required whenever the source is not ground-referenced or carries a DC offset — the PWM output of a microcontroller being the common case.
10 µF bypass capacitor on pin 7. This raises supply ripple rejection to the datasheet’s 50 dB figure. When an LM386 shares a battery with an Arduino or ESP32, the digital supply noise otherwise walks straight into the audio. If your amplifier whines in sync with the code running, this capacitor is the fix.
100 µF across the supply, close to pin 6. The output stage draws current in gulps that follow the audio waveform. On a weak battery or long supply leads, those gulps modulate the supply voltage, feed back to the input, and produce the rhythmic “motorboating” oscillation. A local reservoir capacitor breaks the loop. Add a 0.1 µF ceramic in parallel if the amplifier sits near a microcontroller.
Grounding follows one rule: input ground, pin 4, and speaker ground meet at one point rather than daisy-chaining. Speaker return current is large; routed through the input ground path, it re-enters the amplifier and oscillates at full volume.
Driving It from an Arduino or ESP32
The LM386 is how a microcontroller’s audio output becomes actual sound. A GPIO pin driving a bare speaker delivers a few milliwatts at best and stresses the pin; through an LM386, the same signal fills a room.
The ready-made modules sold everywhere pair an LM386 with the gain capacitor, output network, and a small onboard pot. Two habits make them behave: power the module from the supply rail, not a GPIO pin, and keep the onboard gain pot low — most of the hiss users attribute to these modules is simply the gain turned to maximum.
Wiring for a square-wave tone from an Arduino: GPIO pin 9 through the 0.1 µF coupling capacitor into the volume pot, module powered from 5 V, speaker on the output.
const int AUDIO_PIN = 9;
void setup() {
pinMode(AUDIO_PIN, OUTPUT);
}
void loop() {
tone(AUDIO_PIN, 440); // 440 Hz test tone
delay(500);
noTone(AUDIO_PIN);
delay(500);
}
A 5 V square wave is an enormous input signal for an amplifier with a minimum gain of 20, which is why the volume pot belongs in the path — set it low and bring it up. For actual audio playback rather than tones, PWM output from a tone()-class approach is coarse; ESP32 users get far better results feeding the LM386 from the DAC pins (GPIO 25/26) or an external I2S DAC, with the LM386 doing what it does best: turning a line-level signal into speaker power from a single low-voltage supply.
