Sunday, February 11, 2024

Homebrew SBITX Receiver - Ground Bounce, Hallucinations and Wisdom

 


After a long hiatus I am back at the blog.  I have a number of projects that I have been working on that I will share going forward, but today I want to talk about my latest project - a homebrew version of the SBITX transceiver designed by Ashhar Farhan.  The SBITX is a hybrid analogue superhet transceiver / software defined radio.   The analogue portion of my build is based on the Furlough 40 / SimpleSSB that I built in 2020.  The SDR software runs on a Raspberry Pi 3 or 4 with software written by Farhan.    I'll explain the title of the post before we are done today but first lets take a look at the KK4DAS SBITX.

Here is a demonstration made shortly after I completed the receiver:




For a quick overview of how it works, lets look at the block diagram.





Beginning with the antenna on the upper right let's follow the received signal path.  First we pass through a single 30 MHz low pass filter which passes the entire HF band.  We amplify the incoming signal with a broad band RF amplifier and then pass it through and ADE-1 mixer to mix the signal up the the 40MHz IF.  The LO and BFO clocks are provided by an SI-5351 PLL controlled by the Raspberry Pi.  The homebrew 40MHz crystal ladder filter is 25KHz wide which controls how much of the spectrum you can see on the waterfall display at any one time. The bidirectional IF board I am using is the first board I built for the SimpleSSB at the beginning of 2020.  I have replaced the 9MHz commercial filter with my homebrew 40MHz filter.  The second mixer then drops the signal to a 24Khz IF which is well within the range of the ADC in the codec board. From the second mixer we go through a low noise amplifier to boost the signal and pass it in to  the left line-input channel of the codec. The 24KHz signal is digitized in the codec and passed on to the Raspberry Pi where further signal conditioning and filtering occurs, the waterfall display is generated and the digital audio is extracted.  The digital audio is sent back to the codec where the digital to analog conversion occurs and the analog signal is sent out the left line output to headphones or to an amplified speaker.   The SBITX software also supports FT8, RTTY and CW decoding natively - no additional software or computer is needed.  For a detailed description of the SBITX you should read Farhan's SBITX description linked above.  Transmit will work much the same but in reverse.  I'll cover that when I get the transmitter implemented.

I'm very happy with how the receiver is performing. Its fun to listen to and sounds great.  But getting to this point has not been without a few stumbles and sidetracks.  I was honored to be included as a guest on the SolderSmoke Podcast Episode #250 with N2CQR, Bill Meara and N6QW, Pete Juliano where I shared my tales of woe - a few of which I will describe here in more detail and a others which I will save for another day. 

Ground Bounce - shortly after completing the receiver I made the unsettling discovery that signals that were being transmitted on 20 meters were being received on 20 meters but also at exactly half the frequency on 40 meters. This was not good - it seemed that it had to be strange mixing products in the first mixer, but I had tested the entire IF before hooking it up to the digital board - and this very same IF board was pulled from a working receiver. I looked at the output of both mixers and I couldn't see how the the 20 meter signal was leaking in on 40.  After thinking about it for a bit I decided to look at the SI5351 outputs on my TinySA Ultra spectrum analyzer and instead of seeing one clean signal on each of the LO and BFO clocks I saw both signals on both clocks.  This was clearly the source of my problem.  Skipping over a day or two of troubleshooting I sent a note to Farhan and he immediately identified the problem.  It was "ground bounce.  Apparently if the clock outputs are not properly grounded it causes current to rise internal the SI-5351 and signals to bleed between the clocks.   In following a separate piece of advice from Farhan on buildiing the digital board I had very carefully insured that there was one and only one ground connection in the digital board and that was directly back to the main DC input.  I had installed the SI-5351 directly onto the digital board and it shared that common ground.  But that meant that I couldn't also ground both ends of the coax shield between the SI-5351 and the mixers.  That was the cause of the ground bounce.  The solution was to remove the SI-5351 from the digital circuit and put it on the analog circuit - with the only connection between the SI-5351 and the Raspberry Pi were the two I2C control lines.  And also to ground the coax connecting the SI-5351 and the mixers at both ends.  That fixed it - the ground is no longer bouncing!

Hallucination - after curing the ground bounce I spent an evening listening to the rig enjoying the glow you get after fixing a thorny problem.  But my enjoyment was short-lived.  I noticed that from time-to-time that the waterfall display would go a little crazy,.  It appeared as if the the receive signal was being duplicated all up and down the band somewhere internal to the SBITX.   It looked like this:



The signal at the center is the received signal - all of the mirror images are false.  Those are the hallucinations.  Farhan identified that fairly quickly and let me know about a software fix in the SBITX 3.2  which led me to:

Wisdom - I don’t have a complete understanding, but the hallucinations are artifacts created during the Fast Fourier Transform of the received signal under certain circumstances.  The SBITX uses the open-source FFTW (Fastest Fourier Transform in the West) library.  There is an extension to the FFTW library called FFTW-Wisdom that is used tune the FFT algorithm the first time it is used.   The tuning  parameters are saved in what is known as an FFT “Wisdom” file .  The Wisdom file, which only has to be computed one time, contains saved information about how to optimally compute Fourier transforms of various sizes. The FFTW Wisdom File man page has more details.  That was what was implemented in SBITX V3.2 which eliminated the hallucinations.

I'm still chasing a few problems in the receiver.  Top of my list is a tuning problem. When I zero beat WWV on exactly 10 MHz, the displayed frequency on the SBITX is a few hundred Hz off of 10MHz, and when I tune to 15MHz WWV the display is off by a different amount. So, the delta between the displayed frequency and the frequency the radio is receiving changes with frequency – but not in any linear way.  I’ve tried several different ways to align the radio but have not yet been successful  The last thing I did was disconnect the analog receiver entirely from the SDR and used a signal generator to put a fixed 24KHz signal into the audio codec which should result in a signal displayed dead center on the waterfall – but it did not – it is a few hundred Hz off.  the current suspicion is that the crystal on my WM8731 protottype board is out of spec.  Farhan has offered to send me one of the codec boards he produced for the early SBITX prototype.  When that arrives, I will replace my audio codec with the one he sends.  That should resolve this last issue but it still doesn’t explain why the delta moves with HF frequency.  That’s what was puzzling me and what I was referring to on the podcast. 

That's it for now,

73 from Great Falls
Dean
KK4DAS