- Softrock 6.3 Project - An all band HF Transceiver, using the Softrock RXTX v6.3 kit as a basis


Back to main page

Status:    September 2009 stable (latest update 2011-01-16, added a picture from Alex, RN6LW, showing his very nice SDR build, including the ATmega168 controller)

(Note also the new Project page on the
Mobo 4.3 Project, which describes a more advanced version of the Transceiver described on this page)

An all band transceiver has been built based on the Softrock 6.3 transceiver kit,  including the following modules:
  • a homebrew 20W Power Amplifier using a pair of RD16HHF1 transistors,
  • a homebrew ATmega168  based microcontroller board for USB control (compatible with a modified Arduino Diecimila),
  • firmware for the ATmega168 microcontroller, based on the DG8SAQ / PE0FKO firmware for ATtiny45, but expanded to include:
    • Automatic Low Pass Filter switching based on the Si570 frequency selected,
    • Automatic fast acting hi-SWR protection for the Power Amplifier.
    • LCD display for Frequency and Power/SWR readout, including bargraphs, autoranging and PEP measurements with adjustable sampling period
    • Variable (dual) speed VFO, using a Rotary Encoder
  •  the 9V1AL Motherboard, version 3.6 (kit),
  • a homebrew Power/SWR head which integrates with the ATmega168 microcontroller and firmware
  • switchable LPF filter bank (kit).
Some minor tweaks and improvements are still under way.
The end product is an all band & all mode HF SDR Transceiver, using a PC with a 24 bit audio card for the IF engine.  Software examples:
    • FlexRadio PowerSDR (various versions, PE1NNZ, SV1EIA)
    • VE3NEA's Rocky (current version 3.6)
A picture of the Transceiver:

(click on picture to enlarge)




The project is a mixture of a couple of commercially available kits and some home-brewed elements.  Full description below:

 

Here is a picture of the transceiver without the homebrew 20W PA, LCD display and VFO.  These are shown further down the page.
  On this picture, the SR 6.3 board is hidden underneath the left half of the 9V1AL motherboard (mobo).  Under the right half of the mobo and visible in the lower right hand quadrant is the Low Pass filter board.  The "hacked" Arduino diecimila can be seen in the lower left hand quadrant.  The little addon board is a bcd decoder for the low pass filter switching.  The two blue relays are for TX/RX switching, to allow for the Power Amplifier.  In this early version of the transceiver, the 9pin D connector on the back is for RS232 control of the transceiver.  In the most recent incarnation, this connector has been rewired for direct access to the ICSP connector on the microcontroller board, for easy update of the firmware.
(click on picture to enlarge)
 

 
  • Softrock RxTx + Xtall v 6.3 SDR Transceiver, the basic building block

