Maker Pro
Maker Pro

Need DDS module, 2nd round

J

Jamie

Jan 1, 1970
0
Joerg said:
In case someone else is in a similar situation, I've just discovered two
interesting alternatives if no suitable DDS module can be found. The 1st
is ye olde XR2206 which I thought had gone unobtanium:

http://electronics-diy.com/product_details.php?pid=537&name=1Hz - 2MHz XR2206 Function Generator Kit

The 2nd solution is rather ugly. I could take these DDS modules and
replace the oscillator with a LTC resistor-set silicon oscillator. Those
can be current steered. Of course then the digital frequency display of
the module would become fairly meaningless but could still sort of
signal if my PID loop has locked or not.

If you want to get that crude, you could always turn to an old stand by..
LM566 :)

That has a square out that you can use to monitor in a counter for
example and a triangle out that you can wave shape into a sine wave.

That also includes a modulation input pin and it just happens
to be in your range.

Jamie
 
B

Bill Sloman

Jan 1, 1970
0
That depends on whether the DDS is reset or not when the frequency
setting is updated. There has to be a reason the designers at
iteadstudio didn't implement the modulation. If it where simple they
would have implemented it.

Why do you think that?

The Analaog Devices DDS chips that I've looked at didn't seem to reset themselves when the frequency was changed.

The iteadstudio designers may have made life simpler for themselves in someway by chucking in an unnecessary reset command on top of every frequency change update, but that doesn't mean that just sending a frequency change command is going to be difficult.
 
J

Jasen Betts

Jan 1, 1970
0
Theoretically, yes. But since this whole thing will sit inside a PID
loop I'd then have to process the error signal (a phase information
measured in my box) in the PC. Meaning lots of code writing and that's
what I am trying to avoid as much as possible.

Plus, you get latency with a sound card which many be an issue if you need a
tight loop.
 
N

Nico Coesel

Jan 1, 1970
0
Bill Sloman said:
Why do you think that?

Sometimes chips behave different than advertised and the only way to
find out is to put them on a board and test them. I have no experience
with the DDS chip they use on the board Joerg found so your guess is
as good as mine. Another problem could be timing since the controller
on the board Joerg found is quite slow. If there is a lot of variation
in the time between updates, the sweep or FM modulated signal would
not be very clean or look more like a stepped sweep.
 
Why do you think that?

The Analaog Devices DDS chips that I've looked at didn't seem to reset themselves when the frequency was changed.

The iteadstudio designers may have made life simpler for themselves in some way by chucking in an unnecessary reset command on top of every frequency change update, but that doesn't mean that just sending a frequency changecommand is going to be difficult.

a 16 bit SPI will only write 14bits of the frequency register, so
you'll need two writes unless you can do with just changing the MSB
part

the right way would to toggle between the two frequency registers, so
that would be 2*16bit, plus 16bit control register so 48bits per
update

but that is leaves ~30 cycles per bit to do the bit banging on the
16MHz MCU and get a ~10KHz update rate


-Lasse
 
J

Joerg

Jan 1, 1970
0
Jasen said:
Plus, you get latency with a sound card which many be an issue if you need a
tight loop.

If it did the usual 1msec USB response intervals it could scrape by for
the PID loop, barely. But if that ever gets interrupted there would be a
serious data kerfuffle.
 
J

Joerg

Jan 1, 1970
0
Jamie said:
If you want to get that crude, you could always turn to an old stand by..
LM566 :)

That has a square out that you can use to monitor in a counter for
example and a triangle out that you can wave shape into a sine wave.

That also includes a modulation input pin and it just happens
to be in your range.

But it puts out a square wave which I really can't use here. Has to be
sine and the potential range is too wide to cover that with a lowpass.
Else I could use a LTC resistor-controlled oscillaator by itself and
call it a day.
 
J

Joerg

Jan 1, 1970
0
Tim said:
Soooooooo. Have you spent more time looking to date than it would have
taken to slap a DDS chip onto your board and make it work?

