UK Vintage Radio Repair and Restoration Powered By Google Custom Search Vintage Radio and TV Service Data

Go Back   UK Vintage Radio Repair and Restoration Discussion Forum > General Vintage Technology > Components and Circuits

Notices

Components and Circuits For discussions about component types, alternatives and availability, circuit configurations and modifications etc. Discussions here should be of a general nature and not about specific sets.

Closed Thread
 
Thread Tools
Old 1st Nov 2014, 1:11 pm   #1
Al (astral highway)
Dekatron
 
Al (astral highway)'s Avatar
 
Join Date: Nov 2006
Location: London, UK.
Posts: 3,496
Default DDS function generator performance

I bought a prefab DDS module to provide what I thought would be a reliable, cheap-ish, variable frequency square wave to test a gate drive transformer's frequency response. (It also has triangular and sinusoidal outputs)

I have to say that the performance is hugely disappointing. The 'square' wave is almost triangular, even when the output is unloaded. Once I couple it to the gate TX, it's even further distorted. (I don't even mean at the secondary of the TX, still at the primary).

Anyone else have experience of these? Do I need a buffer or some other fix or is this a lost cause? Obviously I can build something myself that is reliable and not onerous, but interested to see what others have experienced.

This is def not a 'scope problem. I have a text-book perfect square wave from the scope's own TTL calibration output.
__________________
Al

Last edited by Al (astral highway); 1st Nov 2014 at 1:16 pm.
Al (astral highway) is offline  
Old 1st Nov 2014, 1:57 pm   #2
Mooly
Octode
 
Join Date: May 2011
Location: Lancashire, UK.
Posts: 1,351
Default Re: DDS function generator performance

