Topics

ubitx circuit, wiring, source code on github

Ashhar Farhan
 

i have uploaded the sketch for the ubitx, wiring diagrams and the circuit on github. ou can see it on https://github.com/afarhan/ubitx

this is the production version. i have tried to keep the code readable. where smartness was pitted against readability, i have opted for readable code. do take the time to visit the above link.

- I have borrowed heavily from jack, jerry and allard. thanks guys. 
- Some decisions are against the spirit of open source, instead of using a well known library for the si5351, i decided on the minimal code of Jerrys.
- the sketch was getting too lengthy. i have split it up into multiple files.
- I didn't use allard's keyer. instead i wrote a new one that doesn't require it to be configured. i maybe wrong with this, but i use a straigh key, so i havent played much with it.
- there is a very tricky file calleed 'factory alignment' this will keep changing, depending upon what is comfortable to the ladies. it works with the testing circuit connected to the ubitx. i will document it later for those interested.
 

Jerry Gaffke
 

Looks very promising!

My si5351bx routines were released under GNU General Public License 3.0
Don't see how using them might be against the spirit of open source.

Jerry, KE7ER


On Wed, Dec 6, 2017 at 09:02 pm, Ashhar Farhan wrote:
- Some decisions are against the spirit of open source, instead of using a well known library for the si5351, i decided on the minimal code of Jerrys.
 

Jerry Gaffke
 

Have you noticed many birdies due to crosstalk from using all three output pins of the Si5351?

The Si5351's CMOS outputs might do better if not loaded so heavily.
I intend to try two series 100 ohm resistors from Si5351 output pin to ground (also the series cap at the Si5351).
The mixer diodes get tied to the junction between the two resistors.
So the Si5351 sees the series resistance of 200 ohms, plus some additional load due to the diodes.
The diode ring sees a source resistance that is the two resistors in parallel, or 50 ohms.

These mixers want about 7dbm of power, or about 0.5v rms into 50 ohms.
With a square wave, that's 1v pk-to-pk, which is about what we would get at the diodes from the above circuit.

Jerry, KE7ER

Ashhar Farhan
 

jerry,
i did notice the birdies. they were caused when the si5351 outputs are left open. the attenuatora bring it down very well.
the bigger challenge was the harmonics of arduino's 16 mhz and the si5351at 12mhz intermodulating. i solved it by maintaining the usbcarrier at usb, using second oscillator inversion to flip the sidebands.
with programmable oscillators, we have rethink solutions.
- f

On 7 Dec 2017 11:17 am, "Jerry Gaffke via Groups.Io" <jgaffke=yahoo.com@groups.io> wrote:
Have you noticed many birdies due to crosstalk from using all three output pins of the Si5351?

The Si5351's CMOS outputs might do better if not loaded so heavily.
I intend to try two series 100 ohm resistors from Si5351 output pin to ground (also the series cap at the Si5351).
The mixer diodes get tied to the junction between the two resistors.
So the Si5351 sees the series resistance of 200 ohms, plus some additional load due to the diodes.
The diode ring sees a source resistance that is the two resistors in parallel, or 50 ohms.

These mixers want about 7dbm of power, or about 0.5v rms into 50 ohms.
With a square wave, that's 1v pk-to-pk, which is about what we would get at the diodes from the above circuit.

Jerry, KE7ER

Jerry Gaffke
 

Interesting, I would not have expected the heavier Si5351 loads to work so much better.
Perhaps loading the Si5351 smooths out some of the sharp corners, reducing harmonics.
Or, perhaps the 50 ohm pad absorbs crud coming out of the mixer (the two 100 ohm resistors should also do this). 

Not quite sure what this means:
>  i solved it by maintaining the usbcarrier at usb,
Perhaps this means you keep the BFO frequency down below the crystal filter, far as you can away from 12mhz.
Which seems a fine solution.
 
The perfectionists might want to try creating a Raduino variant with more attention to RFI issues, perhaps with multiple si5351's.
But the Raduino on the Bitx40 is clean enough with just some power supply filtering.

With CW injected up front, we could use Raj's cap fix at the modulator for the carrier burst.
I'd prefer not to encumber the sketch with interrupt driven delays.

