Thursday, October 5, 2017

An FPGA SDR HF Transceiver, Part 11 -- Floobydust...

This eleventh and (I hope) final blog post in my FPGA SDR transceiver series is a collection of miscellaneous topics that do not warrant blog posts of their own.

In other words, Floobydust!

What?  You don't know what Floobydust is?

From my copy of National Semiconductor's 1980 Audio Handbook:
"Floobydust" is a contemporary term derived from the archaic Latin miscellaneus, whose disputed history probably springs from Greek origins (influenced, of course, by Egyptian linguists) -- meaning here "a mixed bag." 

With that mystery resolved, let's dive into this posting's potpourri of miscellaneous topics!

The FPGA SDR's Simulink File Download:

If you'd like to get a copy of the the FPGA SDR's Simulink model (Xcvr_SSB_AM_2p5.mdl), it can be freely downloaded from the following site:

Please read the following notes!!!

  • The FPGA SDR design utilizes a Waveshare Xilinx 3s500e Development Board.  (For more information on the design, start here:
  • The Matlab version that I used:  R2009b, along with Simulink.  Note, I purchased the "Home" version of Matlab and Simulink.  Purchasing the current "Home" versions should also allows you to download previous versions, such as R2009b.  At least, I could download (for free) previous versions after I purchased my "Home" version several years ago.
  • The Simulink Model file (Xcvr_SSB_AM_2p5.mdl) is THE design file.  All other files are ancillary files.
  • You will also need the Xilinx ISE Design Suite for the Xilinx blockset required by the Simulink model as well as for the tools to create and load the .bit file onto the Xilinx 3s500e board.  I'm using the "Xilinx ISE Design Suite  12.2".
  • Regarding the Xilinx ISE Design Suite:  Use the Xilinx "Project Navigator" to convert the .xise file into the final .bit file (the .xise files is created by clicking on the Xilinx "System Generator" block that is on the top level of the Simulink model) .  And then use iMPACT (from the Xilinx ISE) to load the .bit file into either the eeprom on the Waveshare board or into the FPGA itself.  (And you might see quite a few "warnings" generated by the Xilinx Project Navigator as it goes through its process -- these were present in W1QG's original version of the design, and, being a neophyte using these tools, I've ignored them).
  • These files are free to all.
  • I am not available to provide help (which is the hidden price of having the files be free to all).  Therefore, if you want to use these files, I recommend that you be already familiar with Matlab, Simulink, and the Xilinx tool set, and that you are comfortable with using them to create FPGA designs and files that can be downloaded into actual FPGA devices.  If you do not have this familiarity, learning how to properly set up and use the tools can be a major major issue.  So, before you spend money on anything, I would recommend that you first know what you are getting into, or that you have colleagues who are familiar with the tools and design process and who are willing to help you.
  • Finally, I might have made a mistake in my designs, equations, schematics, models, etc. Do not assume that the design is bug free!

FPGA SDR Filter Downloads:

Files of Filter Data (including Information Filters of various bandwidths and filters used in the RX EQ stage) can be found here:

From the Readme file at the above URL:

This repository contains some of the Filter Files that I download into my FPGA SDR transceiver from an Arduino NANO used as the UI Control processor.
Note that, in the Arduino code, I store these filters in the Arduino's Program Memory, thus the "const PROGMEM int" in lieu of "static int" used by Dick, W1QG, in his original filter files (Dick used a PIC processor for UI control).
The file "AF_Filters_1.h" contains the filters I use in the audio RX Equalizer stage, while all other ".h" files are Base-Band Information Filters (centered at 0 Hz -- refer to blog post 3 in my FPGA SDR series).

(Again, these files are freely provided, and because of this I again caution that I am not available to provide help.)

Other Floobydust:

1.  FPGA Utilization:

I've highlighted the Xilinx XC3S500E attributes in the following table:

(Click on image to enlarge)

Note that the total number of slices available is 4,656 (four slices form one CLB, or Configurable Logic Block).  Version 2.5 of my FPGA design occupies 97% of the FPGA's slices.  Not much more room is left!

(Click on image to enlarge)

2.  FPGA Power Dissipation:

The FPGA SDR Transceiver, powered with 14V, consumes about 9 watts of power (0.65 Amps).  Originally there was no venting in the case, and its inside could get a bit toasty (imagine a small box completely enclosing a 10 watt light-bulb).

To provide a bit of heat relief, I added a very small fan to the FPGA SDR's back panel and 10 quarter-inch holes on the bottom of the case (I believe I used a 1 1/8 inch chassis punch to make the fan hole).  The fan runs at a low speed (the fan is a 12V fan, but I power it at about 7V using a series dropping resistor from the 14V line).

I haven't made any measurements of the temperature profile within the box.

3.  Fan Speed Control:

The switching power supply has a fan that is constantly on, and it is a bit noisier than I would prefer.  On the other hand, I've set the speed of the PA fan at a low value so that its noise is fairly unobtrusive, but it isn't very efficient for cooling the PA when transmitting at high power.

Wouldn't it be nice if these two fans would go to full speed if their components were getting hot, but otherwise luffed along at a low, quiet, speed (or were off altogether)?

So I decided to add fan speed controllers to both the PA's fan and the Switcher's fan, and I'd like to have the fans start speeding up and a temperature of 40 degrees C or a bit higher (40 degrees C = 104 degrees F).

Which temperature sensors to use?  I've plotted the characteristics of some temperature sensors, below:

(Click on image to enlarge)

To turn ON the fan, I am going to use an MJF122 NPN Darlington transistor (explained further below).  Here's a graph of its Ic versus Vin characteristics, given the test circuit included with the graph:

(Click on image to enlarge)

Note that the Darlington is ON and its transfer characteristics linear when Vtemp is between about 1.16 and 1.28 volts.

And why 100 ohms collector load?  That's approximately what the PA's fan looks like, when it is spinning.

Let's add this information to the Temperature Sensor graph:

(Click on image to enlarge)

Amplifying the MCP9700's output by a factor of about 1.3 results in, roughly, the same turn-on point as I would get with the MCP9701.  Both turn on at a temperature around 40 degrees C and are in saturation (i.e. the fan can spin no faster) by, worst-case (for the MCP9700, amplified by 1.3), about 50 degrees C.

In the case of the MCP9701 you might initially think, given its output voltage at 40 degrees C, that it could drive the Darlington directly, but the MCP9701 is only spec'd for 100 uA output current, which, given the range of the Darlington's Beta, might not be sufficient.  So an op-amp provides enough current to drive the Darlington's base, even when the Darlington is in saturation.

Now let's look at the Switcher's fan-controller, which, of the two designs I'm presenting here, is the simplest:

(Click on image to enlarge)

Notes on the Fan-Speed Controller:
  1. The temperature-sensor is an MCP9700 in a TO-92 package.  Its plastic case (meant for ambient air temperature measurements) will phyically contact the windings of the Switcher's L1 inductor (which I determined, by touch, is the component that becomes warmest) -- thus the need for a plastic case: to provide voltage isolation.
  2. I would have preferred to use the MCP9701 in a TO-92 package, but I didn't have one at hand -- I only have these devices in SOT-23 packages.
  3. The MCP9700 cannot source much current, so I use an op-amp to provide a current boost.  This op-amp also multiplies the sensor's output by a factor of 1.3 so that, at a temperature greater than about 40 degrees degrees C, the resultant voltage is about 1.18 volts, which is (roughly) the voltage at which the MJF122 Darlington turns on sufficiently to start the fan turning (Note that the voltage across the fan needs to be fairly significant to get it to start (e.g. 5 to 6 volts?), but, once started, this voltage can be decreased and the fan will still continue to turn).
  4. An MJF122 was used because of its high current gain and also because it has an insulated package (no insulated screws and/or washers are required when attaching it to the chassis (which acts as its heat-sink)).
  5. Some resistance in series with the base of the MJF122 is required to limit base current when the Darlington saturates.  I'm using 470 ohms, which, when the op-amp output is 2.0 volts (i.e. temperature at sensor > 80 degrees C), results in a (measured) base current of 1.5 mA.  This amount of current can be easily sourced by the TLV271.  
  6. The MJF122's Beta can vary tremendously with collector current and temperature.  At 100 mA and 25 degrees C, per the MJF122 datasheet (figure 8), DC current gain is about 500 (this will vary from device to device), which means base current would be 0.2 mA.  This would result in a voltage drop across the 470 ohm base resistor of about 0.1 volts -- equivalent to a temperature error of 5 degrees for the MCP9701 (19.5 mV/degree slope) or about 8 degrees for the MCP9700 when amplified by 1.3.  If important, this error can be reduced by decreasing the value of the base resistor, with its lower limit being a value that would still allow the TLV271 to adequately source the base current at, say, an input voltage equivalent to a temperature of 80 degrees C.  (Note: I measured a base current of about 0.07mA prior to device saturation in this application).
  7. A 78L05 powers both the sensor and the op-amp with 5VDC.  It's possible that this circuit could be replaced with a zener diode and a resistor, but the 78L05 is a simple solution whose output voltage is constant with temperature (when compared to a zener diode).

The temperature-sensor is mounted on a small board (with bypass cap), and this board sits IN the switcher's toroidal L1 "doughnut hole":

Note that the sensor's plastic case physically contacts the inductor's windings.  (The sensor is black, the capacitor is yellow-brown).  (The white goop was added by the manufacturer).

Here's the entire fan-controller circuit, mounted on the inside of the top of the switcher's chassis, next to the fan:

For the PA fan I wanted to do something similar, but I had two concerns:
  1. There could be a lot of RF within the PA compartment, so the circuit needed to be immune to RF.
  2. I didn't want to use a temperature sensor in a TO-92 package.  I wanted a device with a low-impedance thermal path between its pins and its die-based temperature sensor so that I could connect a pin (e.g. the device's ground pin) directly to the heatsink or some other "grounded" heat source.  So in this design I use an MCP9701 in a SOT-23 package, with the temperature-sensing path made via its ground pin.

