Using the Line Out outputs


#1

The Tympan comes ready to use assuming that you want to use headphones (or ear buds). Just plug the headphones into the black headphone jack, and you’re ready to go!

But some folks have asked about using the “Line Out” outputs instead of the headphone output. Because the Line Out bypasses the headphone amplifier, the hypothesis is that the Line Out might have lower background noise than the Headphone Out. Wow. That’s a great question!

To find out, you would need to do a test. For this test, you would need to:

  1. Connect to the line outputs on the Tympan circuit board
  2. Change the Tympan software to use these outputs instead of the headphone output.

For the hardware connection, you need to take your circuit board out of its protective plastic housing. Then, on the side of the circuit board, you’ll see lots of through-holes. The ones at the bottom are for the Line Out Left and Right (“LO L/R”). Use the holes shown below. [Corrected Nov 3, 2017] The square holes are the Left and Right audio channels. You’ll also need a ground connection. Use either of the corresponding circular holes.

For the software changes, I’ve had to modify the Tympan_Library. Right now, it is not well tested, so I’ve created a new branch in the GitHub repo. You can access the branch here: https://github.com/Tympan/Tympan_Library/tree/feature_enableLineOut. I only changed the two control_tlv320aic3206.h and control_tlv320aic3206.ccp files.

What I did was add a new function “outputSelect”. You can use this function to choose either the headphone output or the line output. The headphone output is still the default, but now you could add this command (plus the argument TYMPAN_OUTPUT_LINE_OUT) to select the Line Out instead.

For a concrete example, open the Tympan example sketch “BasicGain”. Find the line:

audioHardware.inputSelect(TYMPAN_INPUT_ON_BOARD_MIC).

After that line, add this new line:

audioHardware.outputSelect(TYMPAN_OUTPUT_LINE_OUT);

Here’s a screenshot that shows how I added it to my version of BasicGain.ino:

Other than ensuring that it compiles, I haven’t been able to test it. Once I do test it, I’ll merge the code into the main library and update this thread.

Does it work for you?

Chip


#2

Hello
It was I who told you about LOL and LOR lines that I wanted to use to be better visualized with the oscilloscope. As the output of the amplifier headphones makes noise (no gravity of course!). The headphones are less sensitive to the background noise generated by the amplifier. :slight_smile:
Headphones are an electromechanical component that is less fast than background noise.

For my next tests, I keep you informed.
Thank you for your help.
Regards. Juan


#3

Hello,
I tried the new program for LINE OUT. It did not work. Then I tried to find a solution for two days without success. In order for the TYMPAN to work, it is not necessary to validate any of two choices (headphone output, or LINE OUT output). That way, only the headphone output will work!

For the rest it works mainly Bluetooth with which I could read the data on smartphone and on SERIAL MONITOR.


#4

Hello Chip

The Arduino software does not recognize the “output.Select” function written on the “BasicGain” program with new hard output “LINE OUT”.
The proof is that if you delete “Select” from the word “outputSelect”, Arduino recognizes !, that is, the word “output” turns red! Otherwise it will be black!
And the function: “inputSelection” is well recognized by Arduino, because all this word turns red automatically!

Regards
Juan


#5

I’m getting back on this shortly. Hopefully we can make it work smoothly!

Chip


#6

Chip and I did some trouble shooting Friday and came up with some solutions. First, the initial wiring diagram Chip displayed was incorrect. He has since edited his post and it is correct now as of about 5pm on Friday Nov. 3, so if you were using the old diagram, reference Chip’s new diagram or below for the correct wiring:

Wiring

After downloading the “feature-enableLineOut” per Chips instructions in the Above post. Go to your documents folder and change the name of “Tympan_Library-feature_enableLineOut” to “Tympan_Library”.

Library

This is also addressed in the Forum Topic Downloading From Github

Open the “BasicGain” program in the Library you just downloaded. For a fun way to test the program, edit the code as below. This will generate a Sine wave in the right ear and the BasicGain program in the left ear. This verifies that the line out function is indeed separating the left and right channels.


Once the code is edited, recompile as normal, put headphones into the new “Line out” port and enjoy!

Headset