(this sub-section last updated 2009-06-13

an inexpensive, easy to build SDR transceiver kit, by Tony Parks, KB9YIG.

    Here are some Transmitter IMD measurements for the Softrock 6.3.  The really interesting bit is that these measurements were not made using a super expensive Spectrum Analyzer.  They were made using the DG8SAQ VNWA in SA mode, enhanced with the Spectrum Lab software (DL4YHF) configured to act as a 25Hz wide BPF at 10kHz.  The measurements show the 3rd order IMD to be about 40dB below the two tone signal at 250mW output, 25dB at 1W.  At 1.65W it has fallen to 12 dB, and the overall signal has become several kHz wide. 

    It is clear that for SSB or the digital modes, the SR6.3 should not be set for much more than about 250mW out.  250mW drive produces about 10 - 14W with my 2x RD16HHF1 amplifier (described below).  I am thinking of replacing the SR6.3 PA stage (2N2222 and 2x BS170 Push Pull stage) with a single RD06HHF1 amplifier.  According to tests and prototyping by KF4BQ, this will produce a linear low IMD output of over 1W and max output of more than 4W.
      
  • 9V1AL v3.6 Motherboard (Mobo 3.6) for all band  HF coverage (160m through 10m)

The 9V1AL Motherboard (MoBo) is a plugin addition to the Softrock RxTx v. 6.3 transceiver kit, you guessed it: designed by Alex, 9V1AL.  This plugin board turns the Softrock into an all band transceiver, minus the control functions and TX low pass filters which need to be provided by additional modules.  A description of the MoBo can be found in the Yahoo softrock40 group, files section, 9V1AL.
     
  • Project: - USB controller based on the ATmega168 microcontroller

    (this sub-section last updated 2010-04-20, final... if there is such a thing.  Latest update: some refinements to the LCD display)

    The QRP2000 Synthesizer Project (G8BBL, DG8SAQ, M0PUB) developed the original USB controller firmware for an ATtiny45 microcontroller, to provide USB-Control of the Si570 chip.  The DG8SAQ code has since been rewritten and improved by Fred, PE0FKO, adding band pass filter control and other goodies for the Softrock 9.0 SDR receiver. 

Alex, 9V1AL has developed a functional clone of Freds firmware, using the Sparkfun USB Bit Whacker board (UBW). The UBW has more I/O pins available than the ATtiny45, and provides the additional functions necessary for a transceiver, such as LPF control for TX, etc. 

As I had an Arduino Diecimila microcontroller board collecting dust in a half forgotten place, I decided to see if I could adapt this board for use by the Softrock 6.3.  The Arduino uses an ATmega168, a  microcontroller of the same family as the ATtiny45, but with 20 additional general purpose I/O pins.  In summary, I started off with a hacked Arduino board, a perfectly good solution capable of supporting all the functions necessary, but somehow I ended up building my own dedicated microcontroller board.  Three alternate hardware solutions are shown and discussed further down this page.

Firmware for the ATmega168:
The ATmega168 firmware is built on top of and compatible with  version 15.12 of the PE0FKO ATtiny45/ATtiny85 code for the Softrock 9.0 receiver.  All added functionality has been made through extensions to the original code which provides for frequency control for the Si570 programmable oscillator and switching of bandpass filters for receive, based on frequency selected. The latest upgrade of the firmware incorporates most of the features included in the
Mobo 4.3 firmware and should be fully compatible with any software that utilizes the extended Mobo 4.3 command set (less the autobias function, which is not implemented in the Mobo 3.6).

The ATmega168 firmware provides the following functionality:
  • USB control of the Softrock 6.3 and extensions, compatible with software such as Rocky and some flavours of PowerSDR
  • Frequency control of the Si570 Programmable Crystal Oscillator, including "smoothtune" for seamless tuning.
  • Variable speed VFO, using a rotary encoder, and 9 short/long term memories, using a pushbutton (cycle with short pushes, store with long)
  • CW Paddle inputs
  • PTT output
  • PTT2 output (connected to SWR protect function)
  • Automatic switching between 4 BPF filters for receive, based on selected frequency (can be expanded)
  • Automatic switching between 6 LPF filters for transmit, based on selected frequency (can be expanded)
  • Continuous rapid Polling (10ms) of two 10 bit A/D inputs for Power forward, and Power reverse measurements +  SWR calculation
  • SWR Protection.  Two PTT output pins.  The second PTT output is automatically disabled within 40 milliseconds if monitored SWR goes above a certain user settable value (connect to the Bias circuit of a Power Amplifier)
  • PEP indication for power output, shows the highest measured value within a user adjustable time window of up to 2 seconds (10 samples per second).
  • LPF/BPF filter switchpoints, SWR trigger and Powe calibration can be user modified by USB command
  • LED indication of whether firmware is running and USB traffic
  • LCD display for Frequency and Power/SWR readout, including bargraphs, autoranging and PEP measurements with adjustable sampling period
  • Variable (dual) speed VFO, using a Rotary Encoder and a switchbutton for band change

As of now, there is only one GPIO pin left.  This pin can be used either for a 10bit A/D sampling, or I/O.

Here is the current version of the firmware, including all source code. (latest version date: 2010-04-20)

The latest firmware update includes Power and SWR metering + high SWR protection functionality by automatically pulling the PTT2 pin down within one tenth of a second if measured SWR goes above a settable value.  This version also includes an optional LCD display and Rotary Encoder VFO (both can be enabled through USB command 0x60, or by modifying the relevant #define in the _main.h file). 

Examples of new USB commands include:

  • 0x60: Feature Select (LCD display on/off, Rotary Encoder on/off)
  • 0x61: Read analog inputs (P_out & P_ref)
  • 0x66: Read/Modify SWR measurement and SWR alarm related values 6 items
  • 0x67: Set the Encoder Resolvable States per Revolution for 1kHz tune per Rev
  • 0x68: Display a fixed frequency offset during RX only
  • 0x7F: Direct commands to I2C connected LCD display (address change, contrast/brightness)

A detailed description of all commands can be found in the Readme.txt file included with the firmware.

The ATmega fuse settings are the same as in the Arduino:  0xff 0xdf 0xf8.


MoboControl is a Python script that can be used to read the measured Power and SWR from the ATmega168 firmware. This script was written to support the functions of the Mobo 4.3 firmware.  However it is perfectly useful for the ATmega168 firmware as well, as can be seen on the below picture which shows version 05 of the script, polling the transceiver described on this page.  The script provides access and control of firmware parameters such as frequency, power/SWR, power meter calibration, power sample window adjustment as well as BPF and LPF crossover point adjustment.  It can be used to calibrate the Si570 to a correct frequency as well.  As can be seen on this picture, there are some big empty spaces, which in the case of the Mobo 4.3 are populated with various widgets that my Mobo 3.6 based transceiver does not support.  The Python script is easily editable and is cross platform capable, runs on both Linux and Windows computers.  Because of its simplicity and easy readability, it also provides clear examples for any would-be programmers that would like to support the USB command protocol used by the Mobo.


This is a "growing" script, and any input for improvements or added functionality are most welcome.  To run the script on a Windows Computer, Python v 2.6.4 needs to be installed, the PyUSB package (v 0.4.2), wxPython for Windows as well as the PythonCard package.  An alternate method is to download and install the precompiled Windows Installer Package, which includes all the elements necessary, but is not editable.  The latest version of MoboControl (python scripts and Win Installer) can be found on this page.

Hardware Solution 1: 

Here is my first generation controller, perfectly functionable, using an Arduino with a few traces cut and some deadbug construction.  A BCD-decoder has been added to select low pass filters.  This is how everything is connected together.

Hardware Solution 2: 

(picture and layouts updated 2009-09-06)

An elegant ATmega168 PCB has been drawn up and built by Ken, K9FV.  This solution consists simply of the ATmega168 chip, a 16 MHz crystal, a BCD counter, a Relay driver chip, a few resistors, capacitors and zener diodes.  The PCB is double sided but it is easy to home fabricate, the majority of the traces are on the upper side of the PCB.  Only a couple of traces are used on the underside and very few holes need to be drilled.   Alternately a single sided PCB can be used, copper side up, and three or four wire jumpers to replace the under side traces.

Below is a picture of the K9FV version of the ATmega168 controller

(click on picture to enlarge)

Here are the Schematic, the PCB layout, and the PCB layout mirrored in real size for fabrication.

Hardware Solution 3:

This solution utilizes a double sided board, making all possible pins on the ATmega168 available and includes an ICSP header for easy programming.  This board, designed by using the KICAD (freeware) software, is 4.8x5.8cm in size.  It was a bit of a nightmare to populate the board and solder pins on both upper and under side with my trusty old 30$ soldering iron.  Makes one appreciate commercially made boards with all through holes plated and connecting between the two sides :)

Diagram is here:

(click on picture to enlarge)

 
Here is a picture of the prototype.  It is a bit messy, but I will use it as is.
(click on picture to enlarge)

The final PCB layout, including a couple of improvements over the prototype is here (both sides, lower side mirrored) and here (upper side mirrored)Here is a KICAD screenshot showing both sides in an X-ray view.

Here is a much much nicer version of the ATmega168 controller, layout and build by Alex, RN6LW:
(click on picture to enlarge)

And here is a full SDR transceiver built by Alex, RN6LW, including the ATmega168 controller:
(click on picture to enlarge)
  • Project: - Firmware for an AT90USB162 based microcontroller to control the next generation of the transceiver, the Mobo 4.3

This project has now been moved to its own page, describing the Mobo 4.3 Project.


  • Project: - A Computer readable Power / SWR Meter

    (this sub-section last updated 2009-06-14, design is stable)
A transceiver needs some form of Power out and SWR indication; a software driven (rather than defined) radio needs a software accessible meter.  I decided on a Stockton bridge (tandem match coupler) as it needs practically no calibration whatsoever.  KD1JV has an excellent design which I'm using unchanged. 

It can be argued that the added complexity of the opamps and schottky diode offset compensation in the negative feedback loops are an overkill, that a compensation for the detector diode voltage offsets could just as easily be done in the firmware.  I have decided to use this circuit as is though.  All in all, a SWR bridge capable of sub-mW measurements may be an overkill, but it is not a bad thing :)

