A few DG5 updates

I have done some digging into frequency accuracy of the past few weeks, and discovered a few things that I want to share, as well as some code updates. Some background…

When the new run of boards came in, I built one to verify that they work OK. As I have two DG5’s already built and running (one LCD, one Nixie, mounted in cases) I decided to get this new board working on a clone Duemilanove board I ordered on eBay. It worked, but the frequency was 400 to 500 Hz off, and the calculated USB/LSB/CW was wrong. So, I tried the new board on one of my existing Duemilanove’s, and everything worked just fine. So, what was going on with these clones?

I measured the crystal on the clone board by holding an piece of insulated wire near the circuit when the board was running, and monitoring the signal on my HP 8924C – the crystal oscillator circuit was about 925Hz low from the desired 16Mhz, which translates to a 57ppm error. So, I ordered up some 10ppm crystals from Mouser, and replaced the crystal with the new one – it only measured 55-58 Hz off, or about 3.5ppm. Much better. When I hooked it up to the TS-520, the measured frequency was correct. The accuracy of your frequency measurements is only as good as your reference. The program measures the frequency by direct count of the sampled signal in a given time period, which is 100mS in the program. If your reference is off, your measurement is going to be off.

However, there were some other things I noted when troubleshooting this problem. I was using the DEBUG mode which is accessed by typing “DEBUG1;” in the Arduino serial monitor In this mode, the board will print all the measured frequencies – useful for figuring out what the program is seeing from each input. While troubleshooting, I wanted to make sure I had a stable, known frequency to measure, so I used the HP 8924C’s signal generator to give me 5.000000 Mhz and fed it into the VFO input while monitoring the readings in DEBUG mode. I was getting some errors that I couldn’t really account for, and as I changed the gate timing during troubleshooting I got even stranger errors. Increasing or decreasing the gate time by factors of 10 should only change the resolution / number significant digits, but it was changing the measurements as well.

So, I did some searching on the web and found a different frequency counter library, and I substituted it for the existing code, and things seemed to stabilize. I’ll post links to the new code as soon as I am done testing and porting it to the LCD version – I was working in the LED version to make the change.

But a few other things came up. The original DG5 did not compute the mode (USB/LSB/CW), I added that in as I wanted to be able to read the frequency and mode into logging software, and figuring out the mode was just a matter of looking at what the BFO frequency is. In the TS-520S Service manual on pg. 6, it describes the frequencies used by the BFO for the different modes. It states, “Frequencies are 3396.5 kHz for USB, 3393.5 kHz for LSB, and 3394.3 kHz (receive) and 3395.0 kHz (transmit) for CW.”

Here’s the piece of code that does the figuring:

// use the BFO (CAR) frequency to determine USB/LSB/CW

if (bfo > 3396500){
USB = true;
LSB = false;
CW = false;
mode = ‘U’;
}

else if (bfo < 3393500){
USB = false;
LSB = true;
CW = false;
mode=’L’;
}

