How do I control the audio output of a 12V speaker using an ESP32?

Thread Starter

OllieLedger

Joined Dec 14, 2023
3
So, I need to step down the voltage as I want the 12V supply to power the ESP32 as well as the speaker. I also need help knowing what amplifier to use and what voltage step down to use. I've read some things about Buck converters? The ESP32 will have custom code to control the audio output. I'm as inexperienced as it gets with circuitry! I also want to eventually make a custom PCB will all these components built in. I am currently using a breadboard for testing.
 

crutschow

Joined Mar 14, 2008
38,321
I need to step down the voltage as I want the 12V supply to power the ESP32 as well as the speaker.
You can use a buck regulator to drop the 12V to the desired ESP32 voltage (3.3V?) with good efficiency.
There are many listed on Amazon, for example.

There are also many audio amps you can buy, depending upon the speaker power you want (the maximum using a bridge-output type amp is about 8W into an 8 ohm speaker with a 12Vdc supply).
 

Papabravo

Joined Feb 24, 2006
22,058
You do realize that there is no need to connect the supply directly to the speaker. In fact, that would have a decent chance of destroying the speaker.
 

Papabravo

Joined Feb 24, 2006
22,058
Thanks for the response, how would I go about wiring it up?
Since I don't know what you have, I can't give you a precise answer. Tell me more about what pieces you have and what pieces you are trying to acquire.

ETA: this is a "conceptual block diagram" of what I think you should be considering. I did not connect the audio input to anything because you did not specify the source. The purpose of capacitors C1 & C2 is to BLOCK any DC current from either the +12Volt source or the 3.3V regulator from getting to the speaker. the values of C1 & C2 are chosen to have a low impedance at midrange audio frequencies.

1702591125477.png
 
Last edited:

Thread Starter

OllieLedger

Joined Dec 14, 2023
3
Since I don't know what you have, I can't give you a precise answer. Tell me more about what pieces you have and what pieces you are trying to acquire.

I’ve ordered a few bits, the theoretical setup is below.

I’ve bought a TDA2050 amplifier and a DUBEUYEW 2596S buck converter.

The plan is to have the 12V power supply power the speakers via the amplifier, then go through the buck converter and power the esp32, then (somehow) program the esp32 to send sound via the amplifier to the speaker.

As you can probably tell, I’m extremely inexperienced, so please be kind!

What are your thoughts?
 

Papabravo

Joined Feb 24, 2006
22,058
I’ve ordered a few bits, the theoretical setup is below.

I’ve bought a TDA2050 amplifier and a DUBEUYEW 2596S buck converter.

The plan is to have the 12V power supply power the speakers via the amplifier, then go through the buck converter and power the esp32, then (somehow) program the esp32 to send sound via the amplifier to the speaker.

As you can probably tell, I’m extremely inexperienced, so please be kind!

What are your thoughts?
See updated post#5 with a conceptual block diagram. This is NOT an actual wiring diagram.
 

Audioguru again

Joined Oct 21, 2019
6,826
The TDA2050 is obsolete and is not made anymore.
Its minimum supply voltage was 9V. With a 12V supply its output power is about 1.2W into an 8 ohms speaker with low distortion.
 
Top