Topics

Digital BFO Mod: Terrible Audio! #bitx40help

Ryan Flowers
 

Hello Everyone,

I've been working on my own digital VFO/BFO for my BITX40. The goal: Switch sidebands without inverting the VFO to 19mhz for 40M and 26mhz for 20M. I've got it working, mostly, but I'm having one heck of a time with audio quality. The 12mhz crystals not 12mhz but rather 11,984,800 and currently I have my sidebands at 11994420 for USB and 11996450 for LSB. These are 2030 and 4060hz away from the crystal frequency, and I am having a hard time visualizing how that works. But at any rate, these are the what I came up with mostly through trial and error. 

I'm currently using a modified version of the uBITX sketch. I've added the offset frequency (11984800, named vfoOffset) and lsbCarrier and am using the following to do my tuning:

  if (isUSB){
    si5351bx_setfreq(0, vfoOffset + frequency);
    si5351bx_setfreq(1, usbCarrier);
  }
  else{
    si5351bx_setfreq(0, vfoOffset + frequency);
    si5351bx_setfreq(1, lsbCarrier);

  }
I've also added menu items for adjusting the USB/LSB and Offset easily, and using these I adjusted for best inbound audio and ended up with the aforementioned values. When I tune the radio to 7074mhz and select USB, I'm not getting *any* decodes on FT8- but it works on LSB... What on earth? The other thing is that audio output (as tested by transmitting into a dummy load and listening on my Kenwood) is just terribly choppy and unintelligible. I've tried varying the signal output strength of the si5351 clocks from 2ma to 8ma, no difference. It sounds terribly over-modulated.

I have gotten in over my head, but I'm determined. Can somebody help me understand this so I can not just complete this project but get a better understanding? Thanks so much.

-- 
Ryan Flowers - W7RLF
MiscDotGeek.com
Multi Band BITX40
The BITX40 FAQ

Allard PE1NWL
 

Hi Ryan,

"Switch sidebands without inverting the VFO to 19mhz"
Raduino v2 for BitX40 already has exactly this functionality, perhaps you
could use this:

https://github.com/amunters/bitx40-raduino-v2

73 Allard PE1NWL

On Wed, March 14, 2018 09:54, Ryan Flowers wrote:
Hello Everyone,

I've been working on my own digital VFO/BFO for my BITX40. The goal:
Switch sidebands without inverting the VFO to 19mhz for 40M and 26mhz for
20M. I've got it working, mostly, but I'm having one heck of a time with
audio quality. The 12mhz crystals not 12mhz but rather 11,984,800 and
currently I have my sidebands at 11994420 for USB and 11996450 for LSB.
These are 2030 and 4060hz away from the crystal frequency, and I am having
a hard time visualizing how that works. But at any rate, these are the
what I came up with mostly through trial and error. 

I'm currently using a modified version of the uBITX sketch. I've added the
offset frequency (11984800, named vfoOffset) and lsbCarrier and am using
the following to do my tuning:

if (isUSB){ si5351bx_setfreq(0, vfoOffset + frequency);
si5351bx_setfreq(1, usbCarrier); } else{ si5351bx_setfreq(0, vfoOffset +
frequency); si5351bx_setfreq(1, lsbCarrier); } I've also added menu items
for adjusting the USB/LSB and Offset easily, and using these I adjusted
for best inbound audio and ended up with the aforementioned values. When I
tune the radio to 7074mhz and select USB, I'm not getting *any* decodes on
FT8- but it works on LSB... What on earth? The other thing is that audio
output (as tested by transmitting into a dummy load and listening on my
Kenwood) is just terribly choppy and unintelligible. I've tried varying
the signal output strength of the si5351 clocks from 2ma to 8ma, no
difference. It sounds terribly over-modulated.

I have gotten in over my head, but I'm determined. Can somebody help me
understand this so I can not just complete this project but get a better
understanding? Thanks so much.

