-1
\$\begingroup\$

I'm using RXD to transfer audio to an amplifier (1) and TTL communication with USB/TTL converter (2) for communication. Everything works but I can not get maximum output from the amplifier. When I disconnect the TTL connection (1), the sound volume increase two times!

                     -------------
-------RXD----------|  Amplifier  |   (1)
             |       -------------
             |
             |    ---     ---------------------
              ---| R |---|   TTL USB converter |   (2)
                  ---     ---------------------

When I add 1K resistor between RXD and TTL convert (R), it does not work. Seems the current is not enough. Is there any way to boost the current between RXD and TTL connection (2) without adding noise to the circuit? Like adding a transistor to RXD and get and get output for TTL connection (2)? I prefer not adding a thing between RXD and Amplifier.

EDIT: I use ESP8266 ESP8266Audio, such a great library. Actually, I use I2S pin but using Adafruit Analogue Mono Amplifier using ESP8266 Delta-sigma. TTL-to-USB converter might draw current and affect the amplifier.

\$\endgroup\$
  • 3
    \$\begingroup\$ Please explain what type of amplifier you are using. Where does RXD come from (driver type)? What kind of TTL USB converter? Theres a lot missing here! \$\endgroup\$ – Stefan Wyss Jun 22 '18 at 15:50
0
\$\begingroup\$

This is weird... I2S is digital connection, it either works or it doesn't. The sound volume should not be affected at all...

The only thing I can think of is that you are messing up the I2S communication and getting a lot of dropped frames, which might cause volume drop.

Using RXD for I2S (Audio) and serial communication at same time

So, are you, by any chance, trying to send I2S and serial stream simultaneously? I know that some chips support sharing I2S pins with SPI or UART, but it does not mean you can transmit both streams at the same time.

If the above is not the case then you need to provide more info on your schematics. You specifically mention TTL in serial half. Does this mean the rest of circuit is 3.3 CMOS? If so, then your TTL-to-USB converter might draw too much current from your signal source, disrupting I2S communication. In this case a simple logic buffer IC in place of a resistor should cure the problem.

UPDATE:

Now, that was a case of huge miscommunication, if I ever saw one.

You are driving output pin with very high frequency to simulate audio signal. The output capacitance of TTL converter basically shunts it. Not to mention that you actively driving the output pin of converter, which most likely tries to do the same.

It is quite beyond my understanding why you are using that amplifier instead of true I2S MAX98357 based one, available from same Adafruit. There would not be any problem with pure digital connection (and better sound quality plus an option to have stereo), except the same requirement to make sure MCU and converter do not attempt to drive line simultaneously.

Anyway, I suggest you try analog switch controlled by another MCU pin. This switch will in one position connect audio output to amplifier, in the other connect RX input to converter output. The software should make sure RX pin reprogrammed as input before switching from amplifier to converter.

Look for low channel capacitance switches, like FSA4159, TS5A4624 etc.

\$\endgroup\$
  • \$\begingroup\$ You're absolutely right, I may explain it wrong. I use I2S pin and analog amplifier (PAM8302) in this case \$\endgroup\$ – Hamed Jun 25 '18 at 14:33
  • \$\begingroup\$ @Hamed - you really need to edit your question, as that means you are not using I2S at all, merely using a pin that could alternately have been used for I2S. \$\endgroup\$ – Chris Stratton Jun 25 '18 at 15:01
  • \$\begingroup\$ Added some options for you. \$\endgroup\$ – Maple Jun 25 '18 at 16:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.