Monthly Archives: October 2014

DG5 mounted and ready to go!

I ordered up a 2″x4″x 5″ extruded aluminum chassis off of eBay, and mounted the DG5 and the LCD display.



It’s looks good, and the metal shielding eliminated some slight RFI from the board.  There are multiple, HF signals on the board being amplified and switched – a metal chassis is recommended!


Looks good on top of the TS-520S!

Strange dreams about VFO drift.

I have strange dreams.  I often awake with new ideas on something that I am working on, which really isn’t all that strange, but when I try to explain my dreams to my wife, well…. they’re strange.

Yesterday morning I woke up thinking about other things I could do with the DG5 shield, and one of the things I dreamed about was making VFO drift measurements.  Using the DG5 emulator and the USB communications with the computer, I could log the calculated VFO frequency over time, and see how my VFO drifted during warmup.  This was pretty straight forward, instead of scanning thru three frequencies to measure, I just locked the board to the VFO and increased the gate time to 1 second, and took a measurement every 6 seconds.  I printed these results to the serial port and captured them with my computer.

Now, there’s another source of drift in this setup, and that’s the crystal oscillator on the Arduino itself.  The crystal’s I have used for other ATMega328 based project boards are rated at 20ppm at 16Mhz – the clock frequency the Arduino uses. 20ppm works out to be +/- 320 Hz = quite a bit of potential measurement error!  But crystals don’t usually drift all over the place in short periods of time, with relativity stable temperatures.  I had the Arduino and the shield powered up overnight with the TS-520S off, so I figured it would be pretty stable for a measurement of the TS-520S VFO drift during warm-up.


Here’s the drift plot over about 3 hours of warmup.  I suspect most of the calculated drift is the TS-520S VFO, and not the Arduino. But we can actually eliminate the Arduino’s error using one of the DG5’s other inputs.