-- 
Ryan Flowers - W7RLF
MiscDotGeek.com ( http://miscdotgeek.com )
Multi Band BITX40 ( http://miscdotgeek.com/bitx40-digital-jt65/ )
The BITX40 FAQ ( http://miscdotgeek.com/unofficial-bitx40-faq )

Jerry Gaffke
 

Allard's v2 firmware is a good choice, this has all been done.
Though the understanding you get from trying to do it yourself is worth the time. 

The series resonant frequency of the crystals is a few khz lower than parallel resonance:
    https://groups.io/g/BITX20/message/25360

You don't describe how the audio is terrible. 
If when tuned for natural sounding speech, you get audio that has lots of bass or lots of treble, 
then it's likely you don't have the BFO frequency set correctly.
It is the distance of the BFO from the crystal filter passband that determines what audio frequencies are present.


On Wed, Mar 14, 2018 at 01:54 am, Ryan Flowers wrote:
The 12mhz crystals not 12mhz but rather 11,984,800 and currently I have my sidebands at 11994420 for USB and 11996450 for LSB.

Ryan Flowers
 

Hi Jerry and Allard,

I was hoping you two would chime in. I chose the uBITX sketch for several reasons: 1) already has band switching 2) already has rotary encoder 3) already has BFO 4) wanted the challenge of making it work on an Uno R3 and i2c LCD. I *think* I have the nuts and bolts of all those things correct but I'm just missing something somewhere else. I'll do a bit more testing and possibly a video to describe it, and get back to you.

--
Ryan Flowers - W7RLF
MiscDotGeek.com
Multi Band BITX40
The BITX40 FAQ

Tim Gorman
 

I'm not sure what your frequencies mean. 11994420 - 11984800 = 12000
and 11996450-11984800 = 9620.

These don't match your 2030hz and 4060hz figures.

If your crystals all average out to about 11984800hz then any bandpass
filter will have a frequency just a little above that frequency. Let's
assume it will run from 2khz to 5khz higher, i.e. a 3khz bandwidth or
from 11986800hz to 11989800hz.

I thought the bitx40 used a 5Mhz vfo and a 12Mhz if (i.e. crystal
filter frequency)?

Why are you adding a 12Mhz (vfo offset) to the frequency? And then using
another 12Mhz (usbCarrier) signal to demodulate it? You just wind back
up with a signal of 7Mhz.

Am I misunderstanding what you are doing?

There is a reason for shifting the vfo frequency. To make the best use
of a crystal filter, which typically has a steeper cutoff at the lowest
frequency and a less steep cutoff at the upper frequency, usually LSB
signals are converted to USB signals where the audio frequencies higher
in frequency than the carrier.

tim ab0wr

On Wed, 14 Mar 2018 01:54:42 -0700
"Ryan Flowers" <geocrasher@...> wrote:
Hello Everyone,

I've been working on my own digital VFO/BFO for my BITX40. The goal:
Switch sidebands without inverting the VFO to 19mhz for 40M and 26mhz
for 20M. I've got it working, mostly, but I'm having one heck of a
time with audio quality. The 12mhz crystals not 12mhz but rather
11,984,800 and currently I have my sidebands at 11994420 for USB and
11996450 for LSB. These are 2030 and 4060hz away from the crystal
frequency, and I am having a hard time visualizing how that works.
But at any rate, these are the what I came up with mostly through
trial and error. 

I'm currently using a modified version of the uBITX sketch. I've
added the offset frequency (11984800, named vfoOffset) and lsbCarrier
and am using the following to do my tuning:

if (isUSB){ si5351bx_setfreq(0, vfoOffset + frequency);
si5351bx_setfreq(1, usbCarrier); } else{ si5351bx_setfreq(0,
vfoOffset + frequency); si5351bx_setfreq(1, lsbCarrier); } I've also
added menu items for adjusting the USB/LSB and Offset easily, and
using these I adjusted for best inbound audio and ended up with the
aforementioned values. When I tune the radio to 7074mhz and select
USB, I'm not getting *any* decodes on FT8- but it works on LSB...
What on earth? The other thing is that audio output (as tested by
transmitting into a dummy load and listening on my Kenwood) is just
terribly choppy and unintelligible. I've tried varying the signal
output strength of the si5351 clocks from 2ma to 8ma, no difference.
It sounds terribly over-modulated.

I have gotten in over my head, but I'm determined. Can somebody help
me understand this so I can not just complete this project but get a
better understanding? Thanks so much.