else{
USB = false;
LSB = false;
CW = true;
mode=’C’;

The program tests a few conditions based on this information, and testing that I did on my TS-520S.  On my unit, if the BFO measurement came in ABOVE 3396.5 kHz, it was in USB – so that’s what I had the program do.  It’s never going to be sitting exactly AT the frequency stated by Kenwood – I needed to divide up the boundaries and see if it fell into one of these areas.  The issue is, what worked for my TS-520S might not work for others, based on inaccuracies in the clock on the Duemilanove (one source of error) and inaccuracies in the TS-520S itself.  (BTW – I used both a mode variable (U, L, or C) to track, as well as some boolean flags (true/false) – this would probably be cleaned up as only one is necessary.)

So, if your display is showing “c” no matter what mode the radio is in, enter the debug mode by typing “DEBUG1;” in the serial monitor (9600 baud) and press the “SEND” button. You screen should start streaming updates every 1/3 od a second or so, from here you can see the actual measured BFO frequency as you click thru the different modes. Adjust the section of code (shown above) to reflect the range for your TS-520. You might have to play with this to get it dialed in.

I’ll get an update posted here as soon as I port the new library to the LCD version. and do some testing.  I hope you’re having fun and learning – that’s what this is all about!

Steve

New run of DG5 PCB’s now shipping!

UPDATE 4/18/16: Got 6 orders for 10 boards total in the first 24 hours, I guess there’s still demand! I have sent everyone who asked about availability an e-mail as of this evening. I ordered 100 boards this time, so hopefully they will last a while and everyone who wants to build one can get one. Thanks for the continued interest!

Steve
KV6O

Thanks everyone who has e-mailed for your patience, I wanted to build one to make sure the new run of boards are OK to go as I am using a new manufacturer. I am happy to report that they work 100%. So, the new boards are ready to ship, I have boards reserved for everyone who e-mailed me and will send you an e-mail soon – if you’re reading this before you get an e-mail from me feel free to order below. The boards can be ordered using the “By Now” button on the project page, or right here:

Click the “Buy Now” button below to order a DG5 Emulator PC Board ONLY:





Few notes. I purchased a couple of Duemilanove boards from China – these looked like the original board, they both have the silkscreen of Italy on the back, but BOTH are about 1K in frequency off. I thought something wrong with my build, but when I plugged it into a real Duemilanove it worked 100%. Next steps will be to check the crystal oscillator to see if they are both off, or if there is something else going on – they were both off by approximately the same amount.

Please remember to read thru the project page BEFORE ordering so you know what you’ll need!

Thanks for your continued support!

Steve
KV6O

New PCB’s in, Nixie version mounted in case

The new run of boards came in and look good visually – I want to build one and test before I start selling them since I used a different manufacturer this time. I have used them before with excellent results, but it’s been a few years. Just want to be sure before I start shipping these things all over the world!

I got the Nixie version mounted in a case a few weeks ago:

The case is a bit larger than I needed, but it gives me room to add a DDS VFO in the future, something I’ve been meaning to do. I haven’t posted the code for the Nixie version yet, if you’re interested, let me know. It uses Taylormade I2C Nixie modules that use the Russian IN-12B tubes.

For those who have requested that I e-mail them when the new boards come in – I will send you an e-mail when I am ready to ship, hopefully later this week. I might sell off the built test board as I am not sure if I really need 3 of these floating around my shack as I only have one TS-520S – more on that when I get it built. It would include the built board, an Arduino Duemilanove, and either an LCD or LED display – no case. Just a thought at this point.

Steve
KV6O

New run of DG5 PCB’s on order as of 3/18/16

Update – boards have shipped as of today, 4/8/16. I should have them early next week and will probably build one to make sure they are good – I am using a different vendor for this run. I’ll let everyone who has posted inquiring about availability when I am ready to ship.

Due to the continued interest, I have ordered up another set of boards. I think as I finish up the LED and Nixie versions there might be more interest as well. The LED code is here, I haven’t released the Nixie code just yet but I will when I have the project complete. All three versions use the same PCB board – just different connections on the board.

More to come, but another run of boards is in the works!

Steve
KV6O

Kenwood DG5 Emulator with Nixies is working!

I seem to be going backwards with my display technology for this emulator. First it was an LCD display, then LED’s, now Nixies! I completed wiring up a set of TaylorEdge SmartNixies (http://www.tayloredge.com/storefront/SmartNixie/index.html) using the IN-12b Nixie tube. They make using Nixies with a micro-controller easy. Each module has a PIC controller that is I2C addressable, so wiring is much easier than wiring up all the cathodes and anodes of 6 tubes – just +5V, +170V (for the tubes), GND, and SDA/SCL data lines. 5 wires daisy chained together.

I need to find an enclosure to get this mounted in, and given the size I’ll need I am thinking about a wooden enclosure with a speaker as well, unless I find some old test equipment shell I can mount this in – like an old Heathkit Frequency counter or similar.

So, to review, LCD is nice, LED’s are correct (the original DG5 used LED’s), and Nixies are the best!

DG5 Emulator boards SOLD OUT.

The last 10 orders or so came in very slowly, so I’ll have to wait and see before I order more. I am hoping with the improvements made to the code, and a 7-segment LED version working and (hopefully!) a Nixie version not far behind that there will be more interest moving forward. I’ll post more here as I make progress, I have some mechanical work to to on the 7-Segment version before I shoot a video and post it. I have the front panel cut and a bezel installed, and 3 discrete 3mm LEDs to indicate USB/LSB/CW done, just need to work on getting the display mounted in the case positioned behind the bezel properly.

Steve
KV6O

DG5 update – switched to LED’s, and prepping for Nixies!

After a little over a year of selling boards, and a busy life with a new job, I finally had some time to do a few things I have been meaning to do for some time. I have always wrestled with what I released – the hardware seems pretty solid, but I never liked the code all that much, and the LCD display was actually added in version 1.1 – the original version only was for creating a computer interface for the TS-520. So, when I added the display I used what I had on hand – a 2×20 line LCD. It works, but lacks character. Actually, it displays characters just fine…

This past weekend I had some time to do several things – clean up the code so it’s more readable/serviceable, fork the code to a version with a MAX 7219 based LED display instead of the LCD display – more true to the original DG-5. I also added some averaging/smoothing code to help with display jitter (switching between 2 least significant digits), added correction factor if needed – more on that below, changed the gate timing so hopefully it is more accurate for most folks (again, see below).

But the real reason I got in there and cleaned things up is I am planing on interfacing some IN-12B type Nixie tubes. The original DG-5 was LED based, sure, but it at the time that LED’s were just supplanting Nixie tubes, so a Nixie display would be “right”, and totally cool and retro (just like the TS-520)! However, just about EVERYTHING out there running Nixie’s today is a clock, there is little beyond time keeping in the Nixie world today. I ordered 2 Nixie clocks to see what I can do to convert/adapt the hardware and software to a frequency display.

I have one of the clocks up and running, an it’s gorgeous. It’s from John Taylor’s shop Tayloredge in San Diego, he has IN-12B nixies on a I2C PCB – perfect for interfacing to a micro-controller! I have another, Arduino based Nixie clock on order and I’ll see about what way I want to go with this. If others are interested in a Nixie based DG-5, let me know.

Couple of observations after spending the weekend hacking. I built a DG-5 board to do testing on, and for initial tests I used a Arduino UNO clone at first, and wow, a ceramic resonator as a clock is TERRIBLE for a frequency counter project! Which is why I tell folks to get an Arduino Duemilanove – they use a real crystal. I observed a 3k dial error, and 1.8k of drift as it warmed up! The Duemilanove uses a +/-100 ppm crystal (as far as I can tell), which is still not all that great, but it works satisfactorily in this application. +/- 10ppm crystals that will fit on the Duemilanove are only $0.49 from Mouser – I might grab some next order and see about upgrading a Duemilanove – that should be way more than enough accuracy/stability for this application.

Anyway, I’ll post the code in a day or two – I managed to use the existing LCD headers to connect the LED display, pictures to come.

Edit – Video of the new code in action on the Max based LED display:

Edit – here are the new Arduino INO files. The new code has the improvements listed above, even on the LCD version that many folks have. Please load it on to your DG5 emulator and let me know what you think. Hoping to get the Nixie version done sometime soon!

LCD Version 1.6.2

LED Version 1.6.2

Steve
KV6O

DG5 Emulator PCB stock getting low (and Happy New Year!)

As of 12/31/15 (just 2.5 hours before 2016 in fact) there are 8 boards left in stock. Sometimes it takes me a few days to get to shipping, but with family/work I can’t always be as quick to get them out as I’d like to. Thanks for the continued e-mails and posts about your projects, glad to hear about folks building and using the boards. Happy New Year!

Steve
KV6O

New run of DG5 Emulator PCB’s has arrived!

I received a new batch of the DG5 emulator boards this morning, made by the same US manufacturer. I also was able to lower the price from $10 to $8. To order a board, please go to the project page – http://www.kv6o.com/wordpress/projects/kenwood-dg5-emulator/ and read thru the project to see what you’re getting yourself into! There is a PayPal “Buy Now” button at the end of the project description that will take you to the PayPal site for order processing.

Thank you everyone for your continued interest!

Steve
KV6O

New order of PCB’s for the DG5 emulator has been placed

Based on the feedback and e-mails requesting a DG5 emulator board, I placed an order for another run of PC boards – should ship on the 11th from the PCB house here in the US. I’ll post here when the new boards arrive and are ready for shipment, and I’ll do my best to individually e-mail those who have written me over the past few months.

Thanks for your continued interest!

Steve
KV6O