As the A/D reference voltage in the ATmega controller is set to 5V, full scale for this circuit is about 50W.  If one wants to change the meter sensitivity for the ultra QRPP or QRO, this can easily be accomplished by altering the number of turns of the secondaries in the transformers T1 and T2.  Enough said.  A detailed description of the design can be found on KD1JVs webpages.


Here is the schematic.  It connects to P9 on the ATmega168 uController board described above.
Here is a picture of the Power / SWR meter connected to the ATmega168 uController:
(click on picture to enlarge)

The PCB is doublesided, only upper side is etched.  Final and slightly modified / improved PCB layout from the one shown in the picture above is here (normal view) and here (mirrored).

     

  • Project: - HF Power amplifier, 20W, using 2x RD16HHF1 Mosfet.

    (slight update on 2009-08-03 shown as highlighted, design is stable)

    Project:  Dual Mosfet push-pull stage, broad band, 160 through 10m, utilizing low-cost RF transistors.

    The Mitsubishi RD16HHF1 transistors were selected for this project due to their ready availability, relatively low cost ($4.20 each), linearity, and last but not least, there are many success stories with the implementation of these devices. Granted, I could simply have copied one of the many successful designs out there, such as the G6ALU design, the HPSDR Pennywhistle design etc, but I find great fun in falling flat on my face into all the pits myself.

    The RD16HHF1 are specified for 16W output and to tolerate a SWR of 20:1 if the drain to source voltage is kept at 15.2V or lower. They are true RF devices (unlike the IRF-510), very easy to work with, no surprise smoke tests on the workbench.  Little thought needs to be given to frequency compensation, no negative feedback is needed for stability, AND they appear to be indestructible when operated within parameters.

    These transistors, while specified as 16W output each, cannot be expected to provide much more than about 20W maximum when operated within linear range in a Class AB broadband push-pull configuration.  Maximum output power levels of between 23W (30m) and 31W (80m) were measured with the design described below, with the power supply voltage set at 13.8V.  In my tests, I was limited to the max power output of my Softrock 6.3 + the 9V1AL Motherboard V3.6, typically being about 1W; 2W out on 80 and 30m. Increasing the power supply voltage by a few volts will increase the useful power output quite a bit, note though the rather low specified maximum drain to source voltage for these devices, 50V.

    Below is a picture of my Softrock 6.3 transceiver, including the 9V1AL Motherboard and my  Power Amplifier.  The pencil is there to give perspective.  The PA PCB is 60 x 83mm, on top of a heatsink that is 75 x 105mm. 