This promises to be a really great piece of gear.
The push-pull amp gives more power out with lower quiescent currents,
Hard to imagine covering so many bands with fewer parts.

Jerry, KE7ER


On Wed, Dec 6, 2017 at 09:57 pm, Ashhar Farhan wrote:
jerry,
i did notice the birdies. they were caused when the si5351 outputs are left open. the attenuatora bring it down very well.
the bigger challenge was the harmonics of arduino's 16 mhz and the si5351at 12mhz intermodulating. i solved it by maintaining the usbcarrier at usb, using second oscillator inversion to flip the sidebands.
with programmable oscillators, we have rethink solutions.
- f

Trent Trent <vk7hrs@...>
 

Can it use a rotary encoder

On 7 Dec. 2017 5:37 pm, "Jerry Gaffke via Groups.Io" <jgaffke=yahoo.com@groups.io> wrote:
Interesting, I would not have expected the heavier Si5351 loads to work so much better.
Perhaps loading the Si5351 smooths out some of the sharp corners, reducing harmonics.
Or, perhaps the 50 ohm pad absorbs crud coming out of the mixer (the two 100 ohm resistors should also do this). 

Not quite sure what this means:
>  i solved it by maintaining the usbcarrier at usb,
Perhaps this means you keep the BFO frequency down below the crystal filter, far as you can away from 12mhz.
Which seems a fine solution.
 
The perfectionists might want to try creating a Raduino variant with more attention to RFI issues, perhaps with multiple si5351's.
But the Raduino on the Bitx40 is clean enough with just some power supply filtering.

With CW injected up front, we could use Raj's cap fix at the modulator for the carrier burst.
I'd prefer not to encumber the sketch with interrupt driven delays.

This promises to be a really great piece of gear.
The push-pull amp gives more power out with lower quiescent currents,
Hard to imagine covering so many bands with fewer parts.

Jerry, KE7ER


On Wed, Dec 6, 2017 at 09:57 pm, Ashhar Farhan wrote:
jerry,
i did notice the birdies. they were caused when the si5351 outputs are left open. the attenuatora bring it down very well.
the bigger challenge was the harmonics of arduino's 16 mhz and the si5351at 12mhz intermodulating. i solved it by maintaining the usbcarrier at usb, using second oscillator inversion to flip the sidebands.
with programmable oscillators, we have rethink solutions.
- f

Ashhar Farhan
 

yes, it uses an rotary encoders. they are available cheaply on mouser.com as well as ebay. Buy something called the "EC-11 with push button"

- f

On Thu, Dec 7, 2017 at 2:35 PM, Trent Trent <vk7hrs@...> wrote:
Can it use a rotary encoder

On 7 Dec. 2017 5:37 pm, "Jerry Gaffke via Groups.Io" <jgaffke=yahoo.com@groups.io> wrote:
Interesting, I would not have expected the heavier Si5351 loads to work so much better.
Perhaps loading the Si5351 smooths out some of the sharp corners, reducing harmonics.
Or, perhaps the 50 ohm pad absorbs crud coming out of the mixer (the two 100 ohm resistors should also do this). 

Not quite sure what this means:
>  i solved it by maintaining the usbcarrier at usb,
Perhaps this means you keep the BFO frequency down below the crystal filter, far as you can away from 12mhz.
Which seems a fine solution.
 
The perfectionists might want to try creating a Raduino variant with more attention to RFI issues, perhaps with multiple si5351's.
But the Raduino on the Bitx40 is clean enough with just some power supply filtering.

With CW injected up front, we could use Raj's cap fix at the modulator for the carrier burst.
I'd prefer not to encumber the sketch with interrupt driven delays.

This promises to be a really great piece of gear.
The push-pull amp gives more power out with lower quiescent currents,
Hard to imagine covering so many bands with fewer parts.

Jerry, KE7ER


On Wed, Dec 6, 2017 at 09:57 pm, Ashhar Farhan wrote:
jerry,
i did notice the birdies. they were caused when the si5351 outputs are left open. the attenuatora bring it down very well.
the bigger challenge was the harmonics of arduino's 16 mhz and the si5351at 12mhz intermodulating. i solved it by maintaining the usbcarrier at usb, using second oscillator inversion to flip the sidebands.
with programmable oscillators, we have rethink solutions.
- f


