Topics

#uBITX Firmware KD8CEC - IF-Shift etc. #ubitx

Tim Gorman
 

I think we finally have everything defined correctly. You and I agree.

The design of this radio is impressive. I've had several home built receivers where switching between usb and lsb involved changing the if frequency to move from one side of the filter to the other. Since most simple filters are asymmetric (the slope on the high side and the low side are not the same, the two never sounded quite the same going from usb to lsb.

This design seems to eliminate this problem in the if chain so the bfo remains constant and the filter response is the same on both usb and lsb.

Nice.

tim ab0wr

Tim Gorman
 

Jerry,

Diddling with the BFO to make it a clarifier is not good. I agree it is a bad idea today. It worked back in the 50's and 60's because there wasn't much of any other choice and the filters weren't as sharp as they are today. It's why on the old RME 4350 it was always recommended to reset the bfo dial to zero. If you didn't your transmitted frequency wouldn't necessarily jive with your received frequency. Of course back then, a 1kc resolution was considered good and most people had separate receivers and transmitters so it didn't matter as much.

If you want a true clarifier it should be done with the vfo frequency and the offset from the transmitted carrier frequency should be indicated somewhere on the display.

Based on the message Allard left earlier, he *did* implement a true PBT by adjusting the vfo and the bfo so the suppressed carrier frequency is not changed but the relationship to the SSB filter changes. Again, it just goes to show how advanced this little rig actually is!

Jerry Gaffke
 

OK, here's some C code that should correctly keep our signal of interest centered
in both the 45mhz and 12mhz crystal filters, avoiding Gerald's problem of USB
sounding different than LSB.  This was a thread about Gerald's problem, right?

The variable pbt stands for PassBandTuning, and allows the user to 
adjust how far from the 12mhz filter the BFO will be, as discussed in the last
dozen or so posts.  

######################################################
// Initialized to typical values, can be configured by the user
uint32_t  f45c  = 44995000;     // center of 45mhz filter
uint32_t  f12c  = 11998000;     // center of 12mhz filter
uint32_t  pbt   =     1500;     // bfo is 1500 hz below f12c
char      isUSB = 0;
 
// Compute these values:
uint32_t  bfo, clk1, vfo;
 
// ftune is the freq in hz we want the rig tuned to
void do_tune(uint32_t ftune) {
  bfo = f12c - pbt;
  if (isUSB)  {
    // For USB, ftune = vfo-(clk1-bfo)
    clk1 = f45c + f12c;
    vfo =  ftune + (clk1-bfo);
  } else {
    // For LSB, ftune = vfo-(clk1+bfo)
    clk1 = f45c - f12c;
    vfo =  ftune + (clk1+bfo);
  }
}
#######################################

Jerry, KE7ER

Ian Lee
 

Jerry and all

Now I sit at my desk and have seen many opinions.
I have not read all of them in too many emails, but I am so happy to have reached a good conclusion.
I do not know if it's too late, but I'll tell you when I first implement the 'IF-Shift' feature for uBITX.
As you may have guessed someone who viewed my source, the source for implementing Filter is not all of the sources I wrote above. 
(I am sorry if you confused this with this.)

I have a friend who has a lot of great ideas. The friend told me to shift the IF passband to remove the ambient noise.
And when I saw the circuit, I had to decide. 
As you all know, uBITX has twice frequency mixing.
It is using CLK # 2 and CLK # 1.

CLK # 2 generates a reference frequency for passing the desired frequency through a filter composed of 45Mhz crystals.
CLK # 1 generates a reference frequency for passing a filter composed of 12Mhz crystals.

My simple idea is that the frequency control source created by jerry is very good and did not need to be modified much.
Of course, CLOCK0 also makes the code look like it passes through the filter as shown below.
I had to choose one of them to reduce ambient noise. and  decided to use a part made of 12Mhz crystals that look sharper.
So I wrote the above code. 