(I hate that question -- even when I'm asking it of myself).

No, with my code writing knowledge that would take a loooong time. We
could use a contract engineer for that part but it can become tough
because every time some loop behavior needs to change he or she has to
come again (because it must be tested on a fairly large setup). With
resistors and caps and diodes it's much easier.
 
J

Joerg

Jan 1, 1970
0
a 16 bit SPI will only write 14bits of the frequency register, so
you'll need two writes unless you can do with just changing the MSB
part

the right way would to toggle between the two frequency registers, so
that would be 2*16bit, plus 16bit control register so 48bits per
update

but that is leaves ~30 cycles per bit to do the bit banging on the
16MHz MCU and get a ~10KHz update rate

You'd also have to calculate the new values for "xx Hertz up or down"
every time, xx depending on how much the output of the PID regulator
changed. I doubt those little uC would have enough ROM to store a large
LUT for that.

I did a few tricks like that in the past because I do write a lot of
code architecture. Almost every time the guys came back and said "Hey,
good idea but we'd run out of MIPS" or "We are almost out of memory
space already". That's the beauty of analog, no such limits :)
 
J

Jamie

Jan 1, 1970
0
Joerg said:
But it puts out a square wave which I really can't use here. Has to be
sine and the potential range is too wide to cover that with a lowpass.
Else I could use a LTC resistor-controlled oscillaator by itself and
call it a day.

That puts out a triangle wave on a different pin, it's very linear for
your purpose with some basic wave shaping. And the freq range is 10:1

Oh well..

Jamie
 
J

Joerg

Jan 1, 1970
0
Jan said:
Very long time a go I made a sine wave sweep generator for testing active audio filters
by using a 4046 VCO (linear f versus V), a 4040 counter, a 4k EPROM with a sine wave table,
and a 8 bit DAC.
Also had some opamp and integrator and 2 comparators, so it could sweep from f1 to f2.
That sort of thing can make a reasonable pure sinewave.
But you would need to be able to program an EPROM.
Not much that can go wrong with it, if you need more than 8 bits use 2 EPROMS.


Believe it or not, I don't even have an EPROM burner anymore. Could get
one though. The table would be generated with Excel. For UV-erasing I
could just place the EPROM on the roof, the sun is pretty intense here.
 
You'd also have to calculate the new values for "xx Hertz up or down"
every time, xx depending on how much the output of the PID regulator
changed. I doubt those little uC would have enough ROM to store a large
LUT for that.

yeh those 8K wouldn't last long with a LUT, but is it needed ?

wouldn't it be something like; freq = basefreq + Vin*magic_constant
I did a few tricks like that in the past because I do write a lot of
code architecture. Almost every time the guys came back and said "Hey,
good idea but we'd run out of MIPS" or "We are almost out of memory
space already". That's the beauty of analog, no such limits :)

but plenty of other limits, you can't get everything ..

but with modern ARMs, you can get close to 200MHz with 1Mbyte flash
for 10$, that'll go a long way


-Lasse
 
J

Joerg

Jan 1, 1970
0
yeh those 8K wouldn't last long with a LUT, but is it needed ?

wouldn't it be something like; freq = basefreq + Vin*magic_constant

It would need a fairly fine granularity, several k vlaue sets for the
DDS. It's easy to get nasty artifacts if this isn't calculated on the fly.

but plenty of other limits, you can't get everything ..

Yes, but I know analog will work. It's just not very friendly in terms
of PC connectivity.

but with modern ARMs, you can get close to 200MHz with 1Mbyte flash
for 10$, that'll go a long way

If one can program them in a reasonaable time frame which I can't (yet).
 
S

Spehro Pefhany

Jan 1, 1970
0
Believe it or not, I don't even have an EPROM burner anymore. Could get
one though. The table would be generated with Excel. For UV-erasing I
could just place the EPROM on the roof, the sun is pretty intense here.

Flash memory 70ns 256K x 16 is $1.10 one-off, but you wouldn't be able
to use even one cent worth of it.


Best regards,
Spehro Pefhany
 
J

Joerg

Jan 1, 1970
0
Spehro said:
Flash memory 70ns 256K x 16 is $1.10 one-off, but you wouldn't be able
to use even one cent worth of it.

If I wanted to do that I'd probably just get a uC with ADC and a big fat
flash area, then use it just for this job. Its ADC reads my PID output,
points to the corresponding LUT address, shoves data to the DDS. That is
how I'd do the final system, or let it calculate (depending how easy it
is to avoid birdies and stuff).
 