Trent Trent <vk7hrs@...>
 

I think I got 2 of them this year,they are on a PCB and need the 5V+ aswell with SMD resistors for pull-up/pull-down

Jerry Gaffke
 

Looking over the sketch, not quite sure what all is going on yet with si5351_set_calibration()
Here's what I would expect to see:

Place the BFO (clk0) somewhere near the middle of the crystal filter passband so we can hear a zero beat.
An uncalibrated BFO frequency of 11997000 hz should be close enough.

Place clk1 (the local oscillator into the second mixer) at 45mhz + 12mhz = 57mhz  (the 45mhz filter is fairly wide, should not be critical)

Have the user tune clk2 (the VFO into the first mixer) till the display shows the exact frequency for a signal of known frequency.
This signal could be from a calibrated signal generator or an AM station such as WWV, or a CW transmitter with a brick on the key.
The displayed frequency should be exactly   sig = clk2-(clk1-clk0),
where clk0, clk1, clk2 are the value provided in the second parameter to si5351bx_setfreq(clknum, fout)
Given a signal frequency, we can compute the VFO frequency as   clk2 = sig+(clk1-clk0).

For example, assume we are tuned to WWV at 15mhz, with clk0=11.997mhz, and clk1=57mhz
Then clk2 (the VFO) should have a value of    clk2 = sig+(clk1-clk0) = 15mhz+(57mhz-11.997mhz) = 60.003mhz
when the display reads 15000000 hz.

Ask the user to turn the tuning knob until zerobeat is achieved, the tuning knob controls the value
of the calibration factor si5351bx_vcoa
The granularity with which si5351bx_vcoa can be varied should be down in the low single digits.
This accuracy will be very useful in some digital modes.  Perhaps use Don Cantrell's shuttle tuning
scheme, with increments/decrements of 1 for si5351bx_vcoa near the middle of the tuning range.  
The display should somehow indicate how far si5351bx_vcoa is from its nominal value of 875mhz.

For each change in the value of si5351bx_vcoa, do the following three function calls:
    si5351bx_setfreq(0, FREQclk0)
    si5351bx_setfreq(1, FREQclk1)
    si5351bx_setfreq(2, FREQclk2)

Note that the values for those three frequencies do not change.
In our example, they remain fixed at 11.997mhz, 57mhz, and 63.003mhz respectively.
However, as the calibration value si5351bx_vcoa changes between calls,
the frequency emitted by the three clock outputs will change proportional to that calibration constant.

When the user hears zerobeat, they press a button to save that value of si5351bx_vcoa
At this point, the Si5351's 25mhz reference oscillator is exactly calibrated, and any frequency we
program into clk0, clk1, or clk2  should be correct to within a fraction of a hz.
 
Once the si5351 is calibrated using the above procedure, then the user is asked to position the BFO
for the upper and lower sideband settings.  One way would be to have an incoming SSB signal of
known quality, and then set the BFO for best audio clarity.  An alternative would be to scan clk2 and clk0
through the crystal filter passband such that a constant frequency audio beat note is heard, and have the
user identify where the amplitude falls off at each edge of the 12mhz crystal filter passband. 

Jerry, KE7ER



On Wed, Dec 6, 2017 at 09:02 pm, Ashhar Farhan wrote:
i have uploaded the sketch for the ubitx, wiring diagrams and the circuit on github. ou can see it on https://github.com/afarhan/ubitx
 

Jerry Gaffke
 

To scan the 12mhz filter passband, I'm thinking we drive CW-KEY high to unbalance the first mixer,
freeze clk1 at 57mhz, then scan clk2 and clk0 around 45mhz and 12mhz respectively,
monitoring the resultant audio beat note with scope or AC voltage meter.

Since the first mixer is unbalanced, anything on clk2 will continue on through to the second mixer
where it mixes with the 57mhz clk1 to create something near 12mhz. 
If clk0 varies from 12.000mhz down to 11.990mhz while clk2 varies from 45.000mhz to 45.010mhz, we should hear a constant
1khz audio tone that varies in intensity according to the 12mhz crystal filter's response to the 57mhz-clk2 frequency that
is passing through it.  This could be plotted on graph paper while reading the AC audio voltage and the frequency
of 57mhz-clk2 from the display, 