si5351bx_setfreq(0, usbCarrier + (isIFShift ? ifShiftValue : 0)); <-- This code is in the stopTX, Init parts for rx start.

Yes, this is to shift the BFO.

I thought about configuring it in the following form. In this case, we did not have to worry about CLK0 throughout the code.
      si5351bx_setfreq(2, SECOND_OSC_USB - usbCarrier + f  + (isIFShift ? ifShiftValue : 0));
      si5351bx_setfreq(1, SECOND_OSC_USB + (isIFShift ? ifShiftValue : 0) );


Or, I thought about processing options as below.
(The code may be incorrect. Please consider it as a pseudo-code that you wrote during the writing of the mail now.)
      si5351bx_setfreq(2, SECOND_OSC_USB - usbCarrier + f  + (isIF1Shift ? if1ShiftValue : 0) + (isIF2Shift ? if2ShiftValue : 0));
      si5351bx_setfreq(1, SECOND_OSC_USB + (isIF1Shift ? if1ShiftValue : 0) );

Code in other parts
si5351bx_setfreq(0, usbCarrier + (isIF2Shift ? if2ShiftValue : 0)); <-- This code is in the stopTX, Init parts for rx start.

I wanted to give the user a tip to get rid of ambient noise for a while. It was a short coding and in fact many tests were not done.
By your opinion, this feature will be more advanced.


In addition.(The bottom part is my guess, so it may be wrong. I was hesitant to write this because it was still an experiment. )
I think BFO Calibration is done by all users. This is because uBITX can not be used if BFO calibration is not performed.
However, there is no calibration for 45Mhz. I thought maybe modifying the part that is constant might improve the reception ratio a little more.

After implementing IF-Shift, I made several measurements through the Vector Network Analyzer. And we are doing simulation.

If I continue to improve uBITX, I will share experimental results later.
Thanks to Jerry's code, I was able to easily implement the functions I think very easily.
Thank you for sharing this great code.

Ian KD8CEC





2018-03-12 7:59 GMT+09:00 Tim Gorman <tgorman2@...>:

Jerry,

Diddling with the BFO to make it a clarifier is not good. I agree it is a bad idea today. It worked back in the 50's and 60's because there wasn't much of any other choice and the filters weren't as sharp as they are today. It's why on the old RME 4350 it was always recommended to reset the bfo dial to zero. If you didn't your transmitted frequency wouldn't necessarily jive with your received frequency. Of course back then, a 1kc resolution was considered good and most people had separate receivers and transmitters so it didn't matter as much.

If you want a true clarifier it should be done with the vfo frequency and the offset from the transmitted carrier frequency should be indicated somewhere on the display.

Based on the message Allard left earlier, he *did* implement a true PBT by adjusting the vfo and the bfo so the suppressed carrier frequency is not changed but the relationship to the SSB filter changes. Again, it just goes to show how advanced this little rig actually is!






--
Best 73
KD8CEC / Ph.D ian lee
kd8cec@...
www.hamskey.com (my blog)

Ian Lee
 

Jerry
Thanks  for good code sharing.
If you apply your code, can apply USB and LSB together with the same settings.

Ian KD8CEC

2018-03-12 9:39 GMT+09:00 Jerry Gaffke via Groups.Io <jgaffke@...>:

OK, here's some C code that should correctly keep our signal of interest centered
in both the 45mhz and 12mhz crystal filters, avoiding Gerald's problem of USB
sounding different than LSB.  This was a thread about Gerald's problem, right?

The variable pbt stands for PassBandTuning, and allows the user to 
adjust how far from the 12mhz filter the BFO will be, as discussed in the last
dozen or so posts.  

######################################################
// Initialized to typical values, can be configured by the user
uint32_t  f45c  = 44995000;     // center of 45mhz filter
uint32_t  f12c  = 11998000;     // center of 12mhz filter
uint32_t  pbt   =     1500;     // bfo is 1500 hz below f12c
char      isUSB = 0;
 
// Compute these values:
uint32_t  bfo, clk1, vfo;
 
