Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

How to Use LM386: Examples, Pinouts, and Specs

Image of LM386Design with LM386 in Cirkit Designer

Introduction

The LM386 is a popular low voltage audio power amplifier integrated circuit (IC) designed for battery-operated devices. It is capable of delivering up to 1 watt of power to a speaker, making it an ideal choice for portable audio devices, intercom systems, and small audio amplifiers. Its simplicity and ease of use have made it a favorite among hobbyists and professionals alike.

Explore Projects Built with LM386

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of ESP32-Based Solar-Powered Current Monitoring System with OLED Display: A project utilizing LM386 in a practical application
ESP32-Based Solar-Powered Current Monitoring System with OLED Display

This circuit features an ESP32 microcontroller interfaced with a 0.96" OLED display, multiple LDR sensors with voltage dividers, an ACS712 current sensor, and two servomotors. The ESP32 reads analog values from the LDRs and the current sensor, and controls the servomotors. The LM2596 module steps down voltage for the circuit, which is powered by a combination of a solar panel and a 12V battery, with the current sensor monitoring the load current.

Open Project in Cirkit Designer

Technical Specifications

Key Technical Details

Pin Configuration and Descriptions

Pin Number Name Description
1 GND Ground reference for the IC and the common point for the input signal.
2 IN+ Non-inverting input for the audio signal.
3 Vs Supply voltage; connects to the positive terminal of the power source.
4 OUT Output pin that connects to the speaker or output device.
5 Zobel Network Connects to a Zobel network to improve high-frequency stability.
6 Bypass Bypass pin for decoupling the internal nodes to reduce noise.
7 Gain Sets the gain of the amplifier when connected with external components.
8 GND Ground reference for the IC, often connected to pin 1.

Usage Instructions

How to Use the LM386 in a Circuit

  1. Power Supply: Connect the positive terminal of your power source to pin 3 (Vs) and the ground to pins 1 and 8.
  2. Input Signal: Connect your audio input to pin 2 (IN+). If necessary, use a coupling capacitor to block DC offsets.
  3. Output: Connect pin 4 (OUT) to the speaker, with an optional capacitor in series to block DC.
  4. Gain Control: To set the gain, connect a resistor and capacitor between pins 1 and 8. Without external components, the gain defaults to 20.
  5. Bypass Capacitor: A capacitor can be connected to pin 6 (Bypass) to reduce noise.
  6. Zobel Network: Connect a resistor and capacitor network from pin 5 to ground to stabilize the output against high-frequency oscillations.

Important Considerations and Best Practices

Example Circuit with Arduino UNO

// Example code to drive an LM386 amplifier with an Arduino UNO

int speakerPin = 9; // Connect to the input of the LM386

void setup() {
  pinMode(speakerPin, OUTPUT);
}

void loop() {
  // Generate a 1kHz tone for 1 second
  tone(speakerPin, 1000, 1000);
  delay(1500); // Wait for 1.5 seconds
}

Troubleshooting and FAQs

Common Issues

Solutions and Tips for Troubleshooting

FAQs

Q: Can I use the LM386 with a 3.3V supply? A: The LM386 is designed for a minimum of 4V. Operation below this may result in reduced performance or no function.

Q: How can I increase the gain? A: Connect a 10µF capacitor between pins 1 and 8 to increase the gain to 200.

Q: Is the LM386 mono or stereo? A: The LM386 is a mono amplifier. For stereo applications, use two LM386 ICs.

Remember to always consult the LM386 datasheet for the most accurate and detailed information.