(click on picture to enlarge)
 
Here is a schematic of the amplifier:
(click on picture to enlarge)
A good PCB layout is critical for performance.  In my initial layout I made the stupid mistake of mirroring the pinout of the RD transistors, fixing the mistake with ugly mode wires.  I got almost a full 1dB (0.8dB) of performance improvement using the better layout of my second/final PCB. 
 
Here is the final PCB layout in Adobe Acrobat (PDF) format.  The PCB is double sided, the underside is unetched.  There is only one wire jumper, from the Drain of Q3 towards the transformer T3, jumping over the Gate and Source connections of Q2.  It can be seen in red on the PBC layout.  The sources of Q2 and Q3 are connected to the underside of the PCB by 3 vias each, drilled through the PCB.  A number of vias have been drilled to connect to the underside.  Note that the there is a slight discrepancy between the PCB layout and the schematic above.  The PCB layout shows two caps in parallel, connecting between the output transformers and the RF out connector, these are numbered C12 and C13 on the PCB layout.  In my final version of the diagram, these were found to give limited benefit, and thus eliminated (shorted).  I have seen one report since of a project using a pair of RD15HVF1 and copying the output transformer arrangement I use, where 1200pf in series with the transformer outputs improved the performance of the amplifier significantly on 6m, achieving about 15W out.  Without having pulled out the calculator, I imagine that while probably not affecting 80m much, this would seriously degrade performance at 160m.  There will always be tradeoffs.
 