// ftune is the freq in hz we want the rig tuned to
void do_tune(uint32_t ftune) {
  bfo = f12c - pbt;
  if (isUSB)  {
    // For USB, ftune = vfo-(clk1-bfo)
    clk1 = f45c + f12c;
    vfo =  ftune + (clk1-bfo);
  } else {
    // For LSB, ftune = vfo-(clk1+bfo)
    clk1 = f45c - f12c;
    vfo =  ftune + (clk1+bfo);
  }
}
#######################################

Jerry, KE7ER



--
Best 73
KD8CEC / Ph.D ian lee
kd8cec@...
www.hamskey.com (my blog)

Jerry Gaffke
 

Ian,

When transmitting, we probably just set the BFO such that our transmitted voice sounds OK and leave it be.
Most of us will use exactly that same IF-Shift (or PassBandTuning, same thing) for all of our receiving too.

There are several reasons we might want to shift the BFO frequency when receiving: 

1)  Receiving a signal with a naturally high pitched voice, we will recover more of the vocal sounds
if the BFO is further from the filter.  (Closer if it's a low pitched voice)

2)  There might be a carrier near our operating frequency, moving the BFO one way or the other 
might move the offending carrier down the skirt of the filter so it's less objectionable.
Perhaps this is what your friend meant by "shift the IF passband to remove the ambient noise"

3)  We might want to zero-beat an AM carrier (such as from WWV at 10.0mhz) when calibrating the rig.
In this case we want the BFO in the middle of the filter passband.

Whenever we shift the BFO while receiving a signal, we also want to shift the VFO
so that we remain tuned exactly to the suppressed carrier of the incoming signal.
The code I presented takes care of that, adjusting the value of pbt will move 
both the VFO and BFO.

Otherwise, I don't think it makes sense to shift anything around once the rig is calibrated.
The user should somehow find a best setting for f12c and f45c (the center frequency
of the passband for the 12mhz and 45mhz filters), perhaps by just adjusting them for best sound
while receiving.  Alternately, sweep the filters with a sweeperino or tracking spectrum analyzer to find
the middle of the passband.  Set these values once, and forget about it.  

 
Here's an easy and accurate way to calibrate the rig using the C code I provided today:

Set pbt=0, so the BFO is in the middle of the 12mhz passband and we can hear the carrier when tuned to an AM station.
Call do_tune(10000000) to tune in WWV at 10.0 mhz.
This could be any AM broadcast station of known frequency.
If calibration is way off, you may not even hear the station.
Then do this:
while (not-zero-beat)  {
    adjust the value of si5351x_vco using the encoder
    do_tune(10000000)
}
When zero-beat is achieved, save si5351bx_vco to EEPROM
so we can power up fully calibrated next time.
This procedure should fully calibrate clk0, clk1 and clk2, to within a fraction of a hz.
Primary source of errors will be temperature changes causing the 25mhz reference oscillator on the si5351 to drift.


Here's an old post describing this method of calibration:
    https://groups.io/g/BITX20/message/35235
 
Also this post regarding shortcomings in how the original uBitx calibration code works.
    https://groups.io/g/BITX20/message/37973


Jerry, KE7ER



On Sun, Mar 11, 2018 at 05:42 pm, Ian Lee wrote:

The friend told me to shift the IF passband to remove the ambient noise.

Jerry Gaffke
 

Ian,

I assume that do_tune() routine will have the following calls at the end:

    si5351bx_setfreq(0, bfo);
    si5351bx_setfreq(1, clk1);
    si5351bx_setfreq(2, vfo);

The values for bfo, clk1, vfo do not change during the calibration procedure.
But we must make those three calls each time si5351bx_vco is changed
while searching for zero-beat of our BFO with the AM station's carrier.
 
Jerry

    


On Sun, Mar 11, 2018 at 08:08 pm, Jerry Gaffke wrote:
while (not-zero-beat)  {
    adjust the value of si5351x_vco using the encoder
    do_tune(10000000)
}

