What applications truly need both Teensy 3.5 / 3.6 built in DACs?

Status
Not open for further replies.

PaulStoffregen

Well-known member
If you've used both built-in 12 bit DACs on Teensy 3.5 or 3.6, what was your application? Anything other than stereo audio?

Or what sort of uses would you have for 2 (or possibly mode) DACs on hypothetical future boards?

I know this is a sort of vague and rhetorical question, but being able to showcase real applications truly needing both DACs would *really* help me soon. Please let me how if you've used both of them, or plan to do so? Or what sorts of valuable applications would 3 or more DACs open up?
 
One application from pre-MIDI times or for pre-MIDI devices comes into mind: Controlling analog and modular synthesizers throughs CVs (control voltages). There is one side project on which I'm tinkering with low priority where I make use of the two DACs of the T3.5 and some additional external op-amp circuitry to get a volume CV (between 0 and +5V, 0V corresponding to silence and +5V corresponding to max volume) ) and a pitch CV (between -5 and +5V, following Moog's gold standard, 1V/octave, centered around middle C (C3, 261Hz)). The 12bit DAC allows for a pitch resolution in 4ct steps which is already very close to continuous pitch. With some additional maths and a more restricted pitch range (+/- 4 octaves around middle C = 8 octaves), you might get 2ct steps.

The code can be kept very simple, "assembling" either the 7bit note number (+ 7bit MIDI cents in case of continuous pitch control), or the expression MSB and LSB into 14bit values, do a an arithmetic right shift by 2 and you (almost) have the data to send. For the pitch CV, you'll just need to add a small offset of 128 to get exactly half scale (2048) from midi note 60 + 0cts which from the previous code is converted to 1920.

The analog output circuit has yet to scale the volume CV by factor 4.167 to get 5V from the 1.2V max DAC output voltage, but that's not critical. The human ear is forgiving when it comes to little volume or dynamic errors. The pitch CV circuit as a differential amplifier to obtain a bipolar voltage output asks for more precision and needs 2 ten turn precision trim pots to get a clean 0V at DAC value (offset) and a precise 1V per 384 DAC steps or 0.1125V (scale). Currently, I'm checking out if this offset/scale trimming can be done in software by slightly modifying the offset and introducing a multiplicative scale factor.
 
To answer the other part of the question what use I'd have for 2 (or possibly mode) DACs on hypothetical future boards: This could greatly simplify my synth circuits by reducing the number of external components. Ideally, I'd have 4 integrated audio DACs with 24bit@96kHz, eliminating the need for two external PCM5102A, and 2 integrated 14bit DACs for an improved CV stuff (see previous post).

Furthermore, I'd like to see a timer like the eFlexPWMs in the T4 which allow input capture/FM demodulation on 2 or 3 pins in FreqMeasureMulti style (I like them because of the ability to capture rising and falling transitions in different registers) but with 32bit counters/registers. I actually just hate to see more than 2800 rollover interrupts per second at 150MHz bus clock while I like the precision which this high frequency brings. A 32bit counter would only roll over every 28 seconds at this clock speed.

Perhaps don't take me too serious, I'm an old fashioned "mixed signal" guy and I understand perfectly that most modern applications rely more on complex hi-speed digital interfaces like Ethernet, SPI and CAN bus. But in the time when I started with electronics, many of our forum members weren't yet born, and the promise in that time was that one day, we would have everything, analog and digital, in one single chip. This were the times where Philips and Texas instruments made serious efforts to integrate a whole color TV (besides the HF tuner, the cathode power drivers for the tube and the audio power amplifier) on one single mixed signal chip...
 
The only thing I’ve used a DAC for other than audio is for a motorized faders controller, the DAC voltage is used to set the position of the fader. But I didn’t use one built into a Teensy though, the motorized faders controller is from an old Uptown Automation 990 system that used an 8051 to control 8 faders per board. I didn’t like the limited functionality of it so I desoldered the 8051 socket and replaced it with a Teensy so now it’s an Ethernet controller. At any rate that uses an 8 bit parallel bus to talk to all the chips on the board and one is an 8 bit eight channel DAC, if there was a Teensy with 8 DACs it would be nice to easily replace that for higher resolution.
 
Same here, generating CV signals for eurorack modules. 2 DACs is the minimum, 3 is an odd number(pun intended), 4 or more would be ideal.
 
… curious if Paul is thinking of the next Teensy or a shield for T4 that has no DAC's ...

