Go Down

Topic: Arduino DDS Sinewave Generator (Read 22 times) previous topic - next topic

MarkT

I don't understand why you don't just lose the shift register and have the R-2R ladder on 8 Arduino pins (say port D then writing is a single instruction).  You'll get to MHz with the sinewave table perhaps?
[ I won't respond to messages, use the forum please ]

D4p0up

Good question, simple answer: The lower the pin count, the better it is.

In the audio synth application I'm currently working on, I need the pins 0 & 1 for Midi In/Out purpose, and also need four analog inputs for control Knobs and so on. Add to this three Leds for Synth operation purpose (gate + lfo rate + general purpose), four buttons for operation like preset managment and edition, and make the breakout:

2 + 4 + 3 + 4 = 13 pins, with 9 being discretes.

With this basic setup, I have no room for Port dedicated 8 Bit DAC on a Uno board.

Then, in the future I plan to use a MCP4921 as a DAC. This will lead to better results, so using a homemade SPI DAC in this case is the best way to anticipate design evolutions.

However, as I mentionned on my blog, I started using a rough 6bits DAC on PortC with great success... except for dynamic range of course :)

Arduino sound Reseach - http://bit.ly/fullmaj [fr][en] | Homemade Free VST - http://zomg.zxq.net [en]

marnaw

#12
Sep 07, 2011, 08:35 am Last Edit: Sep 07, 2011, 08:38 am by marnaw Reason: 1
        Is it possible to have a three phase sine wave with this generator ?
        I would like to generate a 10 kHz to idealy 18 kHz three phase wave.
        Does miro-Hertz precision will pertain with this change ?

ten Khz is anyway a problem, the atmega is to slw for that. using a dedicated DDS chip would be a solution
maybe some manufactor has a 3 phase version.

martin

D4p0up

You definitely could with the R2R SPI DAC trick presented above:

Just chain 3 x 74HC595 with their associated DAC, and use the same method as described above, except that the 3 respective phase accumulators should be initialised with 0, (1/3)x2^16, (2/3)x2^16.

This will make 3 outputs !
Arduino sound Reseach - http://bit.ly/fullmaj [fr][en] | Homemade Free VST - http://zomg.zxq.net [en]

sriliam

#14
Sep 21, 2011, 06:31 pm Last Edit: Sep 23, 2011, 01:49 pm by sriliam Reason: 1
Thanks for those two replies, the original post about frequency production limit came from an email that I addressed to marnaw about 10 Khz to 18 Khz 3-phase sine wave.
I found this and marnaw is in the pdf file.(I)

I did not be able to contact the author and he claimed of 13 Khz, I think it's about switching pwm, don't you ?
So, first, my question still pertain : does I really need a dedicated dds to perform my signals ?

Second, does marnaw work deal with this, sometimes also called magic sine waves ?(II)
Best regards.
Sril

Edit (09/23/11) :
(I) is a non finish student work about control motor, does not need to be read, sorry.
(II) deal with a method to suppress harmony under a certain level from base frequency and is not the same as described heare, sorry.
I insist to present my apologizes for stupid lost time to read me.

Go-on my work with a 3-phased generating circuit.

Go Up