Guy N7BIR <sgbridge@...>
 

Ian, you made the statement “The uBitX cannot be used if the BFO calibration has not been performed”. So if the calibration hasn’t been done how will the radio perform?  Reason I ask is I completely lost my transmit. Receive works great. The finals are in good shape. Would not doing the BFO calibration have any effect on transmit? Thanks,

Guy N7BIR 

Michael Shreeve
 

Do you have a receiver on which you can listen for a weak signal from your uBITX ? 

On Sun, Mar 11, 2018 at 8:43 PM, Guy N7BIR <sgbridge@...> wrote:
Ian, you made the statement “The uBitX cannot be used if the BFO calibration has not been performed”. So if the calibration hasn’t been done how will the radio perform?  Reason I ask is I completely lost my transmit. Receive works great. The finals are in good shape. Would not doing the BFO calibration have any effect on transmit? Thanks,

Guy N7BIR 




--
Michael Shreeve N6GRG

Jerry Gaffke
 

If receive works great then you don't have a calibration issue.

Have you tried transmitting CW?
If CW works, it means the problem lies somewhere between the microphone and the first mixer at D1,D2
If CW does not work (and receive does) then the problem lies between the first mixer and the antenna jack.

Have you tried other bands?  Could be a bad band switch relay.

Jerry


On Sun, Mar 11, 2018 at 08:43 pm, Guy N7BIR wrote:
Ian, you made the statement “The uBitX cannot be used if the BFO calibration has not been performed”. So if the calibration hasn’t been done how will the radio perform?  Reason I ask is I completely lost my transmit. Receive works great. The finals are in good shape. Would not doing the BFO calibration have any effect on transmit? Thanks,

Ian Lee
 

Jerry.

Thanks for your kind comments and great code sharing.
Your code will provide a better communication environment for uBITX users.
Today I installed an antenna outside my window in my lab to experiment with this.
As time goes by, we will test it to make the firmware even better.

Thank you.

Ian KD8CEC





2018-03-12 12:20 GMT+09:00 Jerry Gaffke via Groups.Io <jgaffke@...>:

Ian,

I assume that do_tune() routine will have the following calls at the end:

    si5351bx_setfreq(0, bfo);
    si5351bx_setfreq(1, clk1);
    si5351bx_setfreq(2, vfo);

The values for bfo, clk1, vfo do not change during the calibration procedure.
But we must make those three calls each time si5351bx_vco is changed
while searching for zero-beat of our BFO with the AM station's carrier.
 
Jerry

    

On Sun, Mar 11, 2018 at 08:08 pm, Jerry Gaffke wrote:
while (not-zero-beat)  {
    adjust the value of si5351x_vco using the encoder
    do_tune(10000000)
}



--
Best 73
KD8CEC / Ph.D ian lee
kd8cec@...
www.hamskey.com (my blog)

Ian Lee
 

Guy.

here is a problem with my word selection. 
If your device is receiving normally, you can use it as it is.
For the original source, the default BFO is 11997000. (This is the value when there is no setting value.)

Ian KD8CEC


2018-03-12 12:43 GMT+09:00 Guy N7BIR <sgbridge@...>:

Ian, you made the statement “The uBitX cannot be used if the BFO calibration has not been performed”. So if the calibration hasn’t been done how will the radio perform?  Reason I ask is I completely lost my transmit. Receive works great. The finals are in good shape. Would not doing the BFO calibration have any effect on transmit? Thanks,

Guy N7BIR 



--
Best 73
KD8CEC / Ph.D ian lee
kd8cec@...
www.hamskey.com (my blog)

matjaz
 

Hello Ian
On cw mode need very precise setting frequency.
 
73 Matjaz
S56ZVD
 

From: Ian Lee
Sent: Monday, March 12, 2018 6:09 AM
Subject: Re: [BITX20] #uBITX Firmware KD8CEC - IF-Shift etc.
 
Guy.
 
