Maker Pro
Maker Pro

Need DDS module, 2nd round

Q

qrk

Jan 1, 1970
0
Hi Folks,

Long story short, none of the DDS modules I've found so far has the
ability to be sweeped or FM-modulated. This one has a signal input
terminal block "SIN" but I received a response from the manufacturer
that it connects to nowhere, it has no function:

http://imall.iteadstudio.com/tools-and-equipment/im120723003.html

What I need in my case is DC-100Hz of sweep or FM bandwidth. Operating
frequency under 10kHz and sweep range up to 2kHz. Of course I can whip
up an analog solution but it won't be as precise and most of all not
really programmable.

Is there anything better? Cost is not a big issue but should be somewhat
small and a display would be nice.

If you have an FPGA in your project, stick it in there. DDS is easy to
implement in an FPGA.
 
J

Joerg

Jan 1, 1970
0
Spehro said:
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.

I have, and the price isn't so important. I've got a Mastech arb gen
that would work just fine and is under $400. But I need something that
isn't so large.

Probably the old XR2206 will work ok. I was just surprised that no
company seems to have pick up this chip after it went lalaland.
 
J

Joerg

Jan 1, 1970
0
Nico said:
Who said you'd need a sampling frequency of 100kHz? Or at least
calculate samples that fast...

A few kilohoitz would be plenty. The loop BW itself is going to be less
than 100Hz and then some granularity needs to be added in for larger swings.

Yes, a uC can clearly do this but since this is just one tiny sliver of
the whole project I was hoping for something like "Crack open the
package, solder in, sprinkle with inductors and caps, maybe some
cilantro, turn on, forget about it". Looks like those XR2206 modules
plus one counter module will be the ticket if nothing better comes up
off-the-shelf.
 
J

Joerg

Jan 1, 1970
0
Since it seems there ain't no DDS module where the FM modulator input
actually works, the analog solution is what I am going to do. Lower
precision is one downside, the other is lack of PC controllability. But
those are not absolutely required here.


With two crystals in the 10MHz or higher range that wuold work. One
fixed, one pulled via varicap. However, the varicap pulling is anything
but linear, BTDT. I think the XR2206 is easier.
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.

I have something like that from Cypress, not nearly as powerful but
would likely do the trick. However, you are much more used to writing
code than I am, so this would take me a long time. I am not oppose to a
learning curve but there are too many projects on the plate right now.
 
J

Joerg

Jan 1, 1970
0
qrk said:
If you have an FPGA in your project, stick it in there. DDS is easy to
implement in an FPGA.


Not FPGA, CPLD or any of that in this project. Plus I don't have much
programming experience with those.
 
N

Nico Coesel

Jan 1, 1970
0
John Larkin said:
need

Just use

Floats don't help implementing the DDS core; they actually make it harder.

How come? IMHO generating a sine wave is a matter of output=sin(angle)
* amplitude. Angle is incremented by a step which depends on the
sample rate and frequency. From memory: Say your samplerate is 10kHz
and your output frequency is 105.3Hz then the size of each increment
is (2pi / 10kHz) * 105.3Hz radians. That is very easy to program.
Ofcourse it will need some tweaks to make it fast but the basics are
simple.
Sine is easily, and usually, done with a lookup table in DDS apps. That will
take a few tens of nanoseconds on a 100 MHz ARM.

100 or 200KHz IRQ rate (5 to 10x Nyquist) would be easy on an LPC1754. The
advantage of a higher rate is that you'd need a less demanding lowpass filter
after the DAC.

For that purpose you can upsample before sending the data to the DAC.
I often sample at unrealistic rates and then downsample before doing
the actual processing to avoid (too much) filtering. A 4th order fixed
point IIR filter is almost free when it comes to CPU cycles on an ARM.
 
G

George Herold

Jan 1, 1970
0
74HC4046 is a good VCO.

If you need sinewave out,  could a 4046 be used as clock for a DDS?
Never tried it.

I was thinking of a 4046, but certanly Joerg knows about it.
I did a VCO with a 4046 driving a 4017 with different R's into
an opamp summing junction. (A few threads here on SED.)
The harmonics start with the 9th and 11th.

George H.
 
G

George Herold

Jan 1, 1970
0
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.

--
Regards, Joerg

http://www.analogconsultants.com/- Hide quoted text -

- Show quoted text -