Here's the circuit for the PA's fan controller.

(Click on image to enlarge)

Although it appears complex, the "bones" of this circuit are the same as the switcher fan-controller circuit.  But note:
  1. The gain of the op-amp is now 1, rather than 1.3.
  2. There is a 100 ohm resistor which keeps the fan always on, but at a low speed.
  3. There are a lot of additional R's and C's acting as filters to mitigate any possible ill-effects created by having high-power RF near this circuitry.

To create a low-impedance thermal path between the PA and the temperature sensor, I soldered the temperature sensor's "Ground" pin to a Ring Terminal.

Ring Terminal:

 The rest of the sensor circuitry (consisting of the sensor and RFI mitigation passive components) sits on a small PCB.  The Ring Terminal, itself, is screwed to the PA's Q1 mounting flange using the flange mounting screw, as shown below:

Here's a test of temperature in CW mode on 80 meters, operating at 90 watts out, with the key held down for 2 minutes, and then released and the PA allowed to cool for 3 more minutes:

(Temperature was determined using the measured sensor voltage and reworking the sensor's "voltage as a function of temperature" equation to instead represent "temperature as a function of voltage.")

You can see how the temperature rise is fairly steep when the PA is initially keyed, but as the fan turns on the temperature rate-of-change slows down to about 7 degrees per minute.

I tried a similar test in LSB mode of the PA's fan, but instead of transmitting for 2 minutes I transmitted for 6 minutes, continuously talking (reading out loud the text from a QST article).  The PA's temperature started at 29 degrees C and, over the course of the six minutes, never got above 39 degrees, and I had to really work at getting it that high -- lots of yelling into the mic!  (Note that at 39 degrees the fan still hasn't kicked on).

I haven't done any testing of the switcher's fan and under what operating conditions it turns on, but I have noted that, during normal sideband conversations on 80 meters (at about 90 watts out), the switcher's fan does come on after a few minutes of talking.

Future topics to be added as they come to mind...

OK.  That's it for this blog post!

Background Notes:

SDR Notes:  Weaver Modulation and Demodulation
SDR Notes:  The Mixer Mathematics of Digital Down Conversion

Posts in this Series:

Part 1: Overview
Part 2: FPGA Modulation and Demodulation
Part 3: Interpolation and Decimation Filters
Part 5: Control Interface, Etc.
Part 9: 50 dB HF RF Power Amplifier

Standard Caveat:

I might have made a mistake in my designs, equations, schematics, models, etc.  If anything looks confusing or wrong to you, please feel free to comment below or send me an email.

Also, I will note:

This design and any associated information is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

No comments: