A current slide presentation of this project is here (PDF).
Previously (March 2019 down this blog) I built a traditional SSB generator using a fixed frequency balanced mixer and xtal filter to pass only one sideband. Then mixed this again to the final output frequency of 7MHz.
The objective of this development is to make an SSB exciter which generates directly the SSB digitally using a pair of mixers.
PHASING
This is a development following the "Phasing Method" of SSB generation, which has been around for many years, but has been made easier by the introduction of RF synthesisers and audio signal DSP.
Phasing system SSB generation, AF & RF 0/90degree signals
This method of SSB generation has two parts, the first is to find a way to provide audio signals with a 0/90 degree phase shifts and then two signals at the RF output frequency with 0/90 degree shifts.The challenge is to generate these two pairs of signals AF & RF.
The RF side has traditionally been generated in many SDR designs by using a digital synthesiser (Si570 or Si5351) running a x4 the output frequency, followed by a /4 Johnson counter to generate the in-phase I and quadrature Q signals for the mixers. But with clever programming the Si5351 can generate two output signals, CLK0 & CLK1 with a 0/90 degree relationship.
The 0/90 degree audio is more of a challenge, that cannot be done well, without a lot of op-amps and high tolerance capacitors and resistors, across the full audio range of 300-3kHz, This has been solved with Digital Signal Processing techniques. Converting the audio to digital I2S then processing it mathematically, using what are known as Hilbert Transforms, and then converting back to analog.
I/Q VFO
First a VFO which outputs two signals "I" and "Q" which are always 90 degree shifted from one another, using an Si5351 synthesiser. The Arduino code for this is here (either FREQ_0_90_7100 for a fixed 7.1MHz output or VFO_SDR0_90 for a variable VFO) which has been implemented on a Nano driving a Si5351 over an I2C bus. Here's the result:
Si5351 outputs CKL0 & CLK1 drive in to 56R
Tuning, Step change
A MIXER
An active mixer can be built using 2 x SA612. Like this
Levels: L & R input 30mV max, use 8k2/560R attenuator from Teensy
The breadboard looks like this
Top: Si5351 driven by an Arduino Nano
Centre: the two SA612 mixers
FT37-43 "combiner" transformer 10+10t
This is the test 0/90 audio input from MacOS "osilloppoi" app.
Audio L & R inputs at 0/90 deg 1000Hz
This mixer has a reasonable carrier rejection of around 30dB.
SDR RX tuned to 7100kHz, 1000Hz modulation USB
The SA612
- I & Q inputs are 240mVrms (about +1dBm)
- L & R audio is 30mVrms
- RF output into 56R is 100mV p-p (approx -15dBm).
The SA612 has an input impedance of 1k5. The Teensy Audio Adapter has been set for unity gain (MIC gain "0", LINE output setting "25"), and a maximum MIC input is 500mV. The output uses a 8k2/560R attenuator to feed the L&R signals to the SA612s. The Adapter LINE output levels will be adjusted on test for best opposite sideband suppression.
The FDM_DUO SDR, iMac running Windows 10 and with FDM-SW2 SDR software, looks like this
ALTERNATIVE MIXER
I have been investigating and alternative to the SA612s mixer. This is a passive design using two of the SBL-1 Mini-Circuits mixers. The choice of which to use depends on the input and output impedances,
This is the SBL-1 mixer, which is deceptively simple,
2 x SBL-1 mixers
The Teensy Audio Adapter LINE out is specified with a load of 10k, up to 3.18Vp-p, 1.14Vrms
The SBL-1s work at 50R impedance in and out, but the "IF" AF input is very low impedance, I use a series resistor of 120R but it cannot be driven directly by the Audio Adapter. So two buffer +10dB amps are needed,
1 x MCP6002 op amp, +10dB gain
The microcomputers are,
- the Nano and Si5351 synthesiser, this is very simple with just four connections to the Si5351
Nano and Si5351 synthesiser
- the Teensy & Audio Adapter, also very simple with the Teensy mounted on top of the adapter board
Teensy mounted on top of Audio Adapter
with USB/LSB switch (volume control connections to A1)
The software is the key thing! The sketch for the Nano FREQ_0_90_7100 is here, and for the Teensy TEENSY_TX here. Download also the libraries from here. In particular you will need the Audio library for the audio processing and the oled header for the OLED display formatting together with the u8g2 display library.
I will generate some audio I/Q signals with 0/90phase difference using DSP techniques running on a Teensy 3.2 board with its associated audio board (rev C) designed by PRJC, available from HobbyTronics.
Teensy 3.2
Teensy Audio Adapter Rev C
The Teensy has a number of connections on the back side as well as the 28 pins along the sides and 5 on the end. It has its own DAC input, but no ADC outputs, so you have to use the stereo I/O Audio Adapter.
These are the pinouts and signals of the Teensy,
Bottom view
Top view - pin functions
The connections to the audio shield are
Bottom view
WARNING: the HP ground (VGND) is not the shield ground (GND),
do not connect them together!
Do not use the HP output to drive the mixers!
This will destroy the device (I know, I did it)
LINE IN and LINE OUT L & R at the top, microphone direct input is on the right along with the 3.5mm Headphone jack at the bottom on the other side. The pins connect directly to the Teensy 3.2 as follows
Top view
The unused analog and digital pins of the Teensy may be used in your application. The Teensy Audio Adapter has an output of up to 500mVrms, and uses an attenuator of 8k2/560R to drive the mixer L&R inputs at 30mVrms.
SSB GENERATION
The DSP needs to produce the 0/90deg phase shifted audio signals. It is done like this,
Block diagram
Instead of a single 90deg Hilbert Phase Transform two are used with +45 & -45deg phase shifts (two are used rather than a single 90deg to maintain the same time delay through both I and Q paths). The Out I is non-inverted for LSB output or inverted for USB output by the mixer. An alternative would be simply to changeover the +45 for the -45 transforms (in software, of course).
A design tool from PRJC, the Audio System Design Tool, is used to generate the Teensy code objects and interconnections ("patchchords") for the application, this designed using a graphic interface to draw the configuration,
The simple configuration
Each block is dragged from the left side menu. The stand alone block sgtl5000_1 is the board itself and must be present to allow software instructions to configure the input & output codecs. The other blocks are ones that are interconnected. The design tool is used to export auto-generated code, which defines a series of libraries objects with generated names to be configured later in the code, and interconnections,
Auto generated header code for the configuration above
This code can then be used directly in the application. If you look at the TEENSY_TX sketch you will see this basic outline. In addition in the sketch you can see the setup code of the blocks and the sgtl5000 itself.
The Hilbert Transform coefficients, 16bit signed integers are needed, are generated using the Windows program Iowa Hills Hilbert Filter Designer.
Calculated HT filter response
The for a 300Hz to 3kHz BW (-3dB), wide enough for FT8, parameters are set as follows,
1. Menu > Passband > Phase Added
2. Frequency 44117 (audio sample frequency of the Audio Codec)
3. Fc = 1.65kHz (0.0747)
BW = 3.0kHz (0.1360)
TAPS = 70
4. Two versions will be generated for +45deg and -45deg phase
5. Chose Kaiser window
6. For both +45 & -45, File > Save Coefficients in temporary files (I saved these coefficients as text files 45p.txt and 45m.txt)
The generated coefficient ".txt" files can be eventually be used as arrays in the TEENSY_TX sketch code.
BUT FIRST they must be converted to the right format. The Teensy code FIR filters need a pointer to an array of "short" values (Teensy is a 32bit processor, so a short is a 16bit signed integer). The output of the IOWA HT app is a list of "float" 18 point decimal numbers. Which have been saved to temporary files (45m.txt and 45p.txt). Like this
Hilbert Transform coefficient IOWA program output values
The first thing to do is import these text files (one by one) into a spreadsheet, then export them as two CSV (Comma Separated Variable) files. Next paste them into the sketch called Convert_45 here and use it to convert them to 16bit "short" arrays needed for use in the Teensy sketch. These are output on the Arduino IDE Monitor Screen.
The output is two (plus & minus 45 degrees) completely formatted arrays.
The two HILBERT_COEFFS (70) coefficients converted to "short" value arrays
These two complete arrays are then copy & pasted directly into the actual TEENSY_TX sketch
PUTTING IT ALL TOGETHER
On the bench this is it,
Left: Nano
Middle: Si5351, SBL-1 mixer and audio buffer amps
Right: Teensy and Audio Adapter
The Arduino Nano is programmed to drive the Si5351 over an I2C bus (SCL/A5, SDA/A4). The output drive is set at 2mA giving about 0dBm on the SBL-1 inputs. The SBL-1 outputs are combined with a BN43-2402 combiner. The Teensy has a mono microphone inputs and two line outputs -45/+45 deg phase shifter, and is filtered to 300Hz-3kHz. A x3 (+10dB) AF amplifier increases the Audio Adapter output drive to the mixers.
RESULTS
These are screen shots from my SDR receiver. 3kHz filter bandwidth, 7.1MHz. Using a fixed 7.1MHz frequency VFO sketch FREQ_0_90_7100 here.
1.5kHz tone input,
USB breakthrough -40dB
Calling CQ with MIC input
DSP filter could be narrower
The RF output from the mixer is about -20dBm (10-30mV).
I have tested the SSB exciter on 40m through 10m and it seems to work well. It does not work so well on 80m as the RF 0/90 output from the Si5351 is not accurate and there are both sidebands on the output.
A couple more photos, showing the addition of a rotary encoder for tuning and an OLED display of the frequency, using the VFO_SDR0_90 sketch here.
OLED display
Mixer board
Teensy & Audio Adapter
Arduino Nano
Mixer board with Si5351 synthesiser
OLED display
AUDIO LIMITER/COMPRESSOR
The SGTL5000 IC has some built-in DSP functions of its own. These include and auto-volume control and EQ filters.
Obviously these would both be useful for processing the MIC input. But so far I have failed to get them going. I will continue to work on it.
ACKNOWLEDGEMENT
Acknowledgement to ZL2CTM for educating me in this effort. See his videos here
No comments:
Post a Comment