Topics

calibrate v4 ubitx

John Malone
 

All
I have a 50mh signal source, can I use it to calibrate the v4 ubitx board?

Thanks
John
KD0MOA

Jerry Gaffke
 

You could use a 50mhz reference, but you would have to hack the Raduino code a bit.
Something like this should work, as per post    https://groups.io/g/BITX20/message/35235

In my own Raduino code, I adjust si5351bx_vcoa directly, and save it to EEPROM when done.
But am following the convention set by the uBitx stock code with a call to si5351_setcalibration()
The functions enc_read() and btnDown() are also from the stock uBitx code. 

If the calibration found in EEPROM at power up is beyond perhaps +/- 1000 ppm 
at 875mhz (so a number bigger than 875000 or less than -875000),
it should be ignored and a calibration value of 0 assumed.

With the code as presented, we are adjusting the 25mhz reference oscillator to the si5351
by a factor of 10 Hertz out of  875mhz with each encoder tick, a factor of 11.4 ppb.
That will be slow going.
Increasing that to 100 Hz might be more practical.
It's possible that no tone will be heard at the start, but moving the encoder one way or the other
should eventually find it.

This line of code:
    unsigned long clk1 = clk0 + 44995000;      //  clk0 + the center of the 45mhz crystal filter
could be changed to 
    unsigned long clk1 = clk0 + 44995000 + beatnote;  
where beatnote is an audio tone of perhaps 500  in Hz.
Then use a frequency counter on the speaker leads to measure the resultant audio tone,
twiddle the encoder till the frequency counter reads exactly that 500 hz.
With this change, you no longer need to find true zero beat, as zero Hz may be hard to find
given the capacitive coupling through the audio amp.


// Takes one arg, the frequency standard in Hz that we have available
// Could be a station off the air, could be a fancy rubidium standard
// If that frequency is over 30mhz (and less than 64mhz),  
// then should be injected into T2 pin 1 directly, bypassing the 30mhz LPF at L1,2,3,4
// Use the encoder to adjust the VFO until zero beat is heard
// We place the BFO in the center of the 12mhz filter passband so zero beat is easily heard.
// Save the value of "calibration" that has been found to eeprom.
// This calibrates all three oscillators from the si5351 in one go, and does so with great accuracy.
// The LCD display shows the assumed frequency of vcoa, nominally 875mhz.
// Untested and may be a bug or two (though I use something similar on my raduino).

void calibrateExample(unsigned long freqref) {
    short calibration = 0;
    unsigned long clk0 = 11998000;                 //  BFO at center of 12mhz crystal filter in hz
    unsigned long clk1 = clk0 + 44995000;      //  clk0 + the center of the 45mhz crystal filter
    unsigned long clk2 = freqref + 44995000;  //  A high side VFO
    while (! btnDown() )   {                                // Press the button when zero beat is acheived
        calibration = calibrtion + 10*enc_read();      // Rotate encoder for zero beat
        lcd.setCursor(0,0);    lcd.print(875000000 + calibration); lcd.print("  ");
        si5351_setcalibration(calibration);
        si5351bx_setfreq(0, clk0);
        si5351bx_setfreq(1, clk1);
        si5351bx_setfreq(2, clk2); 
    }
}



On Thu, Jul 19, 2018 at 02:32 PM, John Malone wrote:

I have a 50mh signal source, can I use it to calibrate the v4 ubitx board?

Jerry Gaffke
 

I zero-beat.
This beatnote thing wasn't well thought out, you want to move the BFO too,
far enough to avoid hearing the opposite sideband.
Left as an exercise for the reader.



On Thu, Jul 19, 2018 at 04:31 PM, Jerry Gaffke wrote:
This line of code:
    unsigned long clk1 = clk0 + 44995000;      //  clk0 + the center of the 45mhz crystal filter
could be changed to 
    unsigned long clk1 = clk0 + 44995000 + beatnote;  
where beatnote is an audio tone of perhaps 500  in Hz.
Then use a frequency counter on the speaker leads to measure the resultant audio tone,
twiddle the encoder till the frequency counter reads exactly that 500 hz.
With this change, you no longer need to find true zero beat, as zero Hz may be hard to find
given the capacitive coupling through the audio amp.

 

Jerry,