S

Spehro Pefhany

Jan 1, 1970
0
If I wanted to do that I'd probably just get a uC with ADC and a big fat
flash area, then use it just for this job. Its ADC reads my PID output,
points to the corresponding LUT address, shoves data to the DDS. That is
how I'd do the final system, or let it calculate (depending how easy it
is to avoid birdies and stuff).

Have you considered just buying something like my Rigol DG4062 and
using it for proof-of-concept? For $795 it might be worth it, and it's
generally useful afterward with the USB and Ethernet interfaces etc.


Best regards,
Spehro Pefhany
 
N

Nico Coesel

Jan 1, 1970
0
John Larkin said:
Something like an LPC1754 would do all that for about $4. If you can find a C
programmer person who can code and flash the chip, I could write the pseudocode.
It would need some startup code (set up CPU junk, configure the ADC and DAC) and
an IRQ routine to read the ADC, do the DDS stuff, and load the DAC. The ADC
could cause the IRQ at a couple hundred KHz, and the IRQ code would be short and
sweet.

I wouldn't be surprised you don't the DDS stuff at all. Just use
floating point. The chip is probably fast enough to emulate. After all
its one sin() and some additions to get the output. Some fast float to
integer conversion magic and its all done.
 
S

Spehro Pefhany

Jan 1, 1970
0
I wouldn't be surprised you don't the DDS stuff at all. Just use
floating point. The chip is probably fast enough to emulate. After all
its one sin() and some additions to get the output. Some fast float to
integer conversion magic and its all done.

LPC43xx should be fast enough- it's got hardware floating point.

I think that spitting out floating-point transcendentals in < 10usec
on a Cortex M3 running at only 100MHz is asking too much of the
standard library functions.

Hey, if J. doesn't mind offshore stuff of dubious heritage and
"support", what about this?

http://www.ebay.com/itm/20MHz-DDS-S...-Function-with-English-Software-/230781295119


Best regards,
Spehro Pefhany
 
N

Nico Coesel

Jan 1, 1970
0
Spehro Pefhany said:
LPC43xx should be fast enough- it's got hardware floating point.

I think that spitting out floating-point transcendentals in < 10usec
on a Cortex M3 running at only 100MHz is asking too much of the
standard library functions.

Who said you'd need a sampling frequency of 100kHz? Or at least
calculate samples that fast...
 
K

Klaus Kragelund

Jan 1, 1970
0
Unless you specify that whoever writes the code makes it listen to an ADC

input and sweeps the frequency on command -- but that's getting pretty

involved.



If you're looking at less than 10kHz carrier and 2kHz FM bandwidth,

what's stopping you from an analog solution? The required precision?



Have you considered a crystal oscillator with an FM input beating against

a plain ol' signal generator (crystal derived, of course)? That should

give you a fairly steady carrier frequency that you can set from an

instrument, a nice sine wave, the FM that seems to be your primary need,

and it'll keep the custom circuitry all analog so you don't need to step

outside of your areas of expertise to get it done.

A STM32 F4 (with floating point unit):

http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/PF252419

14 USD. Extension board with display etc

In my lab I have a generic STM board in an enclosure. Instead of doing analog test equipment each time I need it, I have done uC designs targeted for the same board.

When finished I then have several hex files I can upload for a desired functionality. That saves time for coming projects and avoid bringing forward the solder iron.

Cheers

Klaus
 
Top