What sort of range do you need? (Did you say already?)
With the 4046->4017->R's
Harmonics start with the 9th...(The lower harmonics are less than 55db
with 0.1% R's.) So depending on what sort of lowpass you can get
maybe factor of three range.

George H.
 
J

Jamie

Jan 1, 1970
0
Joerg said:
I have, and the price isn't so important. I've got a Mastech arb gen
that would work just fine and is under $400. But I need something that
isn't so large.

Probably the old XR2206 will work ok. I was just surprised that no
company seems to have pick up this chip after it went lalaland.
Well lets see, I remember years ago a bunch of those chips got out there
and used for kits or what ever that actually didn't pass QC in the
sine wave shaper section. Guess some one found a market for them in any
case.

I see that TAYDA Electronics has them for $2.99 and Mouser has a couple
in stock for only $87.00 bucks, most likely those past QC, chump change.

Jamie
 
J

Joerg

Jan 1, 1970
0
Jamie said:
Well lets see, I remember years ago a bunch of those chips got out there
and used for kits or what ever that actually didn't pass QC in the
sine wave shaper section. Guess some one found a market for them in any
case.

Ouch. How did they get those QC rejects? Those aren't supposed to be
chucked into an accessible dumpster.

I see that TAYDA Electronics has them for $2.99 and Mouser has a couple
in stock for only $87.00 bucks, most likely those past QC, chump change.

Yeah, that has me concerned as well. But ... if the distortion is 2%
instead of 1% it's not a major problem.
 
J

Joerg

Jan 1, 1970
0
George said:
What sort of range do you need? (Did you say already?)


Essentially up to 10KHz base frequency and the sweep could be +/-50% of
base. So any old digital register will do.

With the 4046->4017->R's
Harmonics start with the 9th...(The lower harmonics are less than 55db
with 0.1% R's.) So depending on what sort of lowpass you can get
maybe factor of three range.

True, but slowly this one section is turning into a little monster with
lots of parts :)
 
G

George Herold

Jan 1, 1970
0
What sort of range do you need? (Did you say already?)
With the 4046->4017->R's
Harmonics start with the 9th...(The lower harmonics are less than 55db
with 0.1% R's.)  So depending on what sort of lowpass you can get
maybe factor of three range.

George H.- Hide quoted text -

- Show quoted text -

Joerg, This trick looks perfect for you. I'm hoping you'll show me
how to to get the lower harmonics down below 60dB. :^)
The only bit I wanted to add is that I first used a 6-pole Butterworth
LP, but it looked like crap in the time domain at the edges, and I
switched to a Bessel.

George H.
 
If you have an FPGA in your project, stick it in there. DDS is easy to
implement in an FPGA.

at the frequencies needed it is also easy in an MCU, but he wants
display
and buttons so you'll need to find some hardware with that and afair
he also
needed 2Vrms in 50R so also needs an output buffer

and while it wouldn't take long for someone with experience with an
MCU
it would take some time if you need to start from scratch

if he could do with a user interface via usb or serial port and an
unbuffered
DAC output it could be whipped up in few hours on almost any of the
cheap cortex
boards

one of stm32 discovery boards has a headphone amplifier so maybe that
could work
but it still leaves the user interface

-Lasse
 
G

George Herold

Jan 1, 1970
0
Essentially up to 10KHz base frequency and the sweep could be +/-50% of
base. So any old digital register will do.


True, but slowly this one section is turning into a little monster with
lots of parts :)

Ja, Ja, lotsa parts!
(maybe 5 different R's)
George H.
 
J

Joerg

Jan 1, 1970
0
George said:
Ja, Ja, lotsa parts!
(maybe 5 different R's)


And a 4017. And some capacitors for the Bessel. And some inductors :)

But it sure is an idea that would work.
 
J

Jamie

Jan 1, 1970
0
Joerg said:
Ouch. How did they get those QC rejects? Those aren't supposed to be
chucked into an accessible dumpster.





Yeah, that has me concerned as well. But ... if the distortion is 2%
instead of 1% it's not a major problem.

Oh yeah, we had a bunch that came in kits best suited for starter
electronic people from a particular source that were packaging them.
..
Also, back then surplus centers were very popular and you could find
these chips there and more than likely they were seconds but they
made their way out there in equipment where they didn't belong..

These days things are laser trimmed and that isn't such an issue any
more.

With today's methods of fabbing chips, I would bet a chip like that
could be reproduce with a much better yield and precision.

Jamie
 
N

Nico Coesel

Jan 1, 1970
0
John Larkin said:
DDS uses a long (typically around 48 bits) integer phase accumulator which
conveniently overflows every 2pi radians with no additional code. The top N bits
(say, 10 or 12) are mapped through a sine table and drives the DAC. It's very
simple, just a few lines of code. You'd need double floats, overflow tests, some
sort of sine algorithm, and a float-to-fix conversion for the DAC. That would
require hardware floats, and probably woundn't work as well as the integer
version.

If you assume emulated floating point is infinitely slow but usually
it isn't. I have used emulated floating point in a signal processing
application on ARM before and I know it does have its advantages.
 
If you assume emulated floating point is infinitely slow but usually
it isn't. I have used emulated floating point in a signal processing
application on ARM before and I know it does have its advantages.

using the usual fixed point phase accumulator and then doing sin()
in float makes sense

but doing the phase accumutation in floats I'm not so sure about,
forever doing an accumulation modulo 2*pi sounds iffy

with fixed point it is exact since 2^n is defined to be 2*pi

-Lasse
 
J

John Devereux

Jan 1, 1970
0
If you assume emulated floating point is infinitely slow but usually
it isn't. I have used emulated floating point in a signal processing
application on ARM before and I know it does have its advantages.

I made some crude measurements on a 120MHz STM32F2, emulated floating
point and gcc:

Double Precision:
0.415us / 49.852 cycles /multiply
0.378us / 45.403 cycles /add
2.414us / 289.702 cycles /divide

Single Precision:
0.194us / 23.350 cycles /multiply
0.250us / 30.052 cycles /add
0.610us / 73.202 cycles / divide

Pretty respectable I thought.
 
J

John Devereux

Jan 1, 1970
0
John Larkin said:
As compared to 1 cycle for add/sub/shift/mul on an ARM.

There's no reason to use any floats in a DDS sinewave generator.

Well no, was just responding to point about floats needing to be in
hardware, if they *were* used.
 
Top