At any rate, nothing I am bringing up today should slow hfsigs down in building those rigs.
They will likely work fine as shipped, and all these minor adjustments will give the tinkerer's among us something to do.

Jerry, KE7ER


On Thu, Dec 7, 2017 at 10:09 am, Jerry Gaffke wrote:
An alternative would be to scan clk2 and clk0
through the crystal filter passband such that a constant frequency audio beat note is heard, and have the
user identify where the amplitude falls off at each edge of the 12mhz crystal filter passband.

Ashhar Farhan
 

Jerry, 
Earlier, the calibration routine put out a 10 MHz signal out the antenna (by unbalancing the diode mixer and setting the first oscillator to 10 MHz). I chucked it because it assumed that everybody had a dummy load or a 10 MHz antenna. 

On the other hand, it is easier for a ham to call up someone and ask them to call CQ on a particular frequency. The way the present calibration works is like this. I call up  friend to call CQ from his calibrated radio exactly at 7050 KHz. I set the dial to 7050 KHz, Then you switch on the calibration and tune until it goes dead zero beat.  If only life was that simple. 

First, the crystal filter has a steep skirt. We would ordinarily celebrate this. But in our case, that means, unless the signal is a 30 db over S9, you are not going to hear the zero beat, much less the swing to the other sideband.

Second issue with this is that as we recalibrate the VCO and reset the oscillators, the BFO too is corrected by an equal amount and the zero-beat will go away. To compensate for this, this is what I came up with, bear with me...

The VCO frequency is at 875 MHz. We generate any needed frequency by dividing the PLL by a fraction. So, to generate 1 Mhz, it is divided by 875. Now, suppose our reference that we are trying to align with is at 1 MHz, we need to nudge the 875 MHz VCO. If the VCO moves by 875 Hz, we can see the 1 MHz move by 1 Hz. To move the 1 MHz by 10 Hz at  time, we have to move the VCO by 8750 Hz at a time. Our BFO is at 12 MHz, if we push the VCO up or down by 875 Hz, the 12 Mhz will be  moved by 12 Hz. If we push the VCO around by 8750 Hz, the 12 Mhz BFO has to be corrected by 120 Hz. This is what the code does. 

- f

On Fri, Dec 8, 2017 at 1:14 AM, Jerry Gaffke via Groups.Io <jgaffke@...> wrote:
To scan the 12mhz filter passband, I'm thinking we drive CW-KEY high to unbalance the first mixer,
freeze clk1 at 57mhz, then scan clk2 and clk0 around 45mhz and 12mhz respectively,
monitoring the resultant audio beat note with scope or AC voltage meter.

Since the first mixer is unbalanced, anything on clk2 will continue on through to the second mixer
where it mixes with the 57mhz clk1 to create something near 12mhz. 
If clk0 varies from 12.000mhz down to 11.990mhz while clk2 varies from 45.000mhz to 45.010mhz, we should hear a constant
1khz audio tone that varies in intensity according to the 12mhz crystal filter's response to the 57mhz-clk2 frequency that
is passing through it.  This could be plotted on graph paper while reading the AC audio voltage and the frequency
of 57mhz-clk2 from the display, 

At any rate, nothing I am bringing up today should slow hfsigs down in building those rigs.
They will likely work fine as shipped, and all these minor adjustments will give the tinkerer's among us something to do.

Jerry, KE7ER


On Thu, Dec 7, 2017 at 10:09 am, Jerry Gaffke wrote:
An alternative would be to scan clk2 and clk0
through the crystal filter passband such that a constant frequency audio beat note is heard, and have the
user identify where the amplitude falls off at each edge of the 12mhz crystal filter passband.


Henning Weddig
 

Jerry,

a similar situation will happen under "nromal conditions: the first mixer never is fully balanced resulting that receiving 12 MHz, tehre will be an attenuated 57 Mhz signal from the frist LO at the output of the first mixer besides the wanted  45 MHz... we will have a big spur at 12 MHz antenna signal?!


Am 07.12.2017 um 20:44 schrieb Jerry Gaffke via Groups.Io:

To scan the 12mhz filter passband, I'm thinking we drive CW-KEY high to unbalance the first mixer,
freeze clk1 at 57mhz, then scan clk2 and clk0 around 45mhz and 12mhz respectively,
monitoring the resultant audio beat note with scope or AC voltage meter.

Since the first mixer is unbalanced, anything on clk2 will continue on through to the second mixer
where it mixes with the 57mhz clk1 to create something near 12mhz. 
If clk0 varies from 12.000mhz down to 11.990mhz while clk2 varies from 45.000mhz to 45.010mhz, we should hear a constant
1khz audio tone that varies in intensity according to the 12mhz crystal filter's response to the 57mhz-clk2 frequency that
is passing through it.  This could be plotted on graph paper while reading the AC audio voltage and the frequency
of 57mhz-clk2 from the display, 

At any rate, nothing I am bringing up today should slow hfsigs down in building those rigs.
They will likely work fine as shipped, and all these minor adjustments will give the tinkerer's among us something to do.

Jerry, KE7ER


On Thu, Dec 7, 2017 at 10:09 am, Jerry Gaffke wrote:
An alternative would be to scan clk2 and clk0
through the crystal filter passband such that a constant frequency audio beat note is heard, and have the
user identify where the amplitude falls off at each edge of the 12mhz crystal filter passband.

Jerry Gaffke
 

Farhan,

You've actually done this stuff, and I'm just engaging in armchair punditry.
So take my suggestions with a grain of salt.

But I think the procedure I outlined should work well, no trouble with hearing a zerobeat right off
if the si5351 25hz reference crystal and the 12mhz crystals are all within 50ppm or so.
If crystal tolerances exceed that, we may need to go to a two step procedure.

And should work with any known signal source that is within the capabilities of the receiver, 0-30mhz.
I'll play with the code if and and when I get my hands on a ubitx, see if I'm right about that.
I'd much prefer to zerobeat a time standard such as WWV than some random ham's 7050khz signal.
If not a time standard, then perhaps one of those nasty 41m broadcast stations that others tell us
is accurately on frequency.  

It's not a disadvantage that all three clocks are locked to vcoa.
If we set the display to a known frequency then nudge vcoa around till the signal is correctly
received, the math is such that vcoa has exactly the frequency at which the vco is operating at.
And thus compensates for any error in the 25mhz reference crystal.
I'm assuming we call setfreq() for each of the three clocks each time we nudge vcoa.

One minor hack that might be fun to try on the Raduino:  
Measure the temperature around the si5351 and the 25mhz crystal using a Nano analog pin
and a diode junction.  Or perhaps a proper temperature sensor with i2c interface.  
Adjust vcoa as a function of the temperature we sense using a piecewise linear fit stored in flash
that characterizes how the measured frequency of the 25mhz reference changes with temperature.
A cheap way to give us a very stable TCXO.

Jerry, KE7ER
 


On Thu, Dec 7, 2017 at 12:15 pm, Ashhar Farhan wrote:
Earlier, the calibration routine put out a 10 MHz signal out the antenna (by unbalancing the diode mixer and setting the first oscillator to 10 MHz). I chucked it because it assumed that everybody had a dummy load or a 10 MHz antenna. 
 
On the other hand, it is easier for a ham to call up someone and ask them to call CQ on a particular frequency. The way the present calibration works is like this. I call up  friend to call CQ from his calibrated radio exactly at 7050 KHz. I set the dial to 7050 KHz, Then you switch on the calibration and tune until it goes dead zero beat.  If only life was that simple. 
 
First, the crystal filter has a steep skirt. We would ordinarily celebrate this. But in our case, that means, unless the signal is a 30 db over S9, you are not going to hear the zero beat, much less the swing to the other sideband.
 
Second issue with this is that as we recalibrate the VCO and reset the oscillators, the BFO too is corrected by an equal amount and the zero-beat will go away. To compensate for this, this is what I came up with, bear with me...
 
The VCO frequency is at 875 MHz. We generate any needed frequency by dividing the PLL by a fraction. So, to generate 1 Mhz, it is divided by 875. Now, suppose our reference that we are trying to align with is at 1 MHz, we need to nudge the 875 MHz VCO. If the VCO moves by 875 Hz, we can see the 1 MHz move by 1 Hz. To move the 1 MHz by 10 Hz at  time, we have to move the VCO by 8750 Hz at a time. Our BFO is at 12 MHz, if we push the VCO up or down by 875 Hz, the 12 Mhz will be  moved by 12 Hz. If we push the VCO around by 8750 Hz, the 12 Mhz BFO has to be corrected by 120 Hz. This is what the code does. 
 

