Building a DDS signal generator using the integrated DAC of a Teensy 3.5
 
 
 
 
Go to file
EmaMaker a31cf8db96 Introduce README, move software into Firmware folder
And create the still unused Hardware folder
2021-02-13 16:04:40 +01:00
Firmware Introduce README, move software into Firmware folder 2021-02-13 16:04:40 +01:00
.gitignore Introduce README, move software into Firmware folder 2021-02-13 16:04:40 +01:00
README.md Introduce README, move software into Firmware folder 2021-02-13 16:04:40 +01:00

README.md

Teensy 3.5 DDS Function Generator

Using a Teensy 3.5 and the integrated DAC to generate arbitrary periodic waveforms

How it works

The Teensy 3.5 is a powerful Arduino-compatible microcontroller running an ARM Cortex-M4 at 120 MHz
For the purpose of this project, it has been overclocked to 168MHz, running with the Fastest Pure Code+LTO optimizer
It has two integrated DACs whose output can vary between 0v and 3.3V
Using classical techniques from DDS (Direct Digital Synthesis) the Teensy can become a fully functional function generator
In particular, the technique used here is the classic Phase Accumulator, together with a Lookup Table. This allows to precompute arbitrary periodic waveforms and then output them at the wanted frequency.
Square waves of variable duty cycles can be generated by simply toggling a digital pin high and low and the correct time Despite both sine and square wave being output by the teensy are quite clean and seem to have low noise and spurs levels at naked eye, advanced filtering techniques, like Chebyshev, Butterworth or Bessel filters with multiple stages are required. The desired waveform, frequency and duty cycle can be selected using the I2C LCD Display and an incremental encoder with pushbutton

Amplification and offset

Sill WIP

Filters

Still WIP

Credits

A lot of choices come from following this Degree dissertation paper (Direct Digital Synthesizers: Theory, Design and Applications by Jouko Vankka, Helsinki University of Technology, November 2000): http://lib.tkk.fi/Diss/2000/isbn9512253186/isbn9512253186.pdf

Analog Devices offers a lot of cool guides and papers about DDS, this is one of them: https://www.analog.com/media/en/training-seminars/design-handbooks/Technical-Tutorial-DDS/Section8.pdf

The website ZipCPU offers a variety of articles about sine wave generation using FPGAs


Stackoverflow and the rest of the internet of course