No experience of that (don't even know what a prefab DDS module is ) but can say with certainty that there is no way a scope (given a typical 1Mmeg/20pf loading) should cause any problems unless you are looking at frequencies in the 100+ MHz region.

If you want squarewaves then a Schmidt trigger and perhaps D type flip flop (which will divide the frequency by two but give a 50:50 duty cycle) is called for.

Maybe the thing is just faulty.
Mooly is offline  
Old 1st Nov 2014, 3:56 pm   #3
Skywave
Rest in Peace
 
Join Date: Jun 2006
Location: Chard, South Somerset, UK.
Posts: 7,457
Question Re: DDS function generator performance

That's sad news, Al. I have no experience of those DDS things, but have always had my doubts. Personally, I have a strong preference for the more traditional equipments for signal generation. Perhaps you just have a bad one, however. And that leads me to ask this: can anyone else here report their experiences in using these new types of signal generator?

Al.
Skywave is offline  
Old 1st Nov 2014, 4:34 pm   #4
PETERg0rsq
Heptode
 
PETERg0rsq's Avatar
 
Join Date: Jun 2009
Location: St Helens, Lancashire, UK.
Posts: 641
Default Re: DDS function generator performance

Which DDS have you purchased, and what frequencies are you running at?

There are a few about.

I presume it uses an AD9850 or AD9851 chip.

There are bare-bone modules that you need to provide the digital "words" to control them, and at less than £5 are incredible value for money. However they are just DDS (Direct Digital Synthesis), not function generators!

You do need to buffer (or amplify) the outputs and filter them, for them to be any real use, but very useful they are.
They do have very crude square wave outputs available, but these usually limited to 1MHz.

There are however also some ready built "Function Generators" available which use these chips and provide the sine, square and triangle waves, but how good these are will depend upon the circuits used to filter, buffer and generate the different waveforms at different amplitudes.

Peter
__________________
SPECIALIST.....Knows everything about nothing
EXPERT..........Knows nothing about everything
PETERg0rsq is offline  
Old 1st Nov 2014, 4:43 pm   #5
dominicbeesley
Octode
 
dominicbeesley's Avatar
 
Join Date: Nov 2004
Location: Hebden Bridge, West Yorkshire, UK.
Posts: 1,885
Default Re: DDS function generator performance

What frequency, what scope and what module. I have an DDS-60 and it is great but that has good on board filtering and buffering. I also got some cheapo Chinese boards for a few quid each - those have not so good filtering and there's seem to be more harmonics - I've not fully tested them with Spectrum Analyser but they do produce harmonics which I used to good effect to make an VHF / FM pantry transmitter!

The output of your board might be high impedance and need to be buffered and amplified: a simple filter / lpad and and MMIC should do it but you'd need to find out the spec of the thing first.
dominicbeesley is offline  
Old 1st Nov 2014, 4:46 pm   #6
Guest
Guest
 
Posts: n/a
Default Re: DDS function generator performance

Most DDS chips have an on board comparator for the generation of square waves, are you using it?
 
Old 1st Nov 2014, 6:00 pm   #7
PE9ZZ_JO22KI
Pentode
 
PE9ZZ_JO22KI's Avatar
 
Join Date: May 2014
Location: Amsterdam, Netherlands
Posts: 202
Default Re: DDS function generator performance

What's a "gate TX"? And what DDS did you get?

Tjerk, 9ZZ
PE9ZZ_JO22KI is offline  
Old 1st Nov 2014, 6:20 pm   #8
Al (astral highway)
Dekatron
 
Al (astral highway)'s Avatar
 
Join Date: Nov 2006
Location: London, UK.
Posts: 3,496
Default Re: DDS function generator performance

Quote:
Originally Posted by PETERg0rsq View Post
Which DDS have you purchased, and what frequencies are you running at?
Hi Peter, I can't really identify it! It's of Far East mfr and simply labelled '2013/01/26 ver 2.1 DDS function generator. ' I can't read the print on the output chip either!

I've tried running it at 40KHz and 1KHz.

Dominic, ah, yep, it is exactly one of those cheapo Chinese versions you're talking about. It was around £15 so I expected it to be basic but with buffering and decent filtering. The signal is full of noise, manifesting as tiny dots on the trace.

MerlinM, yes, I am. It also has an 'offset' function that isn't explained...

Tjerk, a gate TX is a gate transformer...by which I mean a pulse transformer to provide gate drive, in this case to an IGBT eventually. Sorry, over-habitual use of this abbreviation. Unfortunately I can't ID the DDS for you as it has no distinguishing marks.

I'm not going to lose any sleep over this as it was dirt cheap and I have at my disposal all the obvious, long-established ways of generating a decent square wave fit for purpose...

I really got it just for convenience because of the onboard frequency counter and partly out of curiosity.

Anyway, thought it would be worth sharing one user's experience of these cheap modules.
Attached Thumbnails
Click image for larger version

Name:	IMG_3260.jpg
Views:	699
Size:	87.1 KB
ID:	99561   Click image for larger version

Name:	IMG_3261.jpg
Views:	355
Size:	93.2 KB
ID:	99562  
__________________
Al

Last edited by Al (astral highway); 1st Nov 2014 at 6:41 pm.
Al (astral highway) is offline  
Old 1st Nov 2014, 9:47 pm   #9
jimmc101
Heptode
 
jimmc101's Avatar
 
Join Date: Mar 2009
Location: Portsmouth, Hampshire, UK.
Posts: 674
Default Re: DDS function generator performance

It's almost certainly a updated variant of this design.
The R-2R ladder can be seen to the left of your second photo. The -ve voltage rail is supplied via the '7660 rather than externally.

I can't think why you're not getting a reasonable square-wave when not loaded, of course the op-amp will limit the skew rate of the DDS output (500mV/us for the LM358).
I'm not familiar with AVR chips but I would think that the edges of the direct (HS) output would be in the order of 10nS.

Which output and what frequency were you using?

I certainly wouldn't drive the gate TX directly, an attenuator or buffer amp would be better.

Jim
jimmc101 is offline  
Old 1st Nov 2014, 10:23 pm   #10
Al (astral highway)
Dekatron
 
Al (astral highway)'s Avatar
 
Join Date: Nov 2006
Location: London, UK.
Posts: 3,496
Default Re: DDS function generator performance

Quote:
Originally Posted by jimmc101 View Post
It's almost certainly a updated variant of this design.
Hi Jim,

Thanks for this, v. interesting and I'll take a closer look.

I'm using a noisy power supply, to be fair, so should sort this, too.

I'm still interested in the circuit for future reference and to keep up to date with developments -but I've now decided a better approach to testing the gate transformer.

(I don't want to go too off-topic but instead I'll temporarily rustle-up very conventionally NE555-generated square pulses, around 250KHz, through a simple logic buffer stage and then into the burly gate driver ICs.

I've already built the driver so no big deal.

Big (>5a) pulses this way and no loading of the source signal circuit.)

One thing... please can you explain how the offset works? I don't know anything about it tbh!

Cheers
__________________
Al
Al (astral highway) is offline  
Old 1st Nov 2014, 11:39 pm   #11
jimmc101
Heptode
 
jimmc101's Avatar
 
Join Date: Mar 2009
Location: Portsmouth, Hampshire, UK.
Posts: 674
Default Re: DDS function generator performance

Simple answer... the offset pot sets the DC level of the output without changing the AC component.
e.g with the amplitude set to give a 5v pk-pk waveform...
Set the offset pot to give 1.25v on its wiper and the output should be -2.5v to +2.5v
Set it to minimum (0v) and this becomes 0v to 5v
Set to maximum (4.5v = 5*1k/(1k+100R) and this becomes 4v to 9v

In more detail, using the circuit in my first link...
The R-2R ladder is fed from the 5v logic outputs of the AVR so it's maximum output will be about +5v (5 * 255/256 neglecting losses), the minimum is of course 0v.
The first half of the LM358 is configured as a differential amplifier, the output is equal to Voffset*(1+R21/R3) - Vladder*(R21/R3).
The second half is configured as an inverting amplifier with a gain of 0 to just under 4 (47k/12k) depending on the setting of the pot.

Looks as if some setting of amplitude and offset will cause the output amplifier to hit one or other supply rail.

By the way watch the Supply voltage, the '7660A is rated at 13v abs max. (non A version 10.5v abs max!!!)

Jim

Last edited by jimmc101; 1st Nov 2014 at 11:47 pm. Reason: typo
jimmc101 is offline  
Old 2nd Nov 2014, 12:09 am   #12
Skywave
Rest in Peace
 
Join Date: Jun 2006
Location: Chard, South Somerset, UK.
Posts: 7,457
Question Re: DDS function generator performance

Quote:
Originally Posted by PETERg0rsq View Post
However they are just DDS (Direct Digital Synthesis), not function generators!
Ah-ha! So that's what 'DDS' stands for: Direct Digital Synthesis.
O.K., so on that basis, what is Indirect Digital Synthesis (IDS) - and the significant differences between the two?
In my heart, I'm a vintage electronics enthusiast, but I'm not averse to acquiring a minimal grasp of such modern technology.

Al.
Skywave is offline  
Old 2nd Nov 2014, 1:14 am   #13
Radio Wrangler
Moderator
 
Radio Wrangler's Avatar
 
Join Date: Mar 2012
Location: Fife, Scotland, UK.
Posts: 22,876
Default Re: DDS function generator performance

Al, it's time to read some books!

There are explanations of what DDS are and how they operate and their strengths and weaknesses already written. It would be rather tedious for anyone to type reasonable explanation of them here.

Without knowing what that thing is, which device it uses and how it's been programmed to operate nothing much can be said specifically about it.

Have a look on the Analog Devices inc website for applications notes. Their AD9850 isone of the most popular devices, though it isn't in the package wjich appears on your board.

If you want to know what indirect and direct synthesisers are, I wrote this up for theARRL handbook. It's in any year's edition from1995 onwards and some of them can be found on the web. Look for the oscillators and synthesisers chapter. There are plenty other books.

David
__________________
Can't afford the volcanic island yet, but the plans for my monorail and the goons' uniforms are done
Radio Wrangler is offline  
Old 2nd Nov 2014, 1:14 am   #14
Al (astral highway)
Dekatron
 
Al (astral highway)'s Avatar
 
Join Date: Nov 2006
Location: London, UK.
Posts: 3,496
Default Re: DDS function generator performance

Quote:
Originally Posted by jimmc101 View Post
By the way watch the Supply voltage, the '7660A is rated at 13v abs max. (non A version 10.5v abs max!!!)
Thanks, Jim, that's really interesting

And indeed, on closer analysis I had a very spiky power supply with nasty transients.

Update:

I've cleaned up the power supply with a quick kludge using some ferrites, a couple of electrolytics and a Schottky barrier diode. Problem solved!

Here's a lovely clean square wave at 1Mhz, HS output. I'll try the other output at a lower frequency tomorrow and post the results.

New verdict - rather a good buy at the price!

I'm now really happy as I have a very clean, fast rise-time reference signal for testing purposes
Attached Thumbnails
Click image for larger version

Name:	IMG_3262.jpg
Views:	210
Size:	100.0 KB
ID:	99583   Click image for larger version

Name:	IMG_3263.jpg
Views:	292
Size:	79.1 KB
ID:	99584  
__________________
Al

Last edited by Al (astral highway); 2nd Nov 2014 at 1:20 am.
Al (astral highway) is offline  
Old 2nd Nov 2014, 12:25 pm   #15
Skywave
Rest in Peace
 
Join Date: Jun 2006
Location: Chard, South Somerset, UK.
Posts: 7,457
Arrow Re: DDS function generator performance

Quote:
Originally Posted by Radio Wrangler View Post
Al, it's time to read some books!
Unfortunately, there are two Al's contributing to this thread, so I'm guessing that that post was intended for me - and indeed if it was, then point taken - and thanks for the references & pointers.

Al. / Skywave
Skywave is offline  
Old 2nd Nov 2014, 1:52 pm   #16
Radio Wrangler
Moderator
 
Radio Wrangler's Avatar
 
Join Date: Mar 2012
Location: Fife, Scotland, UK.
Posts: 22,876
Default Re: DDS function generator performance

Ooops sorry! I did mean the other Al.

Anyway, there's not been much said on here about DDS, and I get the impression relatively few people know what they are. Maybe it's worth typing a brief bit about what they do and their foibles?

David
__________________
Can't afford the volcanic island yet, but the plans for my monorail and the goons' uniforms are done
Radio Wrangler is offline  
Old 2nd Nov 2014, 3:20 pm   #17
Skywave
Rest in Peace
 
Join Date: Jun 2006
Location: Chard, South Somerset, UK.
Posts: 7,457
Arrow Re: DDS function generator performance

Yes please - even a very brief introduction would be appreciated. When you're completely in the dark, even a dim candle is of value.

Al. / Skywave
Skywave is offline  
Old 2nd Nov 2014, 3:32 pm   #18
Al (astral highway)
Dekatron
 
Al (astral highway)'s Avatar
 
Join Date: Nov 2006
Location: London, UK.
Posts: 3,496
Default Re: DDS function generator performance

Quote:
Originally Posted by Radio Wrangler View Post
and I get the impression relatively few people know what they are. Maybe it's worth typing a brief bit about what they do and their foibles?
Erm, David, actually you got the wrong Al - it was indeed the other Al (Skywave) who asked the Q about direct/ indirect! No matter, it's confusing with two Als, and yours is a good suggestion. David

Further update:

Here's a square pulse from the DDS output at 50KHz. (Pic 1). Not bad, considerable ringing however.

And now, here's an interesting behavioural trait, because if we decrease the amplitude using the on-board pot., we get some marked undershoot (Pic 2).

Although excellent, there are relative imperfections in these waveforms compared with what's going on at the inverting input A of the op-Amp (Pic 3)...

Standard for a buffer stage like this?
Attached Thumbnails
Click image for larger version

Name:	IMG_3272.jpg
Views:	179
Size:	98.3 KB
ID:	99605   Click image for larger version

Name:	IMG_3273.jpg
Views:	151
Size:	100.2 KB
ID:	99606   Click image for larger version

Name:	IMG_3269.jpg
Views:	154
Size:	79.5 KB
ID:	99607  
__________________
Al

Last edited by Al (astral highway); 2nd Nov 2014 at 3:40 pm. Reason: pics need turning...! Mods, please can you fix - correctly oriented when uploaded. Thanks
Al (astral highway) is offline  
Old 2nd Nov 2014, 6:45 pm   #19
jimmc101
Heptode
 
jimmc101's Avatar
 
Join Date: Mar 2009
Location: Portsmouth, Hampshire, UK.
Posts: 674
Default Re: DDS function generator performance

A lot of op-amp types have poor phase margins when driving capacitive loads leading to ringing or even oscillation.
The lower the (closed loop) gain of the stage the more negative feedback around it and the lower the phase margin.
Hence the degradation as the output is reduced.

If you're using a x1 probe try switching to x10 to reduce the loading, alternatively add a resistor (around 100R) in series with the output to reduce the phase shift caused by the capacitive load.

Jim

ps Also worth checking power supply decoupling around the op-amp.
jimmc101 is offline  
Old 2nd Nov 2014, 7:26 pm   #20
Radio Wrangler
Moderator
 
Radio Wrangler's Avatar
 
Join Date: Mar 2012
Location: Fife, Scotland, UK.
Posts: 22,876
Default Re: DDS function generator performance

OK.

Think of a digital adder. It takes in two binary numbers, each applied to a different set of binary-weighted input connections. In a realistic modern DDS these would typically be 32 bit numbers. It gives an output, another 32 bit number which is the arithmetic sum of the two input numbers.

Of course, two 32 bit numbers added together could be larger than will fit into the 32 bit output. So there has to be a 'carry' output. A single bit which signifies an arithmetic carry.

Now think of a 32 bit latch. Thirty two flip-flops all sharing a common clock signal. It can latch and hold a 32 bit wide number.

The output of the adder (all 32 bits) is fed to the input of the latch, and the output of the latch is fed back to one of the inputs of the adder.

We have created a loop.

Into the remaining input of the adder we put a 32 bit digital word which we are going to use to control the frequency. For the purpose of our example, let's pick a number. How about 42?

Let's use a crystal oscillator to clock the latch. One popular DDS chip can run to 125MHz, so let's do that and get a 125MHz crystal oscillator

Say the machine starts with zero in the latch. The adder gets zero in one input, and 42 in the other. It adds them to give 42 to the latch input. When the clock next ticks, the active edge makes the latch move its input data to its output, and then hold it. So the latch outputs 42.

The adder now has 42 on each input. It adds these and outputs 84. On the next tick of the clock, the latch output changes to 84.

So every tick of the clock causes the number held in the latch to be increased by 42.

0, 42, 84, 126, 168 and so on and so on.

You'll be wondering what happens when it reaches the top.

2^32 is 4,294,967,296 and so the latch can have that many states. Because one of the states is all-zeroes, then the top number it can hold is 4,294,967,295

42 * 102,261,126 is 4,294,967,292 which is just 3 short of the top number, and 4 short of taking it right round the clock to 0000000000000000000000000000000000 where it started.

So the next tick takes the number to 38, and the carry bit will be on. We ignore the carry bit. we don't happen to need it. The next tick takes us to 38+42 = 80 and then 122. We're still counting in 42s and we're going round for a second time, but we're a little bit offset because a whole number of 42s doesn't go into 2^32.

The number in the latch keeps on doing a counting sequence, starting with some remainder from the previous sequence which offsets it, and leaving a remainder for the next sequence.

Lets go back and think about that first sequence.

The number in the latch, if plotted would be a staircase waveform. A stepped ramp Incrementing by 42 every 8 nanoseconds (1/125MHz)It keeps on going round and round the 0 to 4,294,967,295 range.

If we drew that as a diagram of a ring of 4,294,967,296 points (zero gets a point, too) then the values the latch hits will step around by 42 points every 8ns, and when it passes through the 4,294,967,295 to 0 join, it still gets the 42 points of step right.

Its frequency of this circling is 125MHz multiplied by 42 and divided by 2^32. which is 1.222361etc Hz

The smallest tuning word which would make sense (IE not zero) would be 1 and this would give 125MHz/(2^32) = 0.029103etc Hz And we can set the circling up to any frequency we want with a resolution of this much.

There's a practical limit that if we put in a tuning number bigger than 2^31 it would start to look like our tuning number was smaller, but negative, and we would no longer be able to be sure from the output of just what we'd put in. This is called aliasing, where something starts to have uncertainty over multiple possible identities... this is also a manifestation of Nyquist's sampling theorem.

Anyway, we now have a staircase/ramp generator which will go from 0 to approaching 62.5MHz insteps of a little less than 0.03Hz. I think this is staggering.

There are two problems:

1) We rarely want staircase waveforms. Sines and squares are much more popular
2) If we set it fast like MHz, there aren't many steps in the staircase.

