Sunday, April 23, 2017

A New Line of Transceivers ~ DifX

Transceiver Architecture 2.07

So How to Get the Display To Read Right!

4-26-2017 Update

Thanks to Addi dc0dw , here is a link that explains about interrupts. This actually makes sense. LINK

There is a caution here in that the 328 (internal structure and wiring) is different from the 2560 and that is why I was having problems. But a really good treatise on interrupts.

Pete N6QW

4-25-2017 Update

Get Your Heart Racing! --Here are some screen shots of the DifX Dual Conversion display. When you shift from USB to LSB the Display changes by 3 kHz.

The current processor is an Uno or Nano but because of the pin limitations I can only support 7 bands. I have loaded the code on a Mega 2560 and am able to have 15 bands.

But I am asking for some help with the Mega 2560. While I can get the bands to change and USB/LSB to change and the TUNE function and S Meter to work. The Encoder is Dead In The Water. Evidently there is a different code set to make the Mega recognize the Interrupt on Pins 2 & 3. There is some goofy function called attachInterrupt --well I tried the sample code and it just stares at me or nothing happens. So if any kind soul knows how to get the interrupt function to work with digital Pins 2 & 3 so that I can tune the encoder --please let me know.
Pete N6QW

I have very much admired Ten Tec and the products they built. Sadly I am not so sure about the future of that company given the number of recent owners and the state of the technology coming from offshore. I have a Ten Tec Triton Model 544 and always thought it one of their best rigs. Some will argue with me about later rigs and how much better crystal mixing was/is over a synthesized rig. But the fact remains they did build some great gear.
One anomaly I found in some Ten Tec designs (I think was the Corsair series), where the display would read very properly on the normal emissions for the ham bands id est [that is Latin for i. e.] LSB on 40 Meters but if you switched to Opposite (Ten Tec didn't use LSB or USB but Normal or Opposite), the display would not show the correct frequency. In the Ten Tec documentation there was a small obscure note to this effect.
In my DifX designs I have paid particular attention to this issue in my Arduino Code. I always place the LO above the incoming frequency and there is math in the code that for the display what is read is the LO - BFO. So If I switch from LSB to USB on 40 Meters (say 7.2 MHz), and since there is a sideband inversion taking place, the higher BFO frequency is used for USB. Thus the display while reading the true transmit frequency will now display a lower frequency on the LCD. When you shift back to LSB, the lower BFO frequency is used and so now the LCD will read higher. So I do have to move the encoder to 7.2 MHz when shifting from LSB to USB but the true transmit frequency is always displayed.
Some would like it so that in switching from USB to LSB you would not have to move the dial --and that is just more code. So I  move the dial and not add the code. But what ever the display and whatever the mode when I read the LCD --that is the true transmit frequency.
I addressed this problem in the KWM-4 by using an LO that changed based on the mode. The 1st conversion frequency was 10.7 MHz. Because I simply shifted channels for USB/LSB such that the difference of the LO and incoming would not be 10.7 MHz but either slightly higher or slightly lower than 10.7 MHz and this would easily pass through the roofing filter. The slight difference was then the nominal +/- 1.5 kHz. So then the BFO selected for the Mode would make up that difference. Thus 7.2 MHz for either USB or LSB would read correctly on the LCD and that was the transmitted frequency.
In Dual Conversion designs the true reading of the display becomes more complex because of the multiple conversions and the Dual Conversion DifX is no exception. Lets us look at what might be required to get the display to read correctly. We will use 40 Meters as the example.
The 1st IF is at 45 MHz and thus for 7.2 MHz the LO injection would be 52.2 MHz --thus all incoming signals are subtracted from the LO and converted to 45 MHz and in the case of the 2nd mixer which is operating at a fixed frequency of 56.5 MHz the second conversion is to 11.5 Mhz. There is no sideband inversion (we did it twice) and thus to receive LSB our BFO must operate at 11.5015 MHz. So now the problem of how to get the display to read 7.2 MHz LSB. Let us not forget if we shift to USB the BFO is operating at 11.49985 MHz and again how do we insure that the LCD and transmitted frequency is in fact 7.2 MHz USB.

In earlier display designs (1970/80's) there were summing circuits that read the HFO (High Frequency Oscillator), BFO and VFO and the results were then displayed. The DFD-2 (from AADE) did exactly that process. We will do something similar in the DifX. My first encounter with this issue was in 2009 when I built the Tri-Band SSB transceiver that used the frequency scheme AND components from an HW-100. You can read about it here

In the description I speak about the summing circuits so that you combine the HFO, BFO and VFO so that the display reads correctly. The innovation from N6QW was to mix two of the components in an SBL-1 and then to use  tuned band pass filters so only the correct mix was used and then that was finally mixed with the VFO signal. Using an EI9GQ huff and puff stabilizer it was possible to shift the display depending on the sideband and thus what was displayed was the true transmit frequency. It was a lot more hardware but 8 years ago I was on frequency!
The lazy approach would be to simply display the LO - 45 MHz [Display = LO - 45 MHz] and that would get you close (within KHz) and so in shifting from LSB to USB the display would not change with the mode. But in either case you would be off the true transmit frequency--the 40 Meter SDR Police will have a field day with you -- keep in mind they get gnarly when you are 20 Hz off --imagine being off by kHz. So that is not a good solution -- but a start.
Now what if there were one more factor in the math that changed depending on the mode. In case you got lost in the last paragraph we are up-converting the incoming signal to 45 MHz and thus to get the actual signal value we subtract 45 MHz. So now if we rewrite the equation to say the following to account for the  total of 3 KHz in the shift in the spread then we would have Display = LO - 45000000 + Offset. Now we can sign the offset as +/- depending on the mode. So if we were on LSB the Offset would be one value and for USB the Offset would be another. The display would now change by a total of 3 KHz depending on the mode. The second conversion frequencies can be simply ignored as all that is doing is getting the signal to the IF frequency. This is not unlike our single conversion code. Yes you will have to reset the dial when shifting USB/LSB but you will be displaying the correct transmit frequency.

In the next installment I will detail how I did it and the math involved. Maybe if I am lucky I will have code I can share. But the bottom line is that when shifting mode (USB/LSB) the display must account for the BFO shift and display the true transmit frequency. In the old analog VFO days many manufacturers fudged this problem by putting two (yes two) scribe lines on the dial window. One you used for USB and the other for LSB. Amazing solution --like using a rusty spoon to do brain surgery.

Pete N6QW