Teensy 3.6 DAC performance


New member
I'm working on a project to build a closed-loop controller to drive some galvanometers. Essentially I plan on implementing a simple PID controller in software in the Teensy, to use the dual DACs to drive some large op-amps to control the position of the galvanometers. There will be physical position detectors with a position-sensing circuit that i'll use to feedback via the dual ADCs.

My question is: what's the maximum frequency I can expect to update the DACs? Looking at the spec sheet for the processor, it looks like it guarantees about 33Khz (30µs settling time), but i'm wondering if I can push it significantly faster than that if i'm looking for no more than 10-bit resolution, and i'm not moving full-scale between samples? Should I be operating in DMA mode and writing directly to the DAC registers?

Looks like the ADCs can handle somewhere between 1-24 Mhz in 13-bit mode, so no concern about performance there.

Yes, the DAC is a lot faster than Freescale's specs.

Several people have reported very brief/narrow spikes when it switches between certain codes, so you should always use an analog low-pass filter before feeding the voltage into sensitive opamp circuits.
Excellent. Thanks for the tips. That prior thread and your note, Paul, are a great help.

Hopefully I'll have a really interesting project to post about in a few months. Long road ahead of me learning about analog design and getting a bit out of my comfort zone though…
33kHz on the dac as safe number is allready a lot for the closed loop galvos. I tried this on a arduino due which was a slower cpu (84mHz I think) and cortex m3
you can easily set the dacs a lot faster but the question is how fast the galvo drivers can react. Galvo sets greater than 30K are quire expensive ;)

While I' m typing now. Is the dac of a teensy 3.6 capable of generating the complete 0 -> 3.3v range or is it like the arduino due only a subset like 0.75 -> 2.55v ?

that is important for the opamp setup
When using 3.3V power as the reference, the DAC does have a full 0 to 3.3V output range.

However, the output current is very limited. Resistive loads will result in somewhat less range, due to the limited output drive. Capacitive loads will dramatically reduce the speed. If you care about the DAC's performance, an opamp buffer is highly recommended, perhaps with a simple R-C filter if your opamp doesn't appreciate the fast edges when it updates (many opamps have trouble with this).
Sallen-Key filters based on a voltage follower op-amp are simple to implement and give already acceptable results if the corner frequency is half the sampling frequency. When doubling the sampling rate so that fs >= 4*fmax, everything "digital" will sink below the analog noise floor.