I agree that calibration is a 'exercise', why does it need to be this hard. I'm no coder, but Don ND6T's calibration routine worked really good for me when I was calibrating my Bitx 60, http://www.nd6t.com/bitx/Calibration.htm  All we need to know is what our actual 25Mhz crystal frequency is and change that line in the sketch, then all we need to adjust is the BFO frequency which is easy when the rig is on frequency. I don't know how to code so I'm not sure what is involved in adding something like this to the existing sketch but it sure beats zero beating.

Joel
N6ALT

Jim Sheldon
 

I believe most of them use TORX (also known as Star or Spline ) screwheads.  Probably T-8 or T-10 size if I remember right.

Jim - W0EB

------ Original Message ------
From: "Joel Caulkins" <caulktel@...>
Sent: 7/20/2018 9:11:56 AM
Subject: Re: [BITX20] calibrate v4 ubitx

Jerry,

I agree that calibration is a 'exercise', why does it need to be this hard. I'm no coder, but Don ND6T's calibration routine worked really good for me when I was calibrating my Bitx 60, http://www.nd6t.com/bitx/Calibration.htm  All we need to know is what our actual 25Mhz crystal frequency is and change that line in the sketch, then all we need to adjust is the BFO frequency which is easy when the rig is on frequency. I don't know how to code so I'm not sure what is involved in adding something like this to the existing sketch but it sure beats zero beating.

Joel
N6ALT

Jerry Gaffke
 

No, adjusting the BFO frequency is a bad idea.
That will change the audio characteristics on both transmit and receive.
And it will only "calibrate" the rig when operating at the frequency of the reference oscillator you happen to be using.

The si5351's reference oscillator is nominally 25mhz, but might be off by several ppm.
When using the si5351bx routines, the vco inside the si5351 is operating at a nominal frequency of 35*25mhz = 875 mhz.
The value of the variable si5351bx_vcoa has a nominal value of 875000000, what we want to do is adjust that value
until it is exactly equal to the true vco frequency.

So one way to do this is to measure the 25mhz oscillator of the si5351 reference,
perhaps using a separate well calibrated receiver instead of a frequency counter to avoid loading that crystal.
Let's call that value fxtal25mhz.
Then force si5351bx_vcoa to be equal to  35*fxtal25mhz.

Now the si5351bx routines use this new si5351bx_vcoa value when computing the output divider values
used to create clk0, clk1, and clk2.  All three should be dead on.

We need to calibrate all three clocks simultaneously, not just the BFO.
 
Was more complicated on the Bitx40, where we had a separate crystal oscillator for the BFO.
On the uBitx, we only have one reference oscillator.


An easy way to calibrate using a 50mhz reference might be to divide it by two using a flip-flop,
and calibrate using the resultant 25mhz signal using whatever calibration software is in
the firmware you are using.   I have not looked over the various firmware releases, but 
given some of the forum posts my impression is that is is not being done right.

Jerry, KE7ER


On Fri, Jul 20, 2018 at 07:11 AM, Joel Caulkins wrote:
I agree that calibration is a 'exercise', why does it need to be this hard. I'm no coder, but Don ND6T's calibration routine worked really good for me when I was calibrating my Bitx 60, http://www.nd6t.com/bitx/Calibration.htm  All we need to know is what our actual 25Mhz crystal frequency is and change that line in the sketch, then all we need to adjust is the BFO frequency which is easy when the rig is on frequency. I don't know how to code so I'm not sure what is involved in adding something like this to the existing sketch but it sure beats zero beating.

Jerry Gaffke
 

Don's method assumes you have an accurate frequency counter,
most uBitx users don't have one
There is no reason we can't calibrate this rig accurately using an off-the-air signal such as WWV
or an AM shortwave broadcast station.


On Fri, Jul 20, 2018 at 07:11 AM, Joel Caulkins wrote:
Don ND6T's calibration routine worked really good for me when I was calibrating my Bitx 60, http://www.nd6t.com/bitx/Calibration.htm

 

Jerry,

You are right, I did use my calibrated HP 5384A frequency counter to determine the crystal frequency. I had forgot that. I found calibrating the hardest part of building my last uBitx transceiver, it just seems like it should be easier, but what do I know, I'm strictly a hardware man. I'm all for using WWV when the bands are good enough to actually hear it.

Joel
N6ALT

Jim Sheldon
 

