Connecting external amp to teensy audio shield's headphone jack

tejas

Active member
Hello everyone,

Is there any advantage of using the audio shield's line out over its headphone jack for connecting an external amplifier? I've been using the headphone jack for this purpose so far, with sgtl5000 volume() set to 0.5, and have not had any trouble with my external amp (Roland KC 220). I'm considering soldering the AC97 pin, but don't have a solid reason to not continue using the headphone jack itself. Please advice.

Thank you!
 
Yes. The headphone jack is only suitable for connecting headphones. Its “ground” connection is not a true ground but a virtual ground sitting at about 1.65V, and if accidentally connected to true ground may do anything from stopping working, making an unpleasant noise, up to damaging your audio adaptor, Teensy, or anything you have connected.

Do yourself a favour: use the line out. As intended.
 
I'm convinced. Now, for connecting the line out, I have found this AC97 on amazon.


Would the output jack on this work as such (without any modification)? This should be the standard connector for PCs.
 
Also, how should I decide the value for lineOutLevel()? I can keep it at default, but want to understand how that's decided.
 
That’s what the documentation states. 67cm cable length seems too long for high quality, though, since the cable doesn’t appear to be shielded.

I’d set the level as high as it will go without overloading the amp input. You can consult the data sheets for SGTL5000 and amp, or just experiment.
 
I can potentially solder an output jack directly to the audio board. The board, however, has two of the nine pins unnamed. I’m assuming they are ground.

The amp data sheet states input level as -20 dBu. However, its own line out is rated at +4 dBu. I’m not sure what the standard for line level is then. The data sheet also mentions 0 dBu = 0.775 Vrms.

I’m not sure how a non zero dBu value translates to Vrms or to peak to peak volts. Is there a rule of thumb or a conversion formula?

In any case, if I am to connect to a different amp in the future or to a mixer on stage, the data sheets of which I won’t have access to (not to their model numbers), I should stick to a fixed value for lineOutLevel(). I would not mind keeping it at default (which is 1.29), but want to understand the reasoning behind it.
 
Last edited:
Go with the default setting first. With pretty much all electronic stuff, your best path is almost always to first get it working the simplest way.

Just to set realistic expectations, if the default setting works fine (eg, no obvious problems like clipping) you'll probably achieve little or no improvement by fiddling with the signal level settings.
 
If you're good with using the volume knob on your amp, I would also recommend using the line level output.

However, if that Roland amp is running from batteries or running from an isolated AC adapter, whether that amp connects to real ground will depend on the other stuff you plug into it. The same goes for Teensy. If you run Teensy from a USB cable, when connected to a regular PC with 3-wire plug, Teensy will get connected to earth ground through the PC. But connected to a laptop or a USB power supply, the USB cable won't get a ground connection. So you may able able to use the headphone output with virtual ground. But it could work fine until you connect something else or change how things are powered, so probably best not to risk it unless you're certain the connections will remain fixed.
 
The amp data sheet states input level as -20 dBu.

Looking quickly at the web page for that amplifier, my guess is channel 1 is meant for a microphone and channels 2 and 3 are meant for guitars or other instruments with magnetic pickups.

It gives a spec or -10 dBu for the aux input, which is still extremely sensitive. By my guess is that spec is with the "Level" knob turned all the way up to 10. For your first try, I'd suggest connecting the audio shield line out to the aux input and turn the knob almost all the way counterclockwise, very close to zero. Run an example program that makes continuous sound, like the WAV file player or File > Examples > Audio > Synth > Guitar which makes a repeating guitar strumming sound. Then turn the level knob up until you get a usable volume.


1764634688530.png
 
If you're good with using the volume knob on your amp, I would also recommend using the line level output.