A clean version of the PCB layout file is here for anyone interested in etching a PCB (note the unreasonably tiny trimpots, see picture below :).
 
Below is a picture of the final PCB.  The SMDs and the trimpots were soldered using the heat gun and solder paste method, the resistors, transistor and regulator were soldered the conventional way.  The apparently random solder splotches are Vias to the unetched underside of the PCB.  On this picture, the power transistors and transformers are yet to be added.  For those very observant, the attenuator pad was changed from what is shown in this picture.  The two output capacitors in parallel have also been eliminated (shorted).
 
As can be seen, I was having some fun using super small (3mm) surface mount trimpot resistors for the bias adjustment, just because I could.  Can you see them on the picture below?  Yes, just below the three SMD caps in the upper right quadrant.  Some might claim that they are unreasonably small.  Note also the large unused space in the lower right quadrant of the PCB :)
(click on picture to enlarge)
 
The heatsink used is 2.4 C/W.  It does become quite warm if the amplifier is keyed at full power for a long time.  I did forget the amplifier on at 15W power output for about 20 minutes, and it survived.  This was one of those times I would wish I had a temperature probe, or maybe it's better not to know :)

The transistors are adjusted for 250mA bias each, by adjusting RP1 and RP2.  Be sure to start the adjustment with the gate voltage at 0V, or you might have a smoking surprise!! (not really, the max gate voltage is limited at 5V which may give up to 1A per transistor)

Some design history and measurements:
 
During the design phase, many different, even crazy configurations were tried for output impedance compensation and the output transformer arrangement in particular, including various single and dual core transformer approaches, using large and small toroids and binoculars.  This one was actually rather succcessful.  It was just esthetically too ugly to pass the test:
 
 
 
Here is one particularly crazy experiment.  An attempt to compensate for the Drain to Source capacitance of the RD16HHF1s.  Two 20nH chokes have been added to the Drains.  A misguided attempt, as 20nH is probably close to what you get anyway in the connection between Drain and the output transformers.  Needless to say that this had no effect on the performance of the amplifier at lower frequencies (as expected) and did worsen the performance at the higher frequencies (against hope). 
  