here is a problem with my word selection.
If your device is receiving normally, you can use it as it is.
For the original source, the default BFO is 11997000. (This is the value when there is no setting value.)
 
Ian KD8CEC
 
 
2018-03-12 12:43 GMT+09:00 Guy N7BIR <sgbridge@...>:
Ian, you made the statement “The uBitX cannot be used if the BFO calibration has not been performed”. So if the calibration hasn’t been done how will the radio perform?  Reason I ask is I completely lost my transmit. Receive works great. The finals are in good shape. Would not doing the BFO calibration have any effect on transmit? Thanks,

Guy N7BIR 
 

--
Best 73
KD8CEC / Ph.D ian lee
kd8cec@...
www.hamskey.com (my blog)

Ian Lee
 

Matjaz

Thanks for feedback
Press and hold the function key. 
The following message will be output.
'Set tune step?'
(If you press it too long, Dial is locked - messae output 'Dial Lock On'.
Do not worry, if you press again for a long time, the dial lock will be released.)

Then release the function key.
Dial to select the desired step and press the function key.

If you want other steps, you can set it in uBITX Manager.
In uBITX Manager, you can put the steps you want.
In the outdoors, pressing and holding the Function key on the uBITX will allow you to select the steps you have designed.
When uBITX Manager is used, connect it to the computer only once. You do not need a computer connection after that.

If you have other features or improvements, please email me anytime.

Ian KD8CEC










2018-03-12 19:39 GMT+09:00 matjaz via Groups.Io <matjaz_zejn@...>:

Hello Ian
On cw mode need very precise setting frequency.
 
73 Matjaz
S56ZVD
 
From: Ian Lee
Sent: Monday, March 12, 2018 6:09 AM
Subject: Re: [BITX20] #uBITX Firmware KD8CEC - IF-Shift etc.
 
Guy.
 
here is a problem with my word selection.
If your device is receiving normally, you can use it as it is.
For the original source, the default BFO is 11997000. (This is the value when there is no setting value.)
 
Ian KD8CEC
 
 
2018-03-12 12:43 GMT+09:00 Guy N7BIR <sgbridge@...>:
Ian, you made the statement “The uBitX cannot be used if the BFO calibration has not been performed”. So if the calibration hasn’t been done how will the radio perform?  Reason I ask is I completely lost my transmit. Receive works great. The finals are in good shape. Would not doing the BFO calibration have any effect on transmit? Thanks,

Guy N7BIR 
 

--
Best 73
KD8CEC / Ph.D ian lee
kd8cec@...
www.hamskey.com (my blog)



--
Best 73
KD8CEC / Ph.D ian lee
kd8cec@...
www.hamskey.com (my blog)

matjaz
 

Tnx Ian,
for very fast answer
all working.
best regards from Slovenia
 
Matjaz S56ZVD
 

From: Ian Lee
Sent: Monday, March 12, 2018 12:04 PM
Subject: Re: [BITX20] #uBITX Firmware KD8CEC - IF-Shift etc.
 
Matjaz

Thanks for feedback
Press and hold the function key.
The following message will be output.
'Set tune step?'
(If you press it too long, Dial is locked - messae output 'Dial Lock On'.
Do not worry, if you press again for a long time, the dial lock will be released.)
 
Then release the function key.
Dial to select the desired step and press the function key.

If you want other steps, you can set it in uBITX Manager.
In uBITX Manager, you can put the steps you want.
In the outdoors, pressing and holding the Function key on the uBITX will allow you to select the steps you have designed.
When uBITX Manager is used, connect it to the computer only once. You do not need a computer connection after that.

If you have other features or improvements, please email me anytime.

Ian KD8CEC









 
2018-03-12 19:39 GMT+09:00 matjaz via Groups.Io <matjaz_zejn@...>:
Hello Ian
On cw mode need very precise setting frequency.
 
73 Matjaz
S56ZVD
 