-- 
Ryan Flowers - W7RLF
MiscDotGeek.com ( http://miscdotgeek.com )
Multi Band BITX40 ( http://miscdotgeek.com/bitx40-digital-jt65/ )
The BITX40 FAQ ( http://miscdotgeek.com/unofficial-bitx40-faq )

Jerry Gaffke
 

Yes, his numbers are off.
Filter passband on the Bitx40 is around 2000 hz wide,
3 dB passband might be 11996000 to 11998000, within a khz or so,
depending on which bin the crystals for his rig were picked from.
BFO is probably best placed maybe 500 hz beyond that,
so 11995500 for USB and 11998500 for LSB.


On Wed, Mar 14, 2018 at 05:37 pm, Tim Gorman wrote:
I'm not sure what your frequencies mean. 11994420 - 11984800 = 12000
and 11996450-11984800 = 9620.

Ryan Flowers
 

See, this is why I posted. I know I'm in over my head. I don't fully understand the crystal filter and where its passband is positioned. You just gave me good information though, so thank you. And Tim, the variables and equation used is

 vfoOffset + frequency)
VFO Offset of 11984800 + frequency displayed (7mhz) and oh my, I just realized I'm doing it backwards which is one reason I am having such a hard time. I do most of this late at night and it shows lol. Thanks for causing me to re-evaluate that. This would explain why I was getting FT8 only in what I thought was LSB mode. I modified the code to subtract displayed frequency from carrier, outputting 5mhz instead of 19, and adjusted the USB/LSB frequencies based on what you said Jerry, and they were dead on. 

I fired up the rig and did some basic testing and the audio was very clean. I hooked up the PC and had an FT8 QSO by answering nearly the first CQ I saw. Success! Thanks so much for the help, guys. 

I still want to understand how the 5 crystals all being on the same frequency works. I think the X5 crystal has a capacitor to pull the frequency up to adjust the passband, and the 119984800 which I mistakenly thought was my offset is not, but is rather the original LSB frequency I was *using* as the offset on my QRP Labs VFO. Because now I'm seeing that I'm a few khz low on the display, which I suppose makes sense since my offset is equally low. I have some adjusting to do.

Thanks again- you guys have saved me tons of frustration.

--
Ryan Flowers - W7RLF
MiscDotGeek.com
Multi Band BITX40
The BITX40 FAQ

Tim Gorman
 

Ryan,

One thing to remember is that crystal filters have always been
considered to be *upper* sideband filters primarily.

They don't have infinitely steep firewalls at each end of the bandpass.
Think of a crystal filter having a slope of 60deg on the low frequency
side and a 45deg slope on the upper frequency side. It's not that
bad but it illustrates the point.

The filter works best when the carrier is on the low frequency side of
the crystal and the audio is above the carrier. The high frequencies in
the voice are usually lower in power anyway so the increased slope on
the upper frequency side of the filter still provides adequate
attenuation.

If you switch and put the carrier on the upper frequency side of the
filter and the audio lower in frequency than the carrier then you are
using your filter where it works the worst. It's not so bad for
transmitting other then it doesn't suppress the carrier as well but for
receiving it tends to let low frequency noise *and* signal through more
than if you use it as an upper sideband filter.

This is also why receivers using such a method often sound so different
on lsb than on usb. Low frequencies in the voice are emphasized much
more when using the filter as a lsb filter than when used as an usb
filter.

The reason for this is that crystal filters are based on the resonant
frequencies of the crystals, the capacitances associated with the
holder, and the stray capacitances of the filter itself. Resonant
crystals can be seen as a combination of resistance, capacitance, and
inductance, just like any resonant circuit. As you go higher in
frequency the capacitance provides less impedance and the higher
frequencies are attenuated less [impedance = 1/(jwC)]. That and the
holder capacitances and stray capacitances provide lower impedance
paths around the filter as the frequency goes up. So you get less
attenuation on the high frequency side.


At the risk of boring everyone, using crystal filters as lsb filters
was done a *lot* in times past when it was difficult to provide two
vfo's of such high frequency that had any stability at all. It was far
easier and worked better to use one of the same crystals as in the
filter as your bfo. You could pull it with a parallel capacitance to
place it on one side of the filter or the other, and being based on a
crystal the bfo would be pretty stable. You just had to live with the
shape of the filter.

This is one of the less appreciated design choices Farhan has done. By
using such different frequencies in the second stage he has been able
to invert LSB signals into USB signals at the filter stage. Thus he
makes the best use of the crystal filter for both USB and LSB
received signals.

Rather than show a bunch of math just remember that when you subtract
the oscillator frequency from the signal you maintain orientation of
the sideband. When you subtract the signal from the oscillator you
invert the sideband.

In the ubitx the first mixer inverts a lsb received signal to usb and a
usb received signal to lsb by subtracting the signal from the vfo. The
second mixer then uses the lower frequency oscillator to maintain the
45mhz usb signal and the higher frequency oscillator to invert the
45mhz lsb signal back to usb. When you look at the block diagram for the
ubitx remember that when it says (33Mhz on USB/57Mhz on LSB) that he is
talking about the 45Mhz signal, not the received signal.

tim ab0wr

On Thu, 15 Mar 2018 00:13:32 -0700
"Ryan Flowers" <geocrasher@...> wrote:
See, this is why I posted. I know I'm in over my head. I don't fully
understand the crystal filter and where its passband is positioned.
You just gave me good information though, so thank you. And Tim, the
variables and equation used is

vfoOffset + frequency) VFO Offset of 11984800 + frequency displayed
(7mhz) and oh my, I just realized I'm doing it backwards which is one
reason I am having such a hard time. I do most of this late at night
and it shows lol. Thanks for causing me to re-evaluate that. This
would explain why I was getting FT8 only in what I thought was LSB
mode. I modified the code to subtract displayed frequency from
carrier, outputting 5mhz instead of 19, and adjusted the USB/LSB
frequencies based on what you said Jerry, and they were dead on. 

I fired up the rig and did some basic testing and the audio was very
clean. I hooked up the PC and had an FT8 QSO by answering nearly the
first CQ I saw. Success! Thanks so much for the help, guys. 

I still want to understand how the 5 crystals all being on the same
frequency works. I think the X5 crystal has a capacitor to pull the
frequency up to adjust the passband, and the 119984800 which I
mistakenly thought was my offset is not, but is rather the original
LSB frequency I was *using* as the offset on my QRP Labs VFO. Because
now I'm seeing that I'm a few khz low on the display, which I suppose
makes sense since my offset is equally low. I have some adjusting to
do.

Thanks again- you guys have saved me tons of frustration.

--
Ryan Flowers - W7RLF
MiscDotGeek.com ( http://miscdotgeek.com )
Multi Band BITX40 ( http://miscdotgeek.com/bitx40-digital-jt65/ )
The BITX40 FAQ ( http://miscdotgeek.com/unofficial-bitx40-faq )

Jerry Gaffke
 

Crystal ladder filters tend to have a steeper skirt on the upper freq side than on the lower freq side as Tim suggests.
See fig 3 here:  https://www.arrl.org/files/file/QEX_Next_Issue/Nov-Dec_2009/QEX_Nov-Dec_09_Feature.pdf
Other than that, I disagree.

I'd say that unless other factors override this, the BFO frequency is better off above the crystal filter
to get maximum opposite sideband rejection, using the sharper skirt on the upper side. 
This also maximizes carrier suppression, though with a balanced modulator this may not be
a primary consideration.  Once you get rid of the opposite sideband, you can shape the signal
further with audio filters, though this generally isn't needed.

With the 6 pole crystal filter on the uBitx, both skirts are fairly sharp, much better than the Bitx40.
So having the BFO above or below the crystal filter works well enough.

A second consideration is that the local oscillators should be above the intermediate frequency.
On the uBitx, we have the VFO above the 45mhz first IF, for a 7.2mhz signal the VFO is 7.2mhz above 45mhz.
With the high side VFO, all VFO harmonics are up in VHF and beyond, and products of those harmonics are
more easily gotten rid of. 

On the uBitx, clk1 would best be 12mhz above the 45mhz first IF, to create a 12mhz
signal into the second IF.  However, on the uBitx we have the further issue of Nano 16mhz and 12mhz oscillator
harmonics mixing with BFO harmonics, creating those audio tones the some posts here have complained about,
so we leave the BFO below the 12mhz crystal filter and use have clk1 above 45mhz for USB, below 45mhz or LSB.

Jerry, KE7ER


On Fri, Mar 16, 2018 at 01:00 am, Tim Gorman wrote:

One thing to remember is that crystal filters have always been
considered to be *upper* sideband filters primarily.

They don't have infinitely steep firewalls at each end of the bandpass.
Think of a crystal filter having a slope of 60deg on the low frequency
side and a 45deg slope on the upper frequency side. It's not that
bad but it illustrates the point.

The filter works best when the carrier is on the low frequency side of
the crystal and the audio is above the carrier. The high frequencies in
the voice are usually lower in power anyway so the increased slope on
the upper frequency side of the filter still provides adequate
attenuation.

If you switch and put the carrier on the upper frequency side of the
filter and the audio lower in frequency than the carrier then you are
using your filter where it works the worst. It's not so bad for
transmitting other then it doesn't suppress the carrier as well but for
receiving it tends to let low frequency noise *and* signal through more
than if you use it as an upper sideband filter.

Tim Gorman
 

Jerry,

Of course you are correct. I plead sleep deprivation at 3am and a
faulty memory. The low side is the one with the worst slope.

I have had a chance to go back and look at my notes since then.
According to my notes when I was building crystal filters show that
having the steepest slope on the high frequency side of the audio
provides the best bandwidth restriction in the received signal, ie.
cutting interference and noise. The low audio frequencies are typically
attenuated in the transmitter mic circuits by using lower value coupling
capacitors, i.e. high pass filtering. So the crystal filter is not as
important for attenuating the low frequencies in the received signal.

And you are correct about balanced modulators today. The filter doesn't
need to provide nearly the amount of carrier suppression as in the
"old" days.

I still believe Ashar has made the best overall choices in the way this
rig is designed.

tim ab0wr

On Fri, 16 Mar 2018 11:22:45 -0700
"Jerry Gaffke via Groups.Io" <jgaffke=yahoo.com@groups.io> wrote:
Crystal ladder filters tend to have a steeper skirt on the upper freq
side than on the lower freq side as Tim suggests. See fig 3
here:  https://www.arrl.org/files/file/QEX_Next_Issue/Nov-Dec_2009/QEX_Nov-Dec_09_Feature.pdf
Other than that, I disagree.

I'd say that unless other factors override this, the BFO frequency is
better off above the crystal filter to get maximum opposite sideband
rejection, using the sharper skirt on the upper side. This also
maximizes carrier suppression, though with a balanced modulator this
may not be a primary consideration.  Once you get rid of the opposite
sideband, you can shape the signal further with audio filters, though
this generally isn't needed.

With the 6 pole crystal filter on the uBitx, both skirts are fairly
sharp, much better than the Bitx40. So having the BFO above or below
the crystal filter works well enough.

A second consideration is that the local oscillators should be above
the intermediate frequency. On the uBitx, we have the VFO above the
45mhz first IF, for a 7.2mhz signal the VFO is 7.2mhz above 45mhz.
With the high side VFO, all VFO harmonics are up in VHF and beyond,
and products of those harmonics are more easily gotten rid of. 

On the uBitx, clk1 would best be 12mhz above the 45mhz first IF, to
create a 12mhz signal into the second IF.  However, on the uBitx we
have the further issue of Nano 16mhz and 12mhz oscillator
harmonics mixing with BFO harmonics, creating those audio tones the
some posts here have complained about, so we leave the BFO below the
12mhz crystal filter and use have clk1 above 45mhz for USB, below
45mhz or LSB.

Jerry, KE7ER

On Fri, Mar 16, 2018 at 01:00 am, Tim Gorman wrote:



One thing to remember is that crystal filters have always been
considered to be *upper* sideband filters primarily.

They don't have infinitely steep firewalls at each end of the
bandpass. Think of a crystal filter having a slope of 60deg on the
low frequency side and a 45deg slope on the upper frequency side.
It's not that bad but it illustrates the point.

The filter works best when the carrier is on the low frequency side
of the crystal and the audio is above the carrier. The high
frequencies in the voice are usually lower in power anyway so the
increased slope on the upper frequency side of the filter still
provides adequate attenuation.

If you switch and put the carrier on the upper frequency side of the
filter and the audio lower in frequency than the carrier then you
are using your filter where it works the worst. It's not so bad for
transmitting other then it doesn't suppress the carrier as well but
for receiving it tends to let low frequency noise *and* signal
through more than if you use it as an upper sideband filter.