Lets fix (1)

If the rotation of the number around the full range plotted as a circle represents a cyclic signal, then the instantaneous number represents the instantaneous phase of that signal.

We could use a huge look-up table to convert phase to voltage for say a sinewave.
Because we don't have 32bit fast DACs (digital to analogue converters) available, we're stuck with maybe 10 or 12 -bit DACs at that speed.

So the lookup table only needs 10 or 12 bits of output to drive a DAC. If this is so, and the table holds a sine function (Remember frank Castle's tables of logarithms, and trigonometric functions? Imagine doing a lookup in 8ns ) then we really only need 12 or 14 bits of input to the table.

So we put the top 12 or 14 bits of the latch number into the address input of a ROM, and the 10 or 12 bits of data from the ROM goes into a DAC to make a sinusoidal voltage for us.

Set the machine going, put a scope on the DAC output and we get our 1.22etc Hz sinewave within the limitations of the resolution of a 10-bit DAC.

Put a spectrum analyser on and we'll see other frequency components, including one nuisance which starts at 125MHz and descends as our wanted frequency goes up. They would both meet in the middle if we asked for 62.5 MHz (half our clock frequency) This is that aliasing business and the ghost of Harry Nyquist coming back to haunt us again.

We can fix this by feeding the DAC output through a lowpass filter that gives plenty of attenuation before we get to 62.5MHz, and then by making a not to never ask for more than will fit through the filter.

So there we have it. A sine output DDS with amazing frequency resolution, low cost and it's also very very agile, it can change frequency in 8ns.

Add a microcontroller, programme it to say sweep across 10.7 MHz and you have a fabulous and linear wobbulator.

Problem (2) went away when we added the anti-alias filter. The filter smooths the steps amazingly well because of the sine conversion.

The 125MHz 32 bit DDS with a 10 bit DAC has been out for over 20 years as the AD9850.

The 10-bit DAC introduces errors, and thee manifest as lots of little spurs all over the place, about 70dB smaller than the intended signal. Problem (2) above manifests as a small roll-off in the amplitude of the wanted frequency once you get to a few tens of MHz. If you don't tell people, they'll just blame it on the filter.

A lot of applications want a squarewave. Those awfully nice people at Analog Devices inc stuck a little fast comparator on the AD9850 chip, so youcan use it to square up the output of the filter. This is handy, but if cleanliness is critical, an off-chip comparator can be better.

This gives you a good squarewave either way.

NOW, who said the ROM contents could only be the look-up table for a sinewave?

We could put in one for triangles, square, or anything we could think of.

The limitation is it only works for rather low frequencies. If you go too high the problem of not many steps in the staircase bites and gives you jittery waveforms with cyclic variations and other nasties. The filter does the job perfectly for sines, but not for other waveforms unless they are low enough in frequency for their necessary harmonic structure to fit within the filter passband.

So the device Al (astral) is using is using a non-sine lookup, and he's seeing the erratic behaviour due to too few steps.

Phew! both typing fingers want a lie-down right now.

David
__________________
Can't afford the volcanic island yet, but the plans for my monorail and the goons' uniforms are done
Radio Wrangler is offline  
Closed Thread




All times are GMT +1. The time now is 12:02 am.


All information and advice on this forum is subject to the WARNING AND DISCLAIMER located at https://www.vintage-radio.net/rules.html.
Failure to heed this warning may result in death or serious injury to yourself and/or others.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright ©2002 - 2023, Paul Stenning.