From: Ian Lee
Sent: Monday, March 12, 2018 6:09 AM
Subject: Re: [BITX20] #uBITX Firmware KD8CEC - IF-Shift etc.
 
Guy.
 
here is a problem with my word selection.
If your device is receiving normally, you can use it as it is.
For the original source, the default BFO is 11997000. (This is the value when there is no setting value.)
 
Ian KD8CEC
 
 
2018-03-12 12:43 GMT+09:00 Guy N7BIR <sgbridge@...>:
Ian, you made the statement “The uBitX cannot be used if the BFO calibration has not been performed”. So if the calibration hasn’t been done how will the radio perform?  Reason I ask is I completely lost my transmit. Receive works great. The finals are in good shape. Would not doing the BFO calibration have any effect on transmit? Thanks,

Guy N7BIR 
 

--
Best 73
KD8CEC / Ph.D ian lee
kd8cec@...
www.hamskey.com (my blog)
 

--
Best 73
KD8CEC / Ph.D ian lee
kd8cec@...
www.hamskey.com (my blog)

Guy N7BIR <sgbridge@...>
 

Jerry, Michael- Thanks for the feedback. I’m not getting any RF readings using either SSB or CW. Will also try checking the other bands. Was really strange. The radio worked fine since I received it in January. Then I turn it on and no RF. Nothing else had changed. 
Will try your suggestions. 
Thanks again,
 Guy N7BIR 
,

Jerry Gaffke
 

Curious.
Was it plugged into an antenna?
If so, an electrical storm, or QRO ops on a nearby antenna could have blown Q90.
Happened often enough on the Bitx40, but I don't recall any reports of this on the uBitx.

With PTT pressed, do you see 12v on the TX rail?

With PTT pressed, Q90-emitter should be above ground, and Q90-base another 0.6v higher.
You can check this with a DVM, using DC volts.

If Q90 looks ok, could look at Q911,Q912, Q92,Q93,Q96,Q97 in a similar manner.

And as Michael suggested, use a nearby receiver while attempting to transmit CW, 
see if you can hear that CW signal.   

How do you know the finals are OK?  
Measure the current into PA-PWR, should be around 200 ma if all is well.

Check the toroids from Q90 on for broken wires, shorts, bad solder jobs.

Maybe put a 50 ohm resistor across pins 5 and 2 of T11 as a dummy load prior to the
relays and LPF's.  If that resistor gets hot (will smoke if under a Watt or two)
that means you have trouble in the relays or LPF's or antenna connector and beyond.

Keep the power supply at 12v or so while testing.
Fuse it at 2 or 3 amps unless feeling brave, especially while prodding around in there.

Jerry



On Mon, Mar 12, 2018 at 02:01 pm, Guy N7BIR wrote:
Jerry, Michael- Thanks for the feedback. I’m not getting any RF readings using either SSB or CW. Will also try checking the other bands. Was really strange. The radio worked fine since I received it in January. Then I turn it on and no RF. Nothing else had changed. 
Will try your suggestions. 
Thanks again,
 Guy N7BIR 
,

Guy N7BIR <sgbridge@...>
 

Thanks for the clarification Ian. Now if I can just get it to transmit again !

Regards,
Guy N7BIR 

Guy N7BIR <sgbridge@...>
 

Thanks for all the suggestions Jerry. That should keep me busy for awhile and hopefully a solution will come out of it. Will keep you posted. 
Kind Regards,
Guy N7BIR  

Guy N7BIR <sgbridge@...>
 

Jerry, 
Following your suggestions I started running some tests on my uBitX. 
You asked whether it was plugged into an antenna. Funny you should ask that because I had just plugged it into a brand new 40 meter monoGap; just enough to check SWR....no reading. 
I am showing 12 volts in transmit coming off the K1 relay. 
I checked Q90 and got 0 volts on both the base and emitter in transmit. 
Cant pick up my signal in a nearby receiver  in either SSB or CW. Toroids are all good. 
So at the very least I think i’ll be replacing Q90. 
73,
Guy