1
\$\begingroup\$

I have a simple DC circuit which outputs audio from a ESP8266 attached via 2 wires and a NPN transistor to a simple speaker. It uses this library : https://github.com/earlephilhower/ESP8266Audio/ to read and playback audio, it works and I hear audio.

My circuit at the audio bit looks similar to this:

     2N3904 (NPN)
                            +---------+
                            |         |     +-|
                            | E  B  C |    / S|
                            +-|--|--|-+    | P|
                              |  |  +------+ E|
                              |  |         | A|
ESP8266-GND ------------------+  |  +------+ K| 
                                 |  |      | E|
ESP8266-I2SOUT (Rx) -------------+  |      \ R|
                                    |       +-|
USB 5V -----------------------------+

I also have an audio op amp : OPA2134PA. The Datasheet which I have read can be found here: http://www.ti.com/lit/ds/symlink/opa2134.pdf

Having read this pdf, and various other google searches I cannot determine, what an Audio Op Amp does? I know an op amp, takes the difference between 2 inputs, and amplifies it.

What does this mean for my circuit and more importantly to the sound I hear from my speaker were I to add the OPA2134PA?

I think my pins would be:

1 - Output (negative to speaker?)
2 - Input negative (collector on NPN transistor)
3 - Input positive (USB 5V line . ???)
4 - Negative power supply (??) 
5 - Positive power supply (??)

The pins are likely wrong, so in addition to my simpler, what effect does the audio op amp have on my sound playback question, please also help me figure out how to wire in my audio op amp pins correctly.

\$\endgroup\$
10
  • \$\begingroup\$ The current speaker arrangement produces audio using pulse coding methods, if done well anyway. Sometimes, it is just a simple tone, though. An audio amplifier can usually provide better quality output, but also likely involves different software as well as some thinking about the hardware applied prior to the amplifier input. This is a very different design, though. \$\endgroup\$
    – jonk
    Feb 6, 2018 at 18:08
  • \$\begingroup\$ Output current is limited to +/-35mA, so, not much.If you want more volume, you are looking for an audio power amp, not an opamp, like the LM386 (0.25W) or better. \$\endgroup\$
    – user16324
    Feb 6, 2018 at 18:17
  • 2
    \$\begingroup\$ @RenegadeAndy Given the \$5\:\text{V}\$ USB rail, why don't you consider the TDA8551. It's cheap, widely available, provides the maximum possible volume available due to the bridge tied load arrangement it offers, and it includes a very easy to use volume control pin you can operate from the ESP8266, trivially. It is everything you should hope for in something like this. You will still need a way to generate the input audio signal. (Which can use a digital PWM I/O feeding a passive low-pass filter, I think.) Or find a class-D IC and go that way. \$\endgroup\$
    – jonk
    Feb 6, 2018 at 19:54
  • 1
    \$\begingroup\$ -1 for ASCII art. There is no excuse today. There is a built-in schematic editor, and you can paste images exported from just about any schematic capture software. Note that your ASCII art doesn't show the transistor properly, instead has to label E, B, and C. That's a wiring diagram, not a schematic. That's not how its done here. Closing since I'm not going to read past seeing the ASCII art wiring diagram. \$\endgroup\$ Feb 26, 2018 at 12:09
  • 2
    \$\begingroup\$ @OlinLathrop please, this is not your personal fiefdom, this is a group consensus site. If you close unilaterally you are working outside your brief, if you are "voting" to close then say so and not pretend you will "close" when speaking accurately. The occasional ASCII art is retro, refreshing and quite adequate for two components, no further information would be gained from a visit to the schematic editor. \$\endgroup\$
    – KalleMP
    Mar 4, 2018 at 8:53

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.