recommended DAC solution for 4.x?

jeglin

Member
I’ve been searching the forums for my question but I feel like I’m missing something simple. I have 2 Teensy 3.6s and a bunch of 4.1s. The dual 20kHz DACs on the 3.6 are GREAT, but since 3.x are no longer made, my students have to get the 4.x boards, but those don’t have the DACs.

Question: what is the recommended DAC solution for 4.x users to recreate the 3.6 features?

I see the PT8211 Audio Kit but I’m not sure if that’s the recommended solution based on my reading, and my goal is not audio per se. I want dual DACs for generating Lissajous patterns for example, or driving inputs of 2-channel instrumentation (e.g., laser galvanometer).

Thanks for any advice you can provide.
 
Jeglin:
Most of the DAC's you will find mentioned here on the forum are used specifically for audio work, and since the human ear is not a linear device a lot hardware design is built in to these products to compensate for this. Most of them are AC coupled so DC accuracy is very bad.
I know of at least four devices (there might be more):
The Teensy4 Audio board,
The PCM5102 DAC,
The UDA1334 DAC,
The PT8211 DAC.

If you do a forum search for these devices you will find a lot of info about the use of these devices.

If you need a DC to light accurate device, you may have to sort through the Analog DAC pages of various Manufacturers such as Analog Devices, TI, and many others offering these types of devices.

There are a few very good analog expert engineers here on the forum that could give more advice on this subject, perhaps they will chime in.

Regards,
Ed
 
Last edited:
Thanks Ed, I will direct attention to these.

FTR "accuracy" isn't high on my list at this point. Speed and the fact that there are 2 DACs on the 3.6 are the best feature. This is a teaching environment and I'm mostly looking to demonstrate what is possible rather than do it with extreme fidelity or accuracy; in fact, some imperfections are not unwelcome. Hopefully others will include more suggestions.
 
Jeglin:
OK, I understand as I have been teaching electronics to mostly graduate engineers for over 40 years. It seems that going to a university for an education, for a long time (more than 40 years) is only about passing tests, not about actually learning anything. I visited the EE lab of a local UC university in the early 1980's and was appalled by the equipment they had. All of it was at least 20 years old, the O-scopes were the same as the ones I used in High School in the late 1960's. I could go on but I digress.

If you are interested the PCM5102 DAC (PCM510x A2.1 VRMS, 112/106/100dB AudioStereoDAC with PLL and 32-bit, 384 kHz PCM Interface) is probably the best of the lot when it comes to quality of output, and it is supported by the audio library and it is a 16 bit DAC.

These are readily available on eBay, amazon, and Ali Express and they are inexpensive.

Regards,
Ed
 
If you are certain that your application is AC, any of the DACs will likely work of you. If you expect to do very low frequencies or DC, then the PT8211 becomes a good choice. The PT8211 is a straight-up 2-channel R2R DAC driven by I2S, and the high-pass output capacitors can be replaced with wires to produce a not-too-bad 2-channel signal generator. I am building a multi-channel signal generator project using a set of Teensy+PT8211 sets.

PT8211 output ranges from (very approximately: my notebook is at work...) 0.83V to 2.4V, centered at 1.66V. I am not sure now consistent these voltage specs are from chip to chip yet. Testing its capabilities shows that a Teensy 4.1 can drive the PT8211 at 500k samples/second comfortably, and a 100 MHz oscilloscope shows that the output is surprisingly clean (not perfect) even at high sample rates. We are planning to use an active low-pass filter for cleaning up high frequencies / anti-aliasing, and to adjust signal levels to suit our project.

I have not tried the audio board (based on NXP SGTL5000), it may also work.
 
it is supported by the audio library and it is a 16 bit DAC
Yes, with the Teensyduino supplied Audio library, the DAC operates at 16 bit, 44.1kHz.
With the OpenAudio_ArduinoLibrary, you can take it up to 24bit and higher sample rates. Although a sample rate higher than 48kHz is not really useful since the PCM5102A has 8x internal oversampling [up to 384kHz].

Paul
 
What if it's not an audio application, and you just want 0-3.3VDC at something like 10-100 kHz?

Joe:
Than this quote is probably the action to follow:
If you need a DC to light accurate device, you may have to sort through the Analog DAC pages of various Manufacturers such as Analog Devices, TI, and many others offering these types of devices.

Regards,
Ed
 
FTR "accuracy" isn't high on my list at this point. Speed and the fact that there are 2 DACs on the 3.6 are the best feature. This is a teaching environment and I'm mostly looking to demonstrate what is possible rather than do it with extreme fidelity or accuracy; in fact, some imperfections are not unwelcome.

Sounds like PT8211 would be a useful starting point.
 
A good solution for student lab use might be the Adafruit MCP4728 quad 12-Bit DAC

https://learn.adafruit.com/adafruit-mcp4728-i2c-quad-dac

It's reasonably priced at $7.50 and in stock. It uses an I2C interface, so you'll only need 4 wires to connect to it. Sample code using the Wire library should be available.

If you want a faster and more precise DAC, I used the LTC1655L on a project a few years ago. It runs off 3.3V and provides an output of 0 to 2.5V with 16-bit resolution. It is just a single-channel device, but it comes in an SO8 package which can be soldered to a proto board even with eyes and hands in their mid-70's.

The LTC1655 is fairly expensive at ~$20 at DigiKey. You're paying for a fairly good reference voltage generator, 750KHz update rate and +/- 1LSB differential non-linearity. However, like many other LTC and Analog Devices chips, stock is low to non-existent at most distributors.
 
A good solution for student lab use might be the Adafruit MCP4728 quad 12-Bit DAC

I've got labs already using the 4725 but with either an Arduino or a RPi; however, I've not been able to drive the I2C bus fast enough for my tastes at full bit depth. For teaching purposes this is ok but somewhat boring so I'm looking to up the game without going full-on audiophile.

This is the first time I've included the Teensy in the course. I was really hoping to be able to score more 3.6s than I did :)

If you want a faster and more precise DAC, I used the LTC1655L on a project a few years ago. It runs off 3.3V and provides an output of 0 to 2.5V with 16-bit resolution. It is just a single-channel device, but it comes in an SO8 package which can be soldered to a proto board even with eyes and hands in their mid-70's.

The LTC1655 is fairly expensive at ~$20 at DigiKey. You're paying for a fairly good reference voltage generator, 750KHz update rate and +/- 1LSB differential non-linearity. However, like many other LTC and Analog Devices chips, stock is low to non-existent at most distributors.

I like the look of this; why am I not surprised about supply chain issues...
 
Sounds like PT8211 would be a useful starting point.

Yes and since this one is R2R, that dovetails with another lab where they have to build a 3-bit R2R DAC by hand :cool:

My laser galvo project is AC coupled, but if I decide to do anything where they have to measure a DAC voltage with an ADC, the DC coupled device is more attractive. When I'm not bothered by student projects, I'm planning to dig deep into the audio stuff (summer projects).

Thanks everyone, these are lots of good suggestions to get me going. I'll report back with what I end up doing.
 
I have a fully digital power bench working with the Teensy3.5 using its DAC for controlling the Output.
Is the MCP4922 an alternative for that purpose in case the Teensy3.5 is going down?
 
What about using a board that is close in performace/specs, like the Arduino DUE?
It is HUGE though compared to a 3.6.
 
Back
Top