1. Product Overview
The WeAct ES8311+NS4150B Mono Audio Codec Module is an integrated audio solution designed for microcontrollers and development boards. It combines an ES8311 audio codec chip for recording and playback functionalities with an NS4150B Class D power amplifier, capable of directly driving a 4Ω 2.8W speaker. The module features I2C for configuration and I2S for audio data transfer, along with a built-in electret microphone. This compact module is ideal for expanding audio capabilities in projects such as voice interaction devices, small audio players, and embedded systems.

Figure 1: Top view of the WeAct ES8311+NS4150B Mono Audio Codec Module, showing the main components and pin labels.
2. Safety & Warnings
Important Safety Information:
- Read all instructions before use. Failure to follow these instructions may result in damage to the product or personal injury.
- Keep the device and its cord out of reach of children under 3 years old.
- Keep away from children unless supervised by an adult.
- Do not use this product for purposes other than its intended use.
- Inspect the product before each use; do not use if damaged.
- Follow installation and operation guidelines to avoid injury.
- Do not expose to water or moisture.
3. Package Contents
- 1 × WeAct Studio ES8311+NS4150B Mono Audio Codec Module
4. Specifications
| Category | Details |
|---|---|
| Core Chips | Codec: ES8311; Power Amplifier: NS4150B |
| Audio Interfaces | I2C (SDA/SCL) + I2S (BCK/WS/DI/DO) |
| Amplifier Output Power | 2.8W (into 4Ω Load) |
| Microphone | Built-in Electret Microphone |
| Supply Voltage (VCC) | 3.3V ~ 5V DC (5V recommended for optimal amplifier performance) |
| Dimensions | Compact PCB Board (refer to Figure 2 for details) |
| Compatible With | ARM-based microcontrollers and development boards |
| Battery Included | No |

Figure 2: Dimensional drawing of the module, showing key measurements.
5. Pin Definition
The module features a standard pin header for easy integration. Below are the functions of each pin:
| Pin Name | Description |
|---|---|
| VCC | Power Input (3.3V to 5V DC) |
| GND | Ground |
| SD | Chip Select Pin for ES8311 (often tied high or low depending on configuration) |
| SDA | I2C Data Line |
| SCL | I2C Clock Line |
| MC | Microphone Bias Control (consult ES8311 datasheet for specific usage) |
| BCK | I2S Bit Clock |
| WS | I2S Word Select (Left/Right Clock) |
| DO | I2S Data Out (from ES8311, e.g., microphone data) |
| DI | I2S Data In (to ES8311, e.g., audio playback data) |
| O+ / O- | Amplifier Output (Connect to 4Ω Speaker) |

Figure 3: Close-up view of the module's top side, highlighting pin labels and components.
6. Setup
- Initial Inspection: Before first use, remove any protective films from the device. Inspect the module for any visible damage.
- Power Connection: Connect the VCC pin to a 3.3V to 5V DC power supply and GND to the ground of your development board. For optimal performance of the NS4150B Class D speaker amplifier, a 5V supply is recommended. The ES8311 codec operates at 3.3V, which is supplied by an onboard LDO.
- I2C Connection: Connect SDA and SCL pins to the I2C bus of your microcontroller. This interface is used to configure the ES8311 codec (e.g., sampling rate, gain, input/output paths).
- I2S Connection: Connect BCK, WS, DI, and DO pins to the I2S interface of your microcontroller. Ensure that your microcontroller can provide an MCLK (Master Clock) signal to the ES8311, as it is required for the codec to function correctly.
- Speaker Connection: Connect a 4Ω speaker to the O+ and O- terminals of the module.
- Integration Example:

Figure 4: Example of the module connected to a development board via a breadboard.
7. Operating
Once physically connected, the module's operation involves software configuration and data transfer:
- Codec Configuration (I2C): Use the I2C interface to initialize the ES8311 codec. This includes setting up audio paths (microphone input, speaker output), sampling rates, volume levels, and other audio parameters. Refer to the ES8311 datasheet and available driver libraries for detailed register settings.
- Audio Data Transfer (I2S): Audio data is streamed to and from the ES8311 via the I2S interface. For playback, your microcontroller sends audio data to the DI pin. For recording, the ES8311 sends microphone data from the DO pin to your microcontroller.
- Software Examples: WeAct Studio often provides example code and libraries on their GitHub repository. These resources can be invaluable for getting started, especially for platforms like ESP-IDF and ESPHome, which have been confirmed to work with this module for voice assistant applications.
8. Maintenance
- Keep the device in a dry place when not in use.
- Avoid exposing the module to extreme temperatures or humidity.
- Do not apply excessive force to the module or its components.
- Clean the module with a soft, dry cloth if necessary. Do not use liquids or solvents.
9. Troubleshooting
- No Audio Output/Input:
- MCLK Signal: Ensure that your microcontroller is providing the necessary MCLK signal to the ES8311 codec. This is a common requirement for I2S codecs.
- Power Supply: Verify that the module is receiving adequate power (3.3V-5V). For speaker output, 5V is recommended.
- I2C Configuration: Double-check your I2C initialization code. Incorrect register settings can prevent the codec from functioning.
- I2S Connections: Confirm all I2S lines (BCK, WS, DI, DO) are correctly wired and configured in software.
- Speaker Connection: Ensure the speaker is correctly connected to O+ and O- and is a 4Ω speaker.
- Error Message: