Teensy 3.5/3.6 and simple headphone hookup

Status
Not open for further replies.
Hi,

This may be a super simple, super naive question. I have a project I wanted to revive from a few years ago, where I was using a Teensy audio board and Teensy 3.2 (I think). I was looking at the new 3.5/3.6, and the added speed and larger numbers of analog inputs look promising, so I have one arriving this weekend!

In my project, I want to play/mix a bunch of in-memory audio samples onto headphones. With the dual DAC output now, my question is, is it reasonable to skip the audio board and just output directly from the teensy to headphones? If so, I'm curious if anyone can point me at best practices/guidance for hooking up headphones directly to the DAC outputs on the teensy 3.6? (note: I can probably get away without stereo, actually, so I suspect I only really need a single DAC, so I'm open to either).

All the usual issues apply; I'm going to have analog sensors inputting to the board, will have some LEDs and perhaps a small OLED display, so I'd like to have some filtering. And, of course: I'm a CS person, using this to play with sensors and arduino, it's been dozens of years since I did basic electronics, so I'm mostly naive when it comes to the circuits side of things (more that I should admit).

Thanks for any help.
 
If this if for a one-off and your time is worth anything to you then absolutely the audio board is the way to go.

Technically you could buy a DIP style audio amp and a few discreet components on a breadboard for a few bucks but not as a novice it's not worth it unless that's what you want to do for a few weekends.

You could likely find some PC-amplifier-module boards that could talk to the ADCs on the Teensy and come a fair bit cheaper than the Audio Board but you still have to get them working too.
 
If you want something small and portable, indeed the audio shield is the way to go, since building your own little amp board would involve quite a lot of the hardware design stuff you're looking to avoid.

If something big and bulky is ok, you might have other options. For example, I have a M-Audio AV40 speaker on my workbench. When I want to do a quick test to hear the DAC output, I just connect the DAC pins to the "aux" input and then listen to the speaker, or plug in headphones. Big, bulky, expensive... but very quick & easy if the AV40 is already on your desk!

maudio.jpg

I bought that speaker years ago, specifically because it had both of those on the front panel. :)

If you have something similar laying around, like almost any non-USB computer speakers, maybe it can amplify the signal to let you listen easily.
 
If you want something small and portable, indeed the audio shield is the way to go, since building your own little amp board would involve quite a lot of the hardware design stuff you're looking to avoid.

...

Hi Paul

Another question:

I read that the audio shield has to have very short connections to the teensy. Are there problems to be expected when the teensy and the audio shield are both connected by the same "motherboard" aka a simple two layer pcb where and the teensy and the audio shield can be plugged in?
 
A few inches is fine. The quality of the GND connection makes a difference. Running the GND trace next to MCLK and BCLK helps.

For longer wires, adding a small series resistors close to pins 7, 11 & 23 may help. The exact resistor value to use depends on your PCB layout. A lower value (like 33 to 100 ohms) would be used if you have a 4+ layer PCB with the ground plane directly underneath the signals. For a 2 layer board where the ground runs alongside the signal, a higher value (like 100 to 330 ohms) would be used. But even if you don't get the resistor perfectly matched to the characteristic impedance of your PCB layout, even getting somewhat "close" makes a huge improvement in signal quality and a reduction in crosstalk.
 
I use this unit for similar reasons for my headphone listening/testing of various audio devices. It has a gain switch for selecting High and Low to cover most situations.

Hi

Have you tested it with the teensy?

I also found the lm4881 based amp, but it needs 12V and the board is rather large.


BTW. I have nothing against the audio shield, but I don't like the nr of connections to make for a simple headphone output.
BTW2. Adafruit has some small 2W audio amps but no headphone amp.
 
LM386 is a standard workhorse for headphone amplification and the passive parts count can be as little as two caps and a resistor to condition the signal (if pre-set gain of 20 is sufficient, otherwise another cap and resistor may be needed).
Plus it will work with 5V supply.

