Happy, the AI hardware robot – the mouth – amp and speaker
These are the steps to connect and test the amplifier and speaker for the Building Happy, the AI hardware robot project
We will generate a repeated test beep sequence to hear if the robot can generate sound.
Solder the pins to the MAX98357A amplifier board
Solder the blue speaker output terminal to the component side of the MAX98357A board, the pins to the smooth side

Solder colored wires to the speaker
- Solder a colder color wire to the negative connector of the speaker, a warmer color wire to the positive connector of the 4 ohm 3 W speaker. The speaker polarity is only important if we ever want to use this speaker with another one to play stereo sound. In that case the speaker polarity is very important, as the two speakers need to emit phase correct audio.

Connect the amplifier board
- Push the MAX98357A amplifier board into the breadboard above a notch / ravene
- Connect the speaker to the blue + and – terminals of the board. Colder color wire to -, warmer color wire to +.
- Connect the amplifier board to the ESP32 board based on instructions at Mouth: MAX98357A amp

Get the 5V from the ESP32 board, and use the upper left corner of the bread board to distribute it.
Test the amplifier and speaker
Upload the amp_test.ino file to the ESP32 board
- Connect the USB C cable to the TTL (right side) connector of the ESP32 board
- Start the Arduino IDE
- Make sure the board is selected in the Arduino IDE

- Open the firmware/tests/amp_test/amp_test.ino file

- Click the Upload button

- You should hear a short tune from the speaker