| HW-044 Pin | ESP32 GPIO Pin | |------------|----------------| | VIN | 5V (or VIN) | | GND | GND | | BCLK | GPIO 26 | | LRC | GPIO 25 | | DIN | GPIO 22 | | GAIN | Float (default) or to VIN/GND | | SD_MODE | Connect to 3.3V (High) | 4.2 Connection to Arduino Uno (Using I²S Library) Note: Standard Arduino Uno does not support I²S natively on all pins. Use an Arduino Due or Zero for best results, or a software bit-banging library.
# Enable I2S dtoverlay=max98357a
*The MAX98357 supports 3dB and 6dB, but the HW-044 only exposes these three options via the GAIN pin. hw-044 datasheet
void setup() Serial.begin(115200); WiFi.begin("SSID", "PASSWORD"); while (WiFi.status() != WL_CONNECTED) delay(1000);
Introduction
| HW-044 Pin | Arduino Due Pin | |------------|------------------| | BCLK | Pin 3 (DAC1) | | LRC | Pin 2 (DAC0) | | DIN | Pin 9 (DAC2) | | Others | Same as above | 5. Gain and Channel Configuration (Pin Strapping) The HW-044 module allows you to configure the amplifier gain and audio channel selection by connecting the GAIN and SD_MODE pins to either VIN, GND, or leaving them floating. Gain Settings (via GAIN pin) | GAIN Connection | Gain (dB) | Output Level (max) | |----------------|-----------|--------------------| | Float (default) | 9 dB | ~1.4x input | | VDD (VIN) | 12 dB | ~2.0x input | | GND | 15 dB | ~2.8x input | | Not available* | 18 dB * | Not on HW-044 |
Raspberry Pi can use the HW-044 via the device tree overlay: | HW-044 Pin | ESP32 GPIO Pin |
For 44.1 kHz / 16-bit stereo, BCLK = 44,100 × 16 × 2 = 1.4112 MHz. The HW-044 handles this easily.