A Useful General Purpose Oscillator.

Anything not specifically related to NBTV, but at least of some technical nature that might be of interest to NBTV members. Items for sale and links to retailers do not belong here.

Moderators: Dave Moll, Steve Anderson

Re: A Useful General Purpose Oscillator.

Postby Steve Anderson » Fri Sep 04, 2020 7:39 pm

An initial go at the simplified 12.5MHz version...

AD9833 DDS Frequeny Source 1v01-Model.gif


Much simpler...IF 12.5MHz is enough for you, it is generally for me...

I'll add the LF op-amp bit later...items in red to be confirmed...with the LF op-amp C102 could be significantly reduced in value, say 100uF.

If you cannot find 'digital transistors' use a BC548 plus a base series resistor of 3k3.

Steve A.

I've just noticed TR101 is shown as a PNP device...I'll correct it...done...

As always, the items in blue are only if you intend to program the micro yourself.
User avatar
Steve Anderson
"Fester! Don't do that to 'Thing'"
 
Posts: 5357
Joined: Fri Mar 30, 2007 10:54 pm
Location: Bangkok, Thailand

Re: A Useful General Purpose Oscillator.

Postby Steve Anderson » Wed Sep 16, 2020 4:14 pm

Some days late but the AD9833 DCO modules arrived today, time to get moving! They are even smaller than I thought, but the pin-spacing still is 0.1"/2.54mm. They come with the pin-connector if you want to use it.

Steve A.
AD9833 Module 1.jpg
AD9833 Module 1.jpg (53.17 KiB) Viewed 9715 times

Rather thoughtfully the function of each pin is on the reverse...

AD9833 Module 3A.jpg
AD9833 Module 3A.jpg (16.16 KiB) Viewed 9715 times
User avatar
Steve Anderson
"Fester! Don't do that to 'Thing'"
 
Posts: 5357
Joined: Fri Mar 30, 2007 10:54 pm
Location: Bangkok, Thailand

Re: A Useful General Purpose Oscillator.

Postby Steve Anderson » Tue Sep 22, 2020 4:37 pm

I built up the majority of the circuit yesterday, there's just the analogue output stage and power supplies to do. Though the +5V one is already on this board.

Oh! I forgot, then there's the software...

The 74HC540 will be replaced by a 74AC540 when they arrive...but HC version is fast enough for testing...also the 4x300R resistors to generate the 75R output are on their way...

Note the date code on the '540, depending on how RCA do their date coding its either 14 or 30 years old!

The micro is the 14-pin chip, a PIC16F688.

I've powered it up, no smoke as yet, the micro is communicating with the PC via the programmer...now for the code...

Steve A.
AD9833 1.jpg
User avatar
Steve Anderson
"Fester! Don't do that to 'Thing'"
 
Posts: 5357
Joined: Fri Mar 30, 2007 10:54 pm
Location: Bangkok, Thailand

Re: A Useful General Purpose Oscillator.

Postby Steve Anderson » Thu Sep 24, 2020 11:45 am

I started coding yesterday, slow progress as I haven't done any coding in perhaps a year, it's a language and like any other, "If you don't use it you lose it." But like riding a bicycle after some time it comes back, you're just a bit wobbly at first.

In the 80s I lived in Paris for a few years and became quite fluent in French, now some 35 years later - it's gone.

Steve A.
User avatar
Steve Anderson
"Fester! Don't do that to 'Thing'"
 
Posts: 5357
Joined: Fri Mar 30, 2007 10:54 pm
Location: Bangkok, Thailand

Re: A Useful General Purpose Oscillator.

Postby Steve Anderson » Sun Sep 27, 2020 6:45 pm

I'm going to have to introduce a buffer between the oscillator output and the 'AC540. Silly me, I assumed the square-wave output would be at logic levels, not so! (It's 0-0.6V), It's no rocket science, but finding a transistor fast enough in a TO92 package isn't easy these days. It comes down to the following, BF199, BF959, 2SC3355 and KSP10. There are probably others...ideally they need an Ft of over 500MHz and yet still have a reasonable amount of current gain, over 50. Minimal capacitance wiring will be needed, and the circuit must not allow the buffer to saturate.

I'm thinking with a view to using an AD9851 module in the future which goes up to 70MHz...hardly NBTV stuff though!!

Though they might seem OK to use for a transmitter (or even a receiver local oscillator) I wouldn't trust their stability or accuracy until proven. At the price they are that comes as no surprise! If the on-board oscillator were replaced you might have a chance...but good luck with that!

Steve A.
User avatar
Steve Anderson
"Fester! Don't do that to 'Thing'"
 
Posts: 5357
Joined: Fri Mar 30, 2007 10:54 pm
Location: Bangkok, Thailand

Re: A Useful General Purpose Oscillator.

Postby Steve Anderson » Mon Sep 28, 2020 5:46 pm

A few mods to get around the limited output voltage for the TTL output...choose a transistor (TR104) with a high Ft, the 2SC3355 has an Ft of 6.5GHz, As ever, this hasn't been built or programmed as yet, I suggest awaiting developments...

Steve A.

A quick assessment on the prototype indicates a transition time of 200-250 ps (picoseconds). Though the propagation delay is still in the 5ns range. Though far better than I expected...mainly down to the 74AC540...
Attachments
AD9833 DDS Frequeny Source 1v02.gif
User avatar
Steve Anderson
"Fester! Don't do that to 'Thing'"
 
Posts: 5357
Joined: Fri Mar 30, 2007 10:54 pm
Location: Bangkok, Thailand

Re: A Useful General Purpose Oscillator.

Postby Steve Anderson » Tue Sep 29, 2020 3:24 pm

The drawing above should read, "V1.03, 28/09/20". "Less haste, more speed."

Steve A.
User avatar
Steve Anderson
"Fester! Don't do that to 'Thing'"
 
Posts: 5357
Joined: Fri Mar 30, 2007 10:54 pm
Location: Bangkok, Thailand

Re: A Useful General Purpose Oscillator.

Postby Harry Dalek » Sat Oct 03, 2020 8:09 pm

Interesting to see how it go's when Built Steve ,a lot of work go's into inventing :wink:
The electromagnetic spectrum has no theoretical limit at either end. If all the mass/energy in the Universe is considered a 'limit', then that would be the only real theoretical limit to the maximum frequency attainable.
User avatar
Harry Dalek
"Fester! Don't do that to 'Thing'"
 
Posts: 5363
Joined: Fri Sep 26, 2008 4:58 pm
Location: Australia

Re: A Useful General Purpose Oscillator.

Postby Steve Anderson » Sun Oct 04, 2020 12:56 pm

Thanks Harry. I've started on the code but there's still a way to go. The datasheet for the AD9833 is a bit vague in places which hasn't helped, and that's unusual for AD (Analogue Devices). The majority of the code is converting ASCII digits into binary, multiplying the result by 10.7374 then sending it to the DDS in the correct format.

There's mention on the 'net that the square-wave output is at a much higher amplitude than the sine or triangle outputs - I'll find out in due course, there's no mention of that in the datasheet. If that's true TR104 and associated components may not be required.

What is mentioned in the datasheet is a square-wave divided by two output. If that's just a standard flip-flop it should be a 50:50 duty-cycle if it be needed.

The ASCII data to this device is very simple, a few examples...

S=1,234,567<Enter> Sine at 1.234567MHz, commas are optional and echoed back, easier for the human but ignored by this, Only 1Hz increments for now.
S=1234567<Enter> Equally valid.
Q=100,000<Enter> sQuare at 100KHz, commas again optional.
T=765,432<Enter> Triangle at 765.432kHz, commas again optional.
D=3,000,000<Enter> Square Divided by two, commas optional, here the output would be 1.5MHz at a 50:50 ratio. Plus you can get 0.5Hz resolution as this is.

The '=' is optional can be either a space or nothing at all e.g S 1,234,567 or S1234567, in both cases with or without the commas. Applies to 'Q', 'T' and 'D' too. Also the S/Q/T/D can be either upper or lower case. It will echo back whatever is input so you can see where the error lies...should you make one.

Leading zeros (e.g. 01234) or over or equal to 12.5MHz generate an error, as would a zero input (e.g. S=0).

At the moment the ASCII I/O is at 9600 baud which is fine for direct human input but I intend to provide a selectable 57.6k baud I/O for faster automated uses, frequency sweeps or FM modulation. Maybe even 115.2k baud if oscillator changed to an 18.432MHz crystal instead of the 8MHz internal version...done already! 18.432MHz crystals are available from all the usual suppliers though it may seem an odd frequency.

Steve A.

Once this is done it would quite easy to migrate it to interface with an AD9850 (up to 40MHz) or an AD9851 (70MHz).
User avatar
Steve Anderson
"Fester! Don't do that to 'Thing'"
 
Posts: 5357
Joined: Fri Mar 30, 2007 10:54 pm
Location: Bangkok, Thailand

Re: A Useful General Purpose Oscillator.

Postby Steve Anderson » Sun Oct 04, 2020 4:08 pm

Updated drawing from above...

Steve A.
AD9833 DDS Frequeny Source 1v05.gif
User avatar
Steve Anderson
"Fester! Don't do that to 'Thing'"
 
Posts: 5357
Joined: Fri Mar 30, 2007 10:54 pm
Location: Bangkok, Thailand

Re: A Useful General Purpose Oscillator.

Postby Steve Anderson » Mon Oct 05, 2020 2:03 pm

Here's the LF sine/triangle output arrangement. The two variable resistors could be made front-panel controls instead of presets, but keep the leads short.

The gain pot is what it says, the offset pot is so you can eliminate the positive bias on the output so the waveform is centred around 0V, even somewhat negative. The values are shown as '????' until I determine the actual output amplitude, the datasheet says one thing. the 'net says another. It's determined by the value of a resistor on the AD9833 module called Rset, I've seen various values so it's a case of wait and see...

The filter roll-off frequency could be anything, I just went with 40kHz to start with. This stage is DC-coupled so will go as low as the DDS allows...

Steve A.

I've just noticed an error on the drawing and have removed it, I'll upload a new version soon...now updated...

If you wish the filter to roll-off at a lower frequency change C202/203 pro-rata, e.g. If you'd prefer -3db to be at 4kHz instead of 40kHz, multiply them by 10, C202=3n3, C203=1n.

This is a Bessel filter which has a very gentle roll-off but minimal ringing on edges of waveforms, not so much of an issue here but often important when bandwidth limiting square waves.
Attachments
AD9833 DDS Frequeny Source 1v06tif.gif
AD9833 DDS Frequeny Source 1v06tif.gif (34.34 KiB) Viewed 9553 times
User avatar
Steve Anderson
"Fester! Don't do that to 'Thing'"
 
Posts: 5357
Joined: Fri Mar 30, 2007 10:54 pm
Location: Bangkok, Thailand

Re: A Useful General Purpose Oscillator.

Postby Steve Anderson » Tue Oct 06, 2020 5:30 pm

Quick update...18.432MHz xtal and 9600/115,200 baud ASCII all works OK.

Square wave/2, 'D', function added.

Now to start to generate some waveforms...

Steve A.

Now, thinking back, why did I not use an analogue switch chip instead of the relay? Something for the future...Development/evolution as ever...
User avatar
Steve Anderson
"Fester! Don't do that to 'Thing'"
 
Posts: 5357
Joined: Fri Mar 30, 2007 10:54 pm
Location: Bangkok, Thailand

Re: A Useful General Purpose Oscillator.

Postby Harry Dalek » Wed Oct 07, 2020 6:15 pm

Steve Anderson wrote:Quick update...18.432MHz xtal and 9600/115,200 baud ASCII all works OK.

Square wave/2, 'D', function added.

Now to start to generate some waveforms...

Steve A.

Now, thinking back, why did I not use an analogue switch chip instead of the relay? Something for the future...Development/evolution as ever...



I was thinking why not a 4066 for passing signals...then they are glitchy some times.
i have to read back on what you plan to use this for time for a review !
The electromagnetic spectrum has no theoretical limit at either end. If all the mass/energy in the Universe is considered a 'limit', then that would be the only real theoretical limit to the maximum frequency attainable.
User avatar
Harry Dalek
"Fester! Don't do that to 'Thing'"
 
Posts: 5363
Joined: Fri Sep 26, 2008 4:58 pm
Location: Australia

Re: A Useful General Purpose Oscillator.

Postby Steve Anderson » Thu Oct 08, 2020 12:11 pm

Harry Dalek wrote:I was thinking why not a 4066 for passing signals..

I did consider using a 'HC4053 which rather unusually for a logic chip can handle positive and negative signals. It requires +5V, 0V and -5V for power in that case. But there are some concerns with isolation at high frequencies, i.e. the signal can 'leak' into the 'off' input or output. This would be worse if using the higher frequency AD chips, the 40MHz AD9850 or the 70MHz AD9851. Not that I really have a need for them.

As for what this is for? It's a tool, same idea as a multi-meter or 'scope, it can be used on anything that needs a signal. My existing signal generator is fading fast, but it is 30 years old.

Being remote controlled (at least in frequency and waveform) it could be used as a modulator for SSTV, but that's overkill. My existing SSTV modulator uses a small 8-pin PIC micro and a handful of other components.

It is as the title says, "A Useful General Purpose Oscillator." But it can go down to some ridiculously low frequencies, ideal for testing NBTV stuff. The lowest frequency it can generate is 0.093Hz, or one cycle in 10.75 seconds.

Steve A.

I'm thinking of adding a 'B' (Binary) input mode. This would be the raw binary value of the output frequency, mainly useful with those extreme LF signals. Or perhaps a 'H' (Hex) mode for similar reasons, but maybe both/either of those sometime later...
User avatar
Steve Anderson
"Fester! Don't do that to 'Thing'"
 
Posts: 5357
Joined: Fri Mar 30, 2007 10:54 pm
Location: Bangkok, Thailand

Previous

Return to Off Topic

Who is online

Users browsing this forum: No registered users and 7 guests