Jerry Gaffke
 

I'm not quite sure what this means.
Is this only a problem when attempting to receive a 12.000 mhz signal?
I can see where receiving 12mhz may be problematic, though I don't plan to be operating there much.

Yes, there are all kinds of unwanted products from the mixers flying about, especially since we don't have any shielding.
I'm willing to live with a few birds given the likely price point and capabilities and hackability of this rig.
Should be a fun to try to figure out where they are coming from.

Jerry, KE7ER


On Thu, Dec 7, 2017 at 12:35 pm, Henning Weddig wrote:

a similar situation will happen under "nromal conditions: the first mixer never is fully balanced resulting that receiving 12 MHz, tehre will be an attenuated 57 Mhz signal from the frist LO at the output of the first mixer besides the wanted  45 MHz... we will have a big spur at 12 MHz antenna signal?!

Jerry Gaffke
 

You may not hear the beat frequency right off if the 25mhz si5351 reference is off significantly,
since it is creating signals up to 45+30=75mhz.  And 100ppm at 75mhz is an error of 50*75=7500hz
But if you slew around the vcoa calibration factor enough, you should eventually hear the audio beat.

Even if the 12mhz crystals are off by 100ppm, creating a second IF that is 12*100=1200hz away from where we expect it.
Will likely be able to faintly hear zerobeat on the filter skirt even at that extreme. 
A slam dunk if the crystals are +/- 50ppm.
So should work as a single pass calibration procedure.

Jerry,  KE7ER

 

On Thu, Dec 7, 2017 at 12:49 pm, Jerry Gaffke wrote:
But I think the procedure I outlined should work well, no trouble with hearing a zerobeat right off
if the si5351 25hz reference crystal and the 12mhz crystals are all within 50ppm or so.
If crystal tolerances exceed that, we may need to go to a two step procedure.

Gordon Gibby <ggibby@...>
 

​I've measured four Raduinos now and every one of them has been roughly 4 kHz ABOVE  25.000000   when commanded to go right to 25.0000000 MHz.   A few hundred hertz upper at times, but always about 4 kHz above 25.00000000


Gordon



From: BITX20@groups.io <BITX20@groups.io> on behalf of Jerry Gaffke via Groups.Io <jgaffke@...>
Sent: Thursday, December 7, 2017 4:54 PM
To: BITX20@groups.io
Subject: Re: [BITX20] ubitx circuit, wiring, source code on github
 
You may not hear the beat frequency right off if the 25mhz si5351 reference is off significantly,
since it is creating signals up to 45+30=75mhz.  And 100ppm at 75mhz is an error of 50*75=7500hz
But if you slew around the vcoa calibration factor enough, you should eventually hear the audio beat.

Even if the 12mhz crystals are off by 100ppm, creating a second IF that is 12*100=1200hz away from where we expect it.
Will likely be able to faintly hear zerobeat on the filter skirt even at that extreme. 
A slam dunk if the crystals are +/- 50ppm.
So should work as a single pass calibration procedure.

Jerry,  KE7ER

 
On Thu, Dec 7, 2017 at 12:49 pm, Jerry Gaffke wrote:
But I think the procedure I outlined should work well, no trouble with hearing a zerobeat right off
if the si5351 25hz reference crystal and the 12mhz crystals are all within 50ppm or so.
If crystal tolerances exceed that, we may need to go to a two step procedure.

Jerry Gaffke
 

Curious.
That's off by 1e6*(4khz/25mhz) = 160 parts per million.

The cheapest 25mhz crystal on Mouser is $0.10 in quantities of 1000.
Claims a tolerance of 30ppm, stability of 50ppm.
Perhaps the Si5351 is not configured for a load capacitance (an i2c register setting)
that matches the crystal used?

Jerry, KE7ER


On Thu, Dec 7, 2017 at 05:44 pm, Gordon Gibby wrote:

