Direct Digital Synthesis - How it Works and a Demo on Arduino Due

preview_player
Показать описание
Here's a lot of DDS theory and then an Arduino Due demonstration, showing how to generate different frequency sine waves that can be used for audio synth or other applications.

The content presented may be dense and better suited as a reference guide if you already have some DDS theory and just want to try to get a better understanding about a specific aspect of how it works. Choose topics from the look up index:

0:00 Intro
1:26 Look up tables and Analog Signals
5:23 Choosing parameters for Arduino Audio Sine Generation
6:07 Phase Accumulator vs LUT Waveform Sample Relationship
7:14 DDS System Equation breakdown
10:32 DDS Frequency resolution
11:33 Phase Accumulator bit width determination
13:39 Phase Accumulator as a LUT Index
16:48 Arduino Due Connection Diagram
18:40 Arduino Sketch
21:53 Tinkercad Arduino Simulation of DDS Generator
22:13 555.555 Hz on scope and DDS values in simulator
23:47 2112 Hz on scope and DDS values in simulator
24:35 0.042 Hz on scope and DDS values in simulator
25:08 10 KHz on scope and DDS values in simulator
26:07 20 KHz on scope and DDS values in simulator
27:05 Dual sine waves combined from one sine LUT
28:39 Dual sine waves on the scope and speaker

DDS Reference Info

Sine wave table generator (double check it doesn’t generate one extra data point if you use it!)

Sampling info

Equipment I regularly use (support the channel by shopping through these affiliate links - I may earn a small commission and it doesn't cost you extra):
Siglent SDS1104X-E 100Mhz Digital Oscilloscope 4 Channels Standard decoder
Рекомендации по теме
Комментарии
Автор

This was a very well done presentation of the basics. I'm looking forward to subsequent installments.

BusyElectrons
Автор

You are an excellent teacher! Keep it up!

RylanVlawgs
Автор

Thank you so much for this presentation.

kanzanassabi
Автор

hi, does the sketch run directly in an Arduino UNO?

diegogarciamedina
Автор

I get an error on line 67, saying the variable or function wasnt declared, is there any library thats missing?

cristianramonhernandezpere
Автор

Hey :) thx for the nice video.

Would it possible to adjust sample rate by introducing delays in our script to control the pitch?

Suggested that we want to output a wave that is less symmetrical than the basic sine/triangle/saw/square, the "leaving out sample points" method would give us really not uniform results.

andykandolf
Автор

I have made an Arduino-uno based potentiostat for cyclic voltammetry and Impedance spectroscopy experiments. I am trying to make a frequency sweep from the maximum possible frequency to the lowest. I use PWM modulation and I generate the PWM values using math but I can go up to 50Hz for now because of serial communication and sample rate limits. I am also trying to record the data in real-time using one of the ADC of the arduino in order to do impedance spectroscopy. I am interested in your method using lookup tables but I don't get what should be changed to adapt this to an UNO board. Can you help?

Aragmatiki
Автор

Fascinating stuff. The only thing that I am struggling with is the multiple waves. In the case that both sine waves are at their peak and you add them together, you will be outside of the DACs range. In analog synthesis, if you pass an op amp's range the signal will clip. I didn't really get what the equivalent was of this in digital synthesis. You shift each data point by one bit, so essentially dividing by 2 before adding correct? This way it won't exceed the DACs range? And if you wanted to use 3 waves you would have to divide the values by 3? Doesn't this decrease the resolution of the wave because when you divide you may be rounding values off? Or does it not matter because once you add them back together you still use the full range of the DAC?

LabSkaterPussies
visit shbcf.ru