But it's not trivial and the audio board is supported by the tutorial making it a much more attractive choice for electronics noobs.

The connections between the boards, however, is a bit of a barrier for the soldering challenged and the amp-only option just needs power and signal from the Teensy.
 
LM386 is a standard workhorse for headphone amplification and the passive parts count can be as little as two caps and a resistor to condition the signal (if pre-set gain of 20 is sufficient, otherwise another cap and resistor may be needed).
Plus it will work with 5V supply.

But it's not trivial and the audio board is supported by the tutorial making it a much more attractive choice for electronics noobs.

...

About the LM386: are there more considerations than written in the last of kurtE's posts Connecting-a-Speaker-to-Teensy-3-1-DAC-A14?
 
I have had several projects needing output from teensy to amp speakers or headphones, so I have been following this thread to see what best solutions to the queries people are posting...??
I don't seem to have any problem I would use 22uf or 47uf etc as coupling to block the DC and maybe a 220 ohm or 470 ohm with a 0.1uf cap to AGND as low pass filter.
Also to provide user control of tone and volume I would use a digital filter in teensy and adjust the corner freq. using a touch button, and add a mixer in teensy so as to adjust the gain for volume control, again with a touch button. This seems to provide good enough control for headphones of 32 ohms or more. I wouldn't connect 4 or 8 ohm speakers direct. If user want more sound amplfication then use any sound system with Linein to amp/speakers unit.

Would the LM386 not work in this situation...same as any other amplifier, input AC coupling would block the DC..??...and why worry about the LM386 being powered by 12 volts if needed...??
 
The DAC pins on Teensy are not meant to drive 32 ohm headphones. The maximum recommended current is ~1 mA, which corresponds to driving about 3.3K. An amplifier chip should be used for 32 ohm headphones or an 8 or 4 ohm speaker.
 
...
Would the LM386 not work in this situation...same as any other amplifier, input AC coupling would block the DC..??...and why worry about the LM386 being powered by 12 volts if needed...??

The LM386 can be powered by 5V. This means that teensy and amplifier can use the same supply and battery 5V solutions are easily available. Those can charged by usb (and testing can be done while powered by usb).
 
If this if for a one-off and your time is worth anything to you then absolutely the audio board is the way to go.

Technically you could buy a DIP style audio amp and a few discreet components on a breadboard for a few bucks but not as a novice it's not worth it unless that's what you want to do for a few weekends.

You could likely find some PC-amplifier-module boards that could talk to the ADCs on the Teensy and come a fair bit cheaper than the Audio Board but you still have to get them working too.

It's more or less a one-off; I am trying to make the project as small (or, specifically, narrow) as possible, since it's a musical instrument and the wider audio board was something I was hoping to get rid of.

I'll stick with the audio board for now, perhaps some day in the future I'll take those two weekends and figure it out. :)
 
Paul is saying DAC pins are not meant to drive any real load, i.e. small resistance value... 32, 8, 4 ohm are all way to low but they are not all the same.
 
It may not be the best quality, but I like the little Stemma speakers with built-in amplifiers that Adafruit sells. I've used them directly on the Teensy 3.5/3.6 DACs. You can buy the little Stemma cable to attach 3 jumper wires to use on a breadboard. Or you could solder wires to the larger holes on the speaker:


I usually plug the power pin into VIN, but you can also use 3.3v.
 
Connecting DAC to low OHM speakers directly will not work.
The link below shows a simple means to connect headphone or earphones directly....make sure they are 32 ohm or more.
It gives plenty of volume for direct over ear and volume and tone can be controlled within teensy, and use the internal ref. voltage.
My post that references this is the Spice simulation on post #7 in the link below.

https://forum.pjrc.com/threads/50987-Connecting-DAC-directly-to-powered-speakers-Result?highlight=spice
 
Status
Not open for further replies.
Back
Top