If Paul wants to stay with NXP, the next Teensy risks to be without DACs, too. From looking at their actual CPU offer, it looks like they are rather about to deprecate the analog modules. Already now, with the T4, we not only lost the 2 12bit DACs, but also some ADC resolution...
 
on my side, no application other than Audio, but can live with external DAC (I already use mostly external ADC audio and internal ADC for some SLOW sensors, so DAC would be similar reasoning).
 
I'm controlling a particle brake with the builtin DAC but doing that with an external DAC would be no issue.
 
One common application I have is to use a Teensy to read digital sensors (I2c, SPI, etc) and output proportional linearized analog voltage outputs to allow use with a traditional analog data acquisition system.

A future desirable application would be to integrate instrument grade analog in (or digital in) and instrument grade analog out (volts or 4-20mA) with PID softwear and a display to build a fully customizable, open source PID process controller.
 
I use the DAC outs on the 3.6 to create the oscilloscope function on my multi effect box. They're run through series resistors right into nearby analog inputs.

The actual audio goes out through the audio shield.
 
My analog interests tend to run towards precision circuits. I have not really used the Teensy DACs except for a few rough experiments. If I did want a DAC I would probably use an external one with higher resolution and lower noise. DACs for voltage control of oscillators in GPSDO applications usually have extreme resolution specs, like 18 bits or more.
 
… curious if Paul is thinking of the next Teensy or a shield for T4 that has no DAC's ...

Mostly thinking about a future Teensy.

The main question here is whether one 12 bit DAC is sufficient? If not, what compelling applications truly require more than one built in DAC?
 
See my new thread "(Not) another Dummy-Load...", there I use both DACs.
I found out that the DACs in Teensy are pretty much the best quality of all the Arduino compatible MCUs I tested.
Please keep the DACs in mind in the future!
 
Applications where a "reversal" of polarity e.g. a bridge type circuit could use two (in push-pull mode). Analogue two phase or analogue phase quadrature potential. Usage may be dependant on the frequency response of the DACs.

Superhet type circuits? One DAC for RF (VCO) control, one for BFO or IF generation? Scientific kit may be more applicable in this area - like the guy doing fluorescent research.

Like the laser, until you have the capability, solutions can't find the problems :) Did someone not say we will only need six computers in the world...
 
When it comes to video, things are rather about speed than about resolution. Simple analog VGA has already 480 lines times 640 pixels and that at a refresh rate of 60Hz which (when adding some overhead for the sync signals) exceeds already 20MHz. Thus, not a task for embedded universal processors and their integrated DACs. There are reasons why special graphic hardware (GPUs) exist.
 
I have never used both built-in DACs on 3.5/3.6. I have used the single DAC on LC or 3.2 to generate control voltages (CV) for analog modular synthesizers (Eurorack); unlike Theremingenieur I only used these for non-pitch CV (random walk generators, envelope generators for controlling VCAs and so on).

When it comes to more elaborate projects that justify a 3.5/3.6 I would typically also need more precision, more linearity, and more channels so would move to an SPI DAC. For example, an ambitious project I am still working on from time to time is a USB MIDI, MPE-compatible Eurorack module. It uses a 3.6 (for USB host), several DAC8168C octal 14-bit DAC for the performance controls, and during prototyping I moved from AD5542CRZ (single channel, high linearity 16-bit DAC) to AD5781ARUZ (single channel, high linearity 18-bit DAC) for each of the four pitch CV channels.

There are plenty of inexpensive 2 or 4 channel 12bit SPI DACs available, for those times when cost is more important than performance. A single built-in DAC is a nice-to-have feature, for easy experimentation, but a DAC-less future Teensy is certainly not a deal breaker in my opinion.
 
They could be used to generate IQ for an SDR transmitter, but most SDR applications have gone for the extra 4 bits with the AudioAdapter.
 
I use 1 Dac as reference for 2 comparators and the second for one more. The 6bit DACs as reference did not work. The other DAC- inputpins are used for other functions or are not available on teensy3.6.
Application is exact phase mesurement in 3phase Powerline Solarequipment.
It is not yet working good .

Another application would be the controlvoltages for for 3 inverters, but there you need 3 DACs and optical insulation will be better.

The syncron mesurement with 2 ADCs
is good for voltage and current at the same point for 50/60Hz Power mesuring. I get 0.1% noise on 8 results after 500msec with 2048 Samples / channel, very good.

61usec ISR needs 2 to 5 usec ..
perfect.
 
A vote for a minimum of two. We use the two as supplied in the 3.6 and a few PWM channels for the lower bandwidth needs. Similar uses as Wibbing's above I'm guessing.
 
Status
Not open for further replies.
Back
Top