mp. ESP32-CAM Music Player

Do you know that you can play music with ESP32-CAM module? It may seem unrealistic to some, but the module has an unbuilt micro SD card socket and an 8-bit stereo DAC, which makes it a simple but efficient platform for playing music. What about the inbuilt camera? You may remove it, of course! But you may also leave it in place for future use, if you decide to install CameraWebServer, instead. Now, let’s focus on how to build a sound player. The inbuilt stereo DAC may be programmatically connected to GPIO25 and GPIO26 pins, which are not available on ESP32-CAM line connectors. Instead, precise soldering is needed to connect two wires directly to ESP32 module on a tiny ESP32-CAM PCB. This is the most difficult part and the rest is easy. One only needs a headphones plug and a 330 ohms resistor, as shown on the schematic.

Optionally, you may also rewire GPIO33 to Vcc pin and use it to connect a feature (micro)switch. The pin originally provides connection to either internal +3.3 V power supply (through AMS1117 regulator), or external (+5 V) power supply that powers AMS1117 regulator. On a new PCB Vcc pin is usually connected to +3.3 V via a zero-ohm resistor. If the latter is removed, GPIO33 may be rewired to Vcc pin. Though the red LED remains connected between +3.3 V power supply via 1 k ohm resistor, it is now possible to add an external switch to the ground through a 330-ohm resistor. The resistor prevents short-circuiting of GPIO33, when GPIO33 is programmed as a digital output and set to a high logical level (+3.3 V). When GPIO33 is programmed as an input the resistor conducts the current through the red LED (which lights up) and assures a low logical level on GPIO33. See ESP32-CAM Secure Offline Video Recorder article for more details.

What about firmware? There are many projects on the internet that feature playing MP3 or WAV music files through stereo DAC to your headphones… Program your firmware, plug in the headphones. Now, you can listen to the music!