AD7C VFO: This project was more interesting than my first Arduino project the Morse code generator. It is a DDS variable frequency oscillator (VFO), designed by AD7C and based on the Analog Devices AD9850 chip.

Components of DDS VFO

    I did not use exactly the same parts as in the original design, and therefore modified AD7C’s program a little. The rotary encoder that I used emits a great many pulses per revolution (600). For this particular encoder I modified the Arduino sketch to decrease the encoder’s sensitivity to a more comfortable level. Less expensive rotary encoders generally emit fewer pulses per revolution.

Modification to decrease encoder sensitivity

Highlighted lines are inserts in the original code. By responding to every 20th pulse the ISR’s sensitivity is decreased by a factor of 20. In other words it reacts to only 30 of the 600 pulses per revolution (one per 12 degrees of turn).

    The second change also relates to the rotary encoder. The one I purchased did not have a built-in pushbutton so I added an ordinary momentary SPST switch (shown in the photo above). Even when de-bounced with an RC and Schmitt trigger, longer duration button presses caused multiple step changes. My first thought was to insert a hardware one-shot, but then I realized that this problem could also be addressed in software.

One step per button press

Again, the highlighted code was inserted into the original sketch, as shown. The only other changes to code were to accommodate the different LCD that I used. These are minor and not interesting.

    At 7 MHz the VFO’s output was 0.8 volts P-P and at 28 MHz about 0.2 volts P-P.  However for the demo below, instead of showing the oscilloscope display, I hooked the VFO into the previously described ZZRX-40 kit receiver, and tuned across the 40 meter band.

    Demo: AD7C_VFO.mp4


I have not yet enclosed the VFO in a box. The rotary encoder (model LPD3806 600BM) came with no mounting hardware or template, or for that matter even an English-language wire color code! If I should manage to overcome the mounting challenge I will post another photo.  

    VFO Enclosure: I misidentified the challenging part of enclosing the VFO. Mounting the rotary encoder was easy, using an analog of the Red Green method but substituting a hose clamp for duct tape, which would also have worked.

Rotary Encoder Mount (Red Green method)

    A bigger challenge was to cut a rectangular hole for the 16 x 2 LCD.  I was not able to make a straight cutout, using the Dremel.  Luckily it is possible to conceal the jagged cut with a manufactured bezel. I suppose with a 3D printer or a laser cutter one could construct a smooth bezel, but with my  selection of tools (and skill level) a homemade bezel would have been as rough as the original cut.

    I have read discussions of how to make professional looking letters on a panel, but that also doesn’t look easy. With only an on-off switch and frequency step button, lettering would be hardly more than a decorative addition. On the other hand lettering would be a useful skill to acquire.

Front with bezel


Projects Home







Project descriptions on this page are intended for entertainment only. The author makes no claim as to the accuracy or completeness of the information presented. In no event will the author be liable for any damages, lost effort, inability to carry out a similar project, or to reproduce a claimed result, or anything else relating to a decision to use the information on this page.