However, if that Roland amp is running from batteries or running from an isolated AC adapter, whether that amp connects to real ground will depend on the other stuff you plug into it. The same goes for Teensy. If you run Teensy from a USB cable, when connected to a regular PC with 3-wire plug, Teensy will get connected to earth ground through the PC. But connected to a laptop or a USB power supply, the USB cable won't get a ground connection. So you may able able to use the headphone output with virtual ground. But it could work fine until you connect something else or change how things are powered, so probably best not to risk it unless you're certain the connections will remain fixed.
Thanks for the clarity!

There are situations when I am completely on battery (both teensy and roland). I’d be glad to use the headphone jack for those occasions. What should I keep the sgtl5000 volume() to in that case? I’ve been keeping it at 0.5, but would like to optimize that for best audio output.

Also, note that this is a dedicated keyboard amp, which is different from a guitar amp. Keyboard amps generally don’t have high frequency rolloff, nor are they designed to take inputs from magnetic pickups. I use the channel 3 on my roland.

(I’ll reply to your other messages individually, in a bit.)
 
Last edited:
Looking quickly at the web page for that amplifier, my guess is channel 1 is meant for a microphone and channels 2 and 3 are meant for guitars or other instruments with magnetic pickups.

It gives a spec or -10 dBu for the aux input, which is still extremely sensitive. By my guess is that spec is with the "Level" knob turned all the way up to 10. For your first try, I'd suggest connecting the audio shield line out to the aux input and turn the knob almost all the way counterclockwise, very close to zero. Run an example program that makes continuous sound, like the WAV file player or File > Examples > Audio > Synth > Guitar which makes a repeating guitar strumming sound. Then turn the level knob up until you get a usable volume.


View attachment 38477
Thanks for going through the amp specs! Here is my sequence of things to do (when teensy is on battery power). Please correct me.

1. Set sgtl5000 volume() to 0.5. I like to keep it fixed for my application:
2. Connect teensy audio shield headphone jack to aux in on roland and set its level to 0.
3. The actual speaker output is controlled by the 'master' knob on top of the amp (image). I can't really determine 'usable volume' using just the aux level knob. For convenience, I'll set the master knob to 50% to start with.
4. With master at 50%, play audio through teensy, and turn up the aux level knob until the speaker output volume is enough.

A fun thing that I tried today, to determine if the levels of channels 2 and 3 match that of aux, was connecting the Right headphone out from audio shield to R of CH3 and the Left one to L of aux. The output from the shield was mono. What I noticed was that, when I set the CH3 knob on the top to 50%, the master to 50% and aux level to approximately 80% (pointer was horizontal), my headphones connected to amp's PHONES out had left and right balanced. Also, at these knob-orientations, the volume was 'usable' for my specific application. (I haven't tried the 'Guitar' example yet.)

In that experiment, I also noticed that at very low volume from the shield, the intensity on PHONES-left was slightly higher than that on PHONES-right. However, at extremely low volume from the shield, it was the opposite; right was slightly higher than left. The exact happened when I swapped left and right from the shield (shield-left -> CH3 right; shield-right -> CH3 left). In my opinion, this imbalance is because of the way the amp internally treats CH3 and AUX IN differently. Since CH3 (and CH2, CH1) is meant to be used with musical instruments (keyboards in this case), while aux is for audio players (phone/laptop), the subtle high harmonics are more linearly mapped in CH3. I'd prefer to use CH3 for my application, as the high harmonics matter there.

Question: If I was to use the headphone out of the shield with CH3 of this amp, what value in sgtl5000 volume() would closest resemble line level, which CH3 expects? I'm guessing 0.5 is too high.
 
Glad you got it working.

Any specific info about the levels you used... just in case someone with this same Roland KC220 amp later finds this conversation by search and wants to know the best setting?
 
With line out from teensy to channel 3 of the amp, I’m setting both CH3 and master to 50%.
 
I want to share details of my audio project in relation to the topic of connecting an external amplifier to a Teensy. In my setup, I interfaced the Teensy 4.1 with an external amplifier using its MQS output pins. This implementation may also be relevant for others exploring similar configurations.
 
Back
Top