Jerry,
Regarding the BFO, after the master oscillator is calibrated to an accurate frequency, the BFO MUST be calibrated to the individual uBITX crystal filter as no two of them are exactly the same.  Such is the nature of filters built using bulk crystals, matched or not.  Matching them is never an exact science as I've been finding out here trying to match crystals to come up with an add-on, plug-in crystal filter using the headers supplied on a V4 board.  The BFO also cannot be adjusted to zero beat or you lose the ability of the filter to separate USB and LSB as well as CWU and CWL signals to give you what us ancient CW operators used to call "Single Signal" CW receive.  

So far I have not found an easy way to do this except trial and error "guesstimation".  I'm seriously hoping someone can come up with a really simple way to get this right.

Jim Sheldon, W0EB

------ Original Message ------
From: "Jerry Gaffke via Groups.Io" <jgaffke@...>
Sent: 7/20/2018 10:03:10 AM
Subject: Re: [BITX20] calibrate v4 ubitx

No, adjusting the BFO frequency is a bad idea.
That will change the audio characteristics on both transmit and receive.
And it will only "calibrate" the rig when operating at the frequency of the reference oscillator you happen to be using.

The si5351's reference oscillator is nominally 25mhz, but might be off by several ppm.
When using the si5351bx routines, the vco inside the si5351 is operating at a nominal frequency of 35*25mhz = 875 mhz.
The value of the variable si5351bx_vcoa has a nominal value of 875000000, what we want to do is adjust that value
until it is exactly equal to the true vco frequency.

So one way to do this is to measure the 25mhz oscillator of the si5351 reference,
perhaps using a separate well calibrated receiver instead of a frequency counter to avoid loading that crystal.
Let's call that value fxtal25mhz.
Then force si5351bx_vcoa to be equal to  35*fxtal25mhz.

Now the si5351bx routines use this new si5351bx_vcoa value when computing the output divider values
used to create clk0, clk1, and clk2.  All three should be dead on.

We need to calibrate all three clocks simultaneously, not just the BFO.
 
Was more complicated on the Bitx40, where we had a separate crystal oscillator for the BFO.
On the uBitx, we only have one reference oscillator.


An easy way to calibrate using a 50mhz reference might be to divide it by two using a flip-flop,
and calibrate using the resultant 25mhz signal using whatever calibration software is in
the firmware you are using.   I have not looked over the various firmware releases, but 
given some of the forum posts my impression is that is is not being done right.

Jerry, KE7ER


On Fri, Jul 20, 2018 at 07:11 AM, Joel Caulkins wrote:
I agree that calibration is a 'exercise', why does it need to be this hard. I'm no coder, but Don ND6T's calibration routine worked really good for me when I was calibrating my Bitx 60, http://www.nd6t.com/bitx/Calibration.htm  All we need to know is what our actual 25Mhz crystal frequency is and change that line in the sketch, then all we need to adjust is the BFO frequency which is easy when the rig is on frequency. I don't know how to code so I'm not sure what is involved in adding something like this to the existing sketch but it sure beats zero beating.

Arv Evans
 

As Jerry mentioned, you only have to set the Si5351a calibration once and it will be right on for all
three clk-n outputs.  It might have been easier if the software designers had included PC-interface
for the calibration process.  Since PCs have larger screens it would have been possible to include
more user-friendly prompts and guidance during the calibration process.  But of course this would
take up more space in the Arduino for required text lines, so maybe not enough space for that
level of friendliness.

In my own Raduino code I have included "Serial.begin(9600);" so that whenever needed I can now
include various Serial.Write, Serial.Print, and Serial.readBytes action whenever a PC interface is
needed or desirable.  It is not necessary to do the "if(Serial.available)" test because nothing of a
serial nature happens unless you use a serial interface command.  It is necessary to avoid any
blocking action that would stall progress unless the PC was actually connected.  
Once I have performed the PC involved actions I can then disconnect the USB cable and proceed
without the PC connection.

Arv
_._


On Fri, Jul 20, 2018 at 9:15 AM Joel Caulkins <caulktel@...> wrote:
Jerry,

You are right, I did use my calibrated HP 5384A frequency counter to determine the crystal frequency. I had forgot that. I found calibrating the hardest part of building my last uBitx transceiver, it just seems like it should be easier, but what do I know, I'm strictly a hardware man. I'm all for using WWV when the bands are good enough to actually hear it.

Joel
N6ALT

Don, ND6T
 