​I've measured four Raduinos now and every one of them has been roughly 4 kHz ABOVE  25.000000   when commanded to go right to 25.0000000 MHz.   A few hundred hertz upper at times, but always about 4 kHz above 25.00000000

 

Gordon Gibby <ggibby@...>
 

​that would be my first guess also.   


Ithas been pretty consistent.  


the fact that all of them are fairly tightly grouped (precision?) suggests something in the circuit is the larger issue.


But all I had to do was adjust the definition and all is well.

Gordon




From: BITX20@groups.io <BITX20@groups.io> on behalf of Jerry Gaffke via Groups.Io <jgaffke@...>
Sent: Thursday, December 7, 2017 9:30 PM
To: BITX20@groups.io
Subject: Re: [BITX20] ubitx circuit, wiring, source code on github
 
Curious.
That's off by 1e6*(4khz/25mhz) = 160 parts per million.

The cheapest 25mhz crystal on Mouser is $0.10 in quantities of 1000.
Claims a tolerance of 30ppm, stability of 50ppm.
Perhaps the Si5351 is not configured for a load capacitance (an i2c register setting)
that matches the crystal used?

Jerry, KE7ER

On Thu, Dec 7, 2017 at 05:44 pm, Gordon Gibby wrote:

​I've measured four Raduinos now and every one of them has been roughly 4 kHz ABOVE  25.000000   when commanded to go right to 25.0000000 MHz.   A few hundred hertz upper at times, but always about 4 kHz above 25.00000000

 

Ashhar Farhan
 

gordon, it must be due to the required vs loading capacitance for the 25 mhz crystal. the actual frequency of the crystal is specified for a particular parallel capacitance. the si5351 has a register that can change this capacitance between a few values. perhaps, we should read that up?

On 8 Dec 2017 8:16 am, "Gordon Gibby" <ggibby@...> wrote:

​that would be my first guess also.   


Ithas been pretty consistent.  


the fact that all of them are fairly tightly grouped (precision?) suggests something in the circuit is the larger issue.


But all I had to do was adjust the definition and all is well.

Gordon




From: BITX20@groups.io <BITX20@groups.io> on behalf of Jerry Gaffke via Groups.Io <jgaffke=yahoo.com@groups.io>
Sent: Thursday, December 7, 2017 9:30 PM
To: BITX20@groups.io
Subject: Re: [BITX20] ubitx circuit, wiring, source code on github
 
Curious.
That's off by 1e6*(4khz/25mhz) = 160 parts per million.

The cheapest 25mhz crystal on Mouser is $0.10 in quantities of 1000.
Claims a tolerance of 30ppm, stability of 50ppm.
Perhaps the Si5351 is not configured for a load capacitance (an i2c register setting)
that matches the crystal used?

Jerry, KE7ER

On Thu, Dec 7, 2017 at 05:44 pm, Gordon Gibby wrote:

​I've measured four Raduinos now and every one of them has been roughly 4 kHz ABOVE  25.000000   when commanded to go right to 25.0000000 MHz.   A few hundred hertz upper at times, but always about 4 kHz above 25.00000000

 

Jerry Gaffke
 

I'm not sure what "definition" you adjusted to make everything right.

Anyways, in recent sketches from Allard, here's the line that sets the 25mhz crystal load capacitance in the si5351:
#define SI5351BX_XTALPF 2               // 1:6pf  2:8pf  3:10pf

So the register bitfield currently gets a value of 2, which sets the load capacitance to 8pf.
You could try changing it from 2 to 1 (for 6pf) or to 3 (for 10pf) and see if the 
the reference oscillator runs closer to 25mhz.

Beyond that, I'm not really sure why it would be so far off.
Perhaps these crystals are factory seconds?
Perhaps a board layout issue?  
A problem with the si5351?

Regardless, so long as the 25mhz reference oscillator starts up dependably and is stable,
we can easily correct for this error.

The fact that it is consistently so far off suggests Allard was correct to change his
correction factor from additive to multiplicative in v1.26 firmware.
Any error due to the 25mhz reference oscillator frequency (which is multiplicative) will
be significantly larger than errors due to the BFO crystal frequency (which is additive).

Jerry, KE7ER



You might try other values, such 

On Thu, Dec 7, 2017 at 06:46 pm, Gordon Gibby wrote:

But all I had to do was adjust the definition and all is well.