In the end, a dual in parallel, transformer approach similar to the G6ALU design was chosen.  BN61-202 were found to be a better choice than the BN43-202 cores.  The 61 material cores, which have lower permeability, appear to be less lossy and further away from saturation (don't get as warm as the 43 material cores) and they give a balanced result across 160 - 10m, with the performance being slightly down on 160m.
 
 I found that the wire type used in the primary and secondary turns of the output transformers was critical for good performance.  Because of skin effect at radio frequencies, it is essential to use multistranded wires, the more strands (equals more surface area) the better.  Performance variation of up to 1.5dB was noted based on the wire types used.  Below is a picture showing three equal winning performers.  For the primary I use 20 stranded silver plated wire (something out of my junk box, don't know the origin) with a thin teflon insulation.  Multistranded loudspeaker wire with the insulation removed will also work well, but care needs to be taken in not melting the insulation of the secondaries when soldering the transformer in place.  For the secondary, the three similar performing winners are: 4 strands of 30AWG Kynar (wire wrap) wire in parallel; 2 strands in parallel from an old flatcable for an IDE hard disk; 24AWG multistranded hookup wire.
(click on picture to enlarge) 
 
The RD16HHF1 transistors have a rather high input impedance with a substantial reactive component.  In my initial design, being overly apprehensive of this, I overcompensated and used a 6dB attenuator pad for the input.  After having received some good advice from Rob, M0RZF, I reduced the input attenuator pad down to 1.8dB, a more or less arbitrary value decided based on the resistors I had available in my junk box.  Below is an SWR sweep of the PA input.  As can be seen, the input presents a very good match to 50 ohms across the HF spectrum.
(click on picture to enlarge) 
Here is a graph showing the Power output at a constant 250mW input on 160/80/40/30/20/17/15/12/10m.  Note that the input signal was unfiltered and had a very significant overtone content on some frequencies and less on other frequencies.  The output signal on the other hand was always clean, as it was measured behind  5 or 7 pole Low Pass Filters.  Therefore, the fundamental frequency input power is overestimated in some cases, resulting in a too low output power measurement.  X-axis is in MHz and Y-axis is in W:
 A small signal gain measurement using my antenna analyser to provide an approximately 10dBm input signal to the PA:  This measurement indicated good flatness across the spectrum between 2 and 50 MHz, the gain being 12 dB at 2MHz, rising to above 14.5dB at 4MHz, topping at 20dB at 30MHz through 50MHz.
 
Here are a couple of graphs measuring the Amplifier linearity.  All measurements were done with 13.8V D-S voltage.  X-axis shows P-in (W), Y-axis shows P-out (W).
17m (18.070 MHz):
 
80m (3.525 MHz):
Notice the strange kink in the 80m measurement.  I redid this measurement a couple of times extra, as the results were strange.  The explanation is as follows:  When observing the input waveform in an oscilloscope, I noted an extremely high overtone content (-3dB or worse even) on 80m from the 9V1AL MoBo (which doesn't include any form of LPF).  The P-in measurement was a measurement of the total signal content, including overtones.  At the maximum power level, the signal from the MoBo started to approach a (slightly flat-topped) sine wave, therefore the power increase on 80m was greater than measured.  The output on the other hand was measured behind a 5 pole LPF, therefore not introducing any surprise errors in the measurement.
 
  • Relay switched Low Pass Filters, 160m, 80m, 60/40m, 30/20m, 18/15m, 12/10m. 

Due to me being too lazy to develop my own, I used a Low Pass Filter kit by K5OOR for his HF SuperPacker Pro project, also sold separately.  See http://site.hfprojectsyahoo.com/low_pass_filters

  • A few pictures of the Transceiver

(this sub-section last updated 2009-09-27)

(click on picture to enlarge)


The box is now full :)  It would not be easy to add anything and still maintain reasonable RF shielding between the different circuit boards:
(click on picture to enlarge)

Here I have an SWR bridge on top of the box to give some scale (yes the transceiver is not large).  This picture shows the transceiver pumping 20W out.  Power and SWR are shown in bargraphs to emulate an analog meter.  The bargraph refresh rate is 100ms, resulting in a reasonable facsimile of analog meters.  The bargraph scale is adjustable through Command 0x66.  On this picture the Power bargraph is set to full scale at 25W.  The SWR bargraph is full scale at 5.0:1, which should be good for most situations.  Full scale for the SWR digital readout is 99.9:1.  The lower case "p" in the digital Power readout indicates that this is a PEP measurement.  PEP measurement can be turned off or adjusted for a sampling period of between 200ms and 2s through Command 0x66.
(click on picture to enlarge)

This picture shows transmission under a high SWR condition.  The "A" at the end of the second line is blinking, indicating SWR Alarm.  Note the added sub-decimal point precision for power readings under 10W.
(click on picture to enlarge)


Web Site Hit Counter
Comments