By using an external frequency reference, we can eliminate the Arduino as a source of the error.  The DG5 emulater can select from 3 inputs for measuring (2 direct, 1 prescaled by a divide by 8 counter), so I used my HP 8924C as an external frequency reference. It uses an OCXO (Oven Controlled Crystal Oscillator) for it’s frequency source, which is much better than the $0.39 Arduino crystal. I don’t have the spec’s in front of me, but if I remember correctly, it’s something like 0.05 ppm or better.  I have used it to obtain sub 1 Hz measurements in the ARRL Frequency Measurement Test (, so it’s pretty good at these frequencies.

This time I had the program select the VFO input, make a measurement, then select the external frequency reference (which was set to 5.000000 Mhz) , and make another measurement, Since we know the input frequency is 5.000000 Mhz we can calculate the error, then apply that error to the measured VFO frequency.  The data of the Arduino looks like this:


That’s the fist minute or so of data out of the Arduino.  The columns are VFO (the raw measured frequency), the Ref (the 5 Mhz reference frequency as measured by the Arduino), The calculated error (REF – 5,000,000), the corrected VFO frequency (Measured VFO + ERROR), and lastly the millis() function out of the Arduino which gives us the Millis counter value – how many milliseconds we’ve been running.

Put this in to Excel, and we get this:


Here’s the calculated error in Hz over about 7 1/2 hours (I left it running overnight).  Looks like the Arduino is -59.512 Hz low on average, but drifted only about 5Hz during the test.  Not bad, and perhaps I should add a frequency error compensation factor in the DG5 code.

Here’s the corrected VFO drift over 7 1/2 hours:



Even after running all day, the TS-520S’s VFO continues to drift appreciably – about 40Hz over this time frame.  No big deal – it’s amazingly stable for the technology – but it’s sure nice to be able to characterize it!

Points learned:

  • It looks like the Arduino frequency stability is about 10x better than the TS-520’s VFO in this setup, which is good since we’re looking to the Arduino to measure the VFO.
  • I have only measured the VFO so far, I’ll probably do a similar exercise with the BFO (which mixes with the VFO to obtain the IF frequency) and the Hetrodyne oscillator (HET) to see how stable they are.

The DG5 shield can be a useful tool as well as a frequency display!


DG5 Emulator Version 1.5 PCB’s have arrived!

Got the boards in yesterday, was feeling pretty confident about the design, so I ordered 20 this time.  Lucky, the boards look good, and the first one I built fired up right away – whew!


Here it’s fully populated and mounted on an Arduino Duemilanove.



The new boards are a bit more packed than version 1 as they have a few more features.  There’s a 5V 7805 regulator option, 2, 6-pin headers for an external LCD (with a contrast pot), and 4 mounting holes that match up to the Arduino boards.  Quality looks good, these are from Accutrace here in the US – see for info.  Only 2 weeks as opposed to 4 or so from China.





With the boards packed, the clearances between the Arduino and the DG5 shield are tight – too tight in areas as is a usual issue with shields.  I put a piece of electrical tape over the top of the USB connector, and trimmed the mounting tabs for the RCA connectors that protruded thru a little too far.  I also covered the ICSP connector to keep it from touching.


Here’s the layout.



The 6 pin jumper cables I had are a little long, 12″ I think.  I’ll be ordering up some 4″ jumpers that will make it easy to mount in a case.

If you’re interested in a board, leave me a note here and I’ll get in touch with you!  I am working on the Bill of Materials for the complete kit – I had a lot of parts in my parts bin so I haven’t sourced everything, but most parts are available from Mouser, and a couple are from SparkFun (RCA connectors, LCD Jumpers, shield headers).

A DDS VFO for the TS-520S

While I am waiting for the new DG5 boards to arrive (they shipped yesterday – yay!), I decided to see if I could get the AD9850 DDS module I got on eBay to work as an external VFO.  If you search “DDS AD9850” on eBay you should find lots.

This is mine.


The module is being controlled with an Arduino UNO – it sends the desired frequency serially to the DDS chip.  The Arduino is also attached to a rotary encoder for frequency input, as well as an LCD display.  In this prototype, the LCD display is showing the DDS frequency, not the VFO frequency.  I don’t really need a display on the VFO since the DG5 emulator already displays the dial frequency.  An additional advantage to this is I don’t have to worry about the radio Carrier/BFO and Heterodyne oscillators warm-up drift as the dial frequency is being calculated using these actual frequencies by the DG5 emulator.

I put a 0.01uF cap between the output of the DDS and the VFO signal input on the TS-520 to block any DC component present on the output from the module.   The stock output was a little low, but worked – signals were a bit low- 3-4 S units as compared to my K3.  Looking at the datasheet for the DDS module, there is a 3.9k ohm resistor called “Rset”, which sets the DAC’s full scale output current.  I put a 2.2k resistor in parallel with it (just soldered it on top of the existing 3.9k SMD part, you can see it in the pic above) to lower the Rset value and increase the DAC output – bingo!  Signals are on par with the K3, and signal reports are good.  I’ll need to make sure I am not saturating the output or causing any distortion – I might need a buffer amplifier if there are any problems. Looked OK on the scope.



Next steps will be to get it in a case on a protoboard, and establish communications between the DG5 emulator and the VFO – the DG5 is connected to the computer, and I can have the computer tell the DDS what frequency to go to, and I might be able to use one display.  At this point I am leaning to independent boxes as the DG5 box is best on top of the TS-520, and the VFO would be best off to the side with the VFO knob and at the same general height as the existing VFO knob.  The rotary encoder I am using is a cheap mechanical type with detents, I’ll need to get a higher resolution, smoother encoder (probably optical) for the final design.

Let me know what you think!

Steve – KV6O

P.S. – I have been in touch with Todd at ToddFun, I sent him a couple of the first run PCB’s for the DG5 emulator – he’s building it and will be posting a new video with the DG5 emulator soon!  Keep your eye out for it!