All, The 50 MHz oscillator can be divided by two, yielding a 25 MHz source that can be zero-beat calibrated in the uBITX if WWV is not receivable. A counter works best for me. Once calibrated I can listen to AM broadcast for long periods of time, right on advertised frequency. Changing sidebands sounds the same.
Jim, regarding the BFO: I use a white noise source modulating the transmitter while viewing the spectrum on a cheap SDR receiver or Spectrum Analyzer (I like the SDR best). You then adjust the BFO frequency for best band pass and sideband reduction. You can do it on the receive side with a stable signal generator but it takes longer. The visual spectrum is nicer, you can see the carrier, etc. Then you can check by switching sidebands to compare different frequencies and their comparative levels on receive. I built a 2-tone oscillator with noise generator into a candy tin with an audio amp and speaker. Holding the microphone over the speaker makes for a rapid test. Jacks are available for more accurate and cleaner testing but I find that I seldom use them since the speaker and such are quite adequate. -Don

Bill Cromwell
 

Hi Jim,

The easiest way I have found to set the BFO is to use something like the graphical display in fldigi or Spectran - I prefer spectran. Set the display to show the audio frequency as opposed to showing you the radio frequency. The waterfall or spectral displays of the background noise will show a 'shadow' of your "system" pass band and that will be largely determined by the xtal filter passband. Be sure to disable or bypass any audio filters. My passband with my uBitx is about 1900 Hz wide. I see a broad, mostly flat curve with a slope at either end. Changing the BFO up and down will move the slope up and down the frequency scale. I adjust the BFO so that the low frequency slope starts to roll off at about 300 Hz. Thereafter, tuning SSB and AM signals (using synchronous AM detection) gives me clear voices. Music is not going to be good through that filter no matter what we do with the BFO. The master oscillator (25 MHz) must be calibrated first.

I hope this helps.

73,

Bill KU8H

On 07/20/2018 11:32 AM, Jim Sheldon wrote:
Jerry,
Regarding the BFO, after the master oscillator is calibrated to an
accurate frequency, the BFO MUST be calibrated to the individual uBITX
crystal filter as no two of them are exactly the same. Such is the
nature of filters built using bulk crystals, matched or not. Matching
them is never an exact science as I've been finding out here trying to
match crystals to come up with an add-on, plug-in crystal filter using
the headers supplied on a V4 board. The BFO also cannot be adjusted to
zero beat or you lose the ability of the filter to separate USB and LSB
as well as CWU and CWL signals to give you what us ancient CW operators
used to call "Single Signal" CW receive.

So far I have not found an easy way to do this except trial and error
"guesstimation". I'm seriously hoping someone can come up with a really
simple way to get this right.

Jim Sheldon, W0EB
--
bark less - wag more

Jerry Gaffke
 

Yes, calibratoin should be easier.
Just needs appropriate firmware for the Raduino.
Should not require anything else.
No frequency counter.
No scope.
No host computer hooked up through the usb port.

Just tune the radio to an AM station such as WWV, enter the calibration routine,
turn the encoder knob till zero beat of the carrier is achieved, then hit PTT.
If you can't hear WWV, a shortwave broadcast station is almost always on an even 5khz frequency, within a few Hz.
The calibration accuracy will be proportional to the frequency of the station you calibrate to,
so WWV at 15mhz will give results 15 times more accurate than an AM broadcast station at 1mhz.

I haven't tried the various firmware releases, but from posts in the forum it seems none quite have it right.
Something patterned after the code in post  54501 (or post 35235 of last December) should just work.
My posts on how to do this correctly go back even further, into the Bitx40 days.

The only issue is detecting exactly where zero beat is, given the capacitive coupling
through the audio amps which limit the low freq response.
But as is, accurate enough to get within 10 hz.
Given that inherent uncertainty, may as well multiply the encoder reading by 100, not by 10, so you can find zero-beat more quickly.
That gives a granularity of 1e6 * 100/875e6 = 0.114 ppm.
Still plenty accurate, accurate enough that temp changes in the 25mhz crystal will be more of an issue.

Jerry, KE7ER

 

On Fri, Jul 20, 2018 at 08:15 AM, Joel Caulkins wrote:
You are right, I did use my calibrated HP 5384A frequency counter to determine the crystal frequency. I had forgot that. I found calibrating the hardest part of building my last uBitx transceiver, it just seems like it should be easier, but what do I know, I'm strictly a hardware man. I'm all for using WWV when the bands are good enough to actually hear it.