Attached GCB program is the basis for a tuneable sinewave VFO based on an cheap AD9851 module from China.
Output frequency is settable in 1Hz steps across the entire range, using a 600pulse per revolution optical shaft encoder.
To simplify the maths needed to control the AD9851 I dumped the stock 30MHz reference crystal fitted to the module, and used instead an SI5351 clock generator to generate the reference frequency for the AD9851. (Using certain other reference frequencies can make the frequency control math for AD9851 and AD9850 ICs trivial - see comments in the code)
I've capped the output frequency range to 20kHz - 30MHz but it can readily be extended down to audio and up to >50MHz by changing the min and max limits defined in the program.
Sinewave output level across the entire range into a 50ohm load is approx -5dBm(+/-3db) .
A steady hand, and a soldering iron with a small tip, is needed to remove the stock 30MHz xtal from the AD9851 module. Take care and good luck!
Tip to minimise harmonic outputs from the AD9851 module
In addition to the sinewave output, the AD9851 module also generates a square wave output.
The duty cycle of the square wave is set by a pot. on the AD9851 module.
If you do not need the square wave output, and wish to minimise harmonic outputs, then set the duty-cycle control pot. to the end of its track. This locks the square wave output ports to either high or low, depending upon which way you rotate the wiper on the pot. (This does not affect the wanted sinewave output.)
You are very welcome Stan!
Attached photo shows the two types of module I used (the AD9851, and the SI5351).
The photo of the AD9851 shows the module before the 30MHz xtal was desoldered/removed.
Attached GCB program is the basis for a tuneable sinewave VFO based on an cheap AD9851 module from China.
Output frequency is settable in 1Hz steps across the entire range, using a 600pulse per revolution optical shaft encoder.
To simplify the maths needed to control the AD9851 I dumped the stock 30MHz reference crystal fitted to the module, and used instead an SI5351 clock generator to generate the reference frequency for the AD9851. (Using certain other reference frequencies can make the frequency control math for AD9851 and AD9850 ICs trivial - see comments in the code)
I've capped the output frequency range to 20kHz - 30MHz but it can readily be extended down to audio and up to >50MHz by changing the min and max limits defined in the program.
Sinewave output level across the entire range into a 50ohm load is approx -5dBm(+/-3db) .
A steady hand, and a soldering iron with a small tip, is needed to remove the stock 30MHz xtal from the AD9851 module. Take care and good luck!
Tip to minimise harmonic outputs from the AD9851 module
In addition to the sinewave output, the AD9851 module also generates a square wave output.
The duty cycle of the square wave is set by a pot. on the AD9851 module.
If you do not need the square wave output, and wish to minimise harmonic outputs, then set the duty-cycle control pot. to the end of its track. This locks the square wave output ports to either high or low, depending upon which way you rotate the wiper on the pot. (This does not affect the wanted sinewave output.)
Schematic for the VFO described above.
Thanks for sharing.
You are very welcome Stan!
Attached photo shows the two types of module I used (the AD9851, and the SI5351).
The photo of the AD9851 shows the module before the 30MHz xtal was desoldered/removed.