Monday, September 23, 2024

Gamma Dog - Rate-to-Tone conversion and Audio Frequency Modifier

One of Gamma Dog's unique features is the continuously variable tone representing the detected count rate by changing its frequency.

The approach is fairly straight forward - the detected count rate in CPS (Counts-per-second) coming out of the detector and into the MCU is converted into an audio tone with the same frequency - i.e. 200 CPS will produce 200Hz tone and 1000 CPS will produce 1 kHz tone. 

Due to a lucky coincidence, the detectors we use, especially the 63mm NaI(Tl) crystals produce around 180 - 230 CPS as a background level which a really good starting point and overall detector sensitivity and rate response work well with such direct conversion.

As the count rate increases though, the tone frequency will increase (as expected) and this could become a problem at some point when the count rate gets really high (7000 - 8000 CPS) - nobody likes these very high audio frequencies (certainly not the dogs and the mine bats :-) - such high pitch is not the most pleasant thing to listen to. Not to mention it becomes quite difficult to hear variations in the frequency in this high frequency range.

To combat this problem, the "classic" version of the Gamma Dog always starts the frequency generation at the set squelch level - this way if Squelch is set to 7000 CPS, and detected rate is around 7000 CPS the tone frequency will be low - less than a hundred Hertz, opposed to a 7 kHz tone.

In my Advanced version of the Gamma Dog, the system for rate-to-tone conversion is further improved and offers the user a whole toolset of conversion options. These options afford greater control over how the Frequency Audio Response to the Count Rate conversion is taking place, customizing it for different applications and listening preferences. 

The "xL" indicates Logarithmic Scale conversion (selectable when in Continuously Open Squelch Mode / "#" by using the Soft Key) 

This is done via a user-selectable option that can be assigned to the Soft-Key button. It is called Audio Frequency Modifier or AFM for short. 

In a nutshell, AFM in some of the options is a Multiplication Factor that is applied to the count rate when it is converted to tone:

There are 8 options: x0.5, x1 (default), x1.25, x1.5, x2, Auto, Exp and Log

The first few options are self-explanatory - if x0.5 is selected, the rate is divided by 2 before it determines the frequency of the tone - i.e. 200 CPS rate will produce 100Hz tone, 210 CPS will produce 105 Hz and so forth. It halves the base frequency but also the steps between changes. On the other end, with x2 selected, 200 CPS will produce a 400 Hz tone and 210 CPS will produce a 420 Hz tone. The default value of x1 is the direct 1:1 conversion.

The x0.5 option for example, is useful with very large detectors to keep the audio frequency output low against the natural high-count rate of the detector, while x2 is useful with smaller detectors which natively produce fewer counts, and the option allows to keep the tone frequency higher than a direct 1:1 conversion in this case.

In Auto mode the multiplication factor is based on the Detected Rate increase over the set Squelch Rate. The audio frequency modifier is dynamically adjusted in 4 steps based on the delta.

If Current Rate exceeds Squelch Rate by more than 175% - Frequency Multiplier x2.5 is used.

If Current Rate exceeds Squelch Rate by more than 150% - Frequency Multiplier x2 is used.

If Current Rate exceeds Squelch Rate by more than 125% - Frequency Multiplier x1.5 is used.

If Current Rate exceeds Squelch Rate by less than 125% - Frequency Multiplier x1 .25 is used.

This feature will automatically change through different multiplier levels while using the squelch level as control of where the step-ups should take place.

This graph plots how the frequency conversion steps through the multiplication range using the difference between detected rate and the set squelch rate. As the squelch opens and the rate continues to climb, the multiplier will start stepping up, increasing the audio frequency.

There are also two non-linear conversion modes available - Exponential and Logarithmic.

Exponential Mode – The audio tone frequency will increase in an exponential manner, with a scale factor of 0.0033 and base frequency of 100Hz using (e) Euler's Number.

This feature is independent of the Squelch Level - the squelch just needs to open but otherwise has no effect on the conversion. 

It is usable with absolute rates up to 1400 CPS.  Beyond 1400 CPS the audio frequency will exceed 10kHz!

Exponential mode is useful to detect very small increases in the count rate when the absolute rate is also very low. For example, in very low activity areas where small rate changes need to be detected - the audio tone frequency is exponentially increased, exaggerating the tiny rate variations by using higher pitch tones.

Logarithmic Mode – The audio tone frequency will change on a Logarithmic scale – the range of 40 CPS to 10K CPS will be "compressed" and mapped by using a logarithmic curve to 40Hz – 3kHz audio range.

This feature, just like Exp Mode is independent of the Squelch Level from Rate-To-Frequency standpoint, and it provides very good audio resolution for lower count rates (<2000 CPS), while still capable of handling very high count-rates (2K to10K+ CPS) - all within a manageable 3kHz audio range.

 

The range between 2000 CPS and 10000 CPS is allocated within less than 1kHz audio frequency response (from ~2200 kHz to 3000 kHz) which is useful when the instrument is used with both, very low and very high-count rates. This comes at the expense of audio resolution in the high-count region of the curve and overall higher frequency tone at the mid-low count range.

In the Gamma Dog's menu system, there is an item (#10) which allows the user to select a startup mode for the Audio Frequency Modifier, but the mode can always be changed later, during operation, if "Multiplier" is assigned to the Soft Key button in Menu Item #8.
(The other assignable function to the Soft Key button is control for the Audio Conversion Hysteresis Level)  

Wednesday, September 4, 2024

Efficient Common-Mode Current Choke for EFRW and other portable antennas (1:1 Guanella)

I was putting together SOTA/POTA portable antenna kit for my son, utilizing EFHW and EFRW antennas and I needed a Common-Mode Current Choke - something not very large and efficient that he can eventually use from QRP to 100W on 40m to 6m.

This is just a quick, easy, 15 min. build, and the result is an excellent and pretty efficient CMC Choke (see the measurements below) for only $25, that one can place in-line with the antenna feedline at the transceiver, at the antenna feed-point or both.
There is nothing new here - this is "Classic" 1:1 Guanella choke build, but I did some measurements to put things in perspective and show what is to be expected from such choke.

Note regarding using a CMC choke with portable wire antennas - if used with End-Fed Random Wire (EFRW) the choke can be placed at the antenna feed point (the 9:1 UnUn transformer) or at the radio. When used with End-Fed Half-Wave (EFHW) the choke should be placed at the radio only as the coax is part of the antenna system.

The bill of materials includes FT-240-43 toroid core (source: Amazon, $12) and 5 feet of RG-316 coaxial cable with pre-installed Male and Female BNC connectors (source: eBay, $13). Other materials - 6 small zip-ties and a piece of wide heat-shrink tubing which I had laying around.

The coax is winded on the core in 2x 11 turns with a crossover turn as shown. The total is 23 turns through the core.
 First, I secured one end of the coax with 2 crossed zip-ties, wound the first 11 turns, added zip-ties for the cross-over turn to fix each side of the windings and finished it with another 11 turns and 2 crossed zip-ties.
The core of this size can easily take more turns - around 14 on each side (for total of 29) but there is a performance trade-off - more turns improve low frequency attenuation but due to capacitive coupling between the tightly spaced turns, this will decrease the attenuation factor for higher frequencies. 
It seems that for FT-240 core and RG-316 the "sweet spot" is around 11-12 turns on each side. If 12 turns are to be used, one needs 6 feet piece of coax. 
The turns must be fairly tight around the core itself, so they don't slide around (PTE-insulated coax is very slippery!) but not too tight to cause coax damage. Turns should be separated from each-other as much as possible.
The direction of the windings doesn't matter. The purpose of the Reisert Crossover turn is to allow the coax to leave the core from opposing sides so there is no coupling between input and output and makes it mechanically better for in-line placement but electrically both sides are the same as one continuous winding.
The cores I got from Amazon had rounded edges so there was no need to wrap the cores with tape but should the core has sharp edges, fiberglass tape must be used before winding.

The complete CMC Choke.  With 5 feet of coax there are approximately 4" left as pigtails on each side.

Measurements

I built the CMC Choke Test fixture on a piece of FR4 material. Two SMA connectors are soldered on each side of a ground plane and a short Teflon-insulated wire with alligator-clips is soldered to the center conductor of each connector.
A piece of high-density foam glued at the front edge of the board prevents the wires from getting too close to the ground plane during calibration and measurements.

I added a 50 Ohm LOAD (2x 100Ohm 1206 SMD resistors in parallel) to be used at part of the VNA's OSLT calibration procedure.

OPEN calibration is done with the clips just laying far apart from each other. SHORT is done by clipping the S11 (Ch. 0) of the nanoVNA to the ground plane.

LOAD calibration on S11 is using the built-in LOAD standard.

For the THRU calibration, used for the S21 measurements both clips are attached together.

To measure the attenuation provided by the CMC Choke, the alligator clips are attached only to the outer shielding of the coax.

The CMC choke's performance is excellent for the entire intended range - 160m to 6m!
For reference - anything below -20dB is very good and below -30db is considered excellent!

Marker 1 (80m band @3.5 MHz) -44.7dB.
Marker 2 (20m band @14.2MHz) -38.9dB
Marker 3 (10m band @28.5MHz) -30.8dB
Marker 4 (6m band @54.1 MHz) -19.5dB
Performance on the 6m band while still very good is a bit lower than the lower HF range due to the coupling between multiple turns. As I mentioned, this an expected trade-off with the lower bands.

As the VNA shows, on 20m the impedance (|Z|) is over 8KOhms and even higher on lower frequencies. Not too shabby!

In an attempt to test and improve further the performance on 6m, I added a split-core mix 31 bead with 3 turns to one of the pigtails.

The 3-turn split-core bead definitely improved the 6m band attenuation by -7dB, down to -26.5dB.
This is a "good-to-know option" - I probably will keep the bead in my kit as an "add-on" for 6m. The improvement from this additional core on the lower frequencies is just a few dB over an already excellent performance so there is no need to be a permanent addition.

S21 measurement for insertion loss. Since the two SMA-to-BNC adapters are M and F on the BNC side, just coupling them together for the THRU S21 calibration then yields a pretty accurate measurement.

The insertion loss is mainly due to the 5 ft. of small diameter coax (RG-316) and it is absolutely acceptable with less than -0.2dB on 20m and -0.3dB on 6m.


The finished chokes looking like hockey pucks.
A piece of heatshrink tubing fixes the coax turns in place and adds a layer of protection.

Sunday, July 7, 2024

Moxtek X-Ray Tube Controller - Part 3 - Enclosure

Finally, I got around to make an enclosure for the Moxtek X-Ray Tube Controller with a proper control panel.

The complete "X-Ray Tube Commander 2000" Controller in all of its glory.
 This enclosure might be further improved with an angled front panel at some point if I get too bored but for now it serves the purpose.
The faceplate text is currently done "quick-n-dirty" style with a Label Maker but I'll print a nice colored laminated front decal for it to get the more refined "lab equipment" look, just the way I did with my N2PK VNA.

The front panel component mounts include large LCD display, 2 backlit control buttons, a rotary encoder /w button, a keylock and a small speaker grill.

I designed the enclosure with TinkerCAD - this application is excellent for simple projects such as this one, and it is very fast to work with.
Once the measurements are taken, it literally takes minutes to create the design and output the STL file for printing.

I made the bottom part of the enclosure a bit taller than necessary, just to have some spare room if I decide to change things around or add more connectors on the sides. Since it is a just a piece of benchtop equipment, the size is not critical.
 If I ever do another print of this, I will definitely make the box slimmer, round the corners and angle the front panel. 

The X-Ray Tube Controller PCB and components, installed in the enclosure. 


A "Window" on the side exposes the edge of the PCB where all tube interface connectors are located - a DB-9 for connecting to the tube's HV module, supplemental power connector for tubes working at higher power levels (>4W), terminal strip with all interface signals to external devices (test enclosure interlock switch, illuminated warning sign, etc.)
I used this window to feed thru temperature sensor cable, but I will drill and mount a proper 4-pin connector at some point.

The keylock is part of the X-Ray safety protocol and prevents from engaging the beam without a key. These types of X-Ray tubes create an incredibly high flux right at the aperture and when setting up a sample for XRF the user should turn and remove the key to prevent any accidents.
 In addition, the XRF enclosure door interlock switch is in-series with the keylock so the control key must be turned to "ON" AND enclosure door closed for the beam to engage. A very serious X-Ray hazard is not only the direct exposure to the beam but also from scattering. Even air scatters and reflects X-Rays so no tube operation should be done without proper shielding. 

The yellow MODE Button serves multiple functions depending on the context.
Single-press is RESET (for Timers, errors, time logging and also acts as an "Emergency Stop" while the X-Ray beam is ON).
 Long-press changes beam operating modes and a double-click switches between the 2 memory presets. 
This button also acts as a "SHIFT" while tube operating parameters are dialed in with the rotary encoder (for Timer and Min High Voltage). Holding the MODE button down while pressing the Encoder button will toggle ON/OFF the Tube Error Check feature.
The yellow LED in the MODE button is a "READY" indicator showing that the x-ray beam can be engaged - it turns off if the current conditions disable the x-ray tube - during parameter entry, filament cooling stage or errors for example.

The push-button on the Rotary encoder is used to enter Parameter Setup mode and scroll thru the different digit positions while entering the value. 
Tube and Controller Parameters are then dialed in with the rotary encoder at the position of a blinking cursor. 
This button also serves as an "Emergency STOP" button in Timer or Toggle modes, instantly and unconditionally terminating the X-Ray beam.
When the beam is ON and operating in Timer mode, the rotary encoder can be used to add or remove time from the currently running timer by simply spinning the knob.
The BLUE button is exclusively used to operate the X-Ray beam (according to the selected mode).
The blue LED in this button indicates if the beam is ON and it also flashes with 1 Hz period while the Timer is running.
The status line on the display will show the status of the "Filament heated" signal returned by the tube with a message "X-RAY ON!"

On this picture, the status line displays "Tube ERR!" with Error Code E-111 due to operation with disconnected X-Ray tube.
I also added an option to temporary disable the Tube Error Check.

The 3-digit error code is very easy to read:

First digit on the left shows the state of the "Filament Ready" signal, returned by the tube when the tube is turned ON: 0 - signal present, 1 - signal is missing. 

Second digit shows the state of the High Voltage return: 0 means that the tube returns the same voltage as the one requested (Set) by the controller, 1 - returned voltage is lower than requested, 2 - return voltage is higher than requested. 

The third (right) digit has the same functionality as the second digit but reflects the return of the Emission Current.

Tube Return voltages are monitored within a specific preset tolerance. Emission current is only checked for Set current >5uA - at very low currents, below 5uA the tube return for Emission Current might fluctuate more than the established tolerance and could generate an error otherwise.

Sunday, February 18, 2024

Lightwave portable magnetic stand for Elecraft KX3 and PX3

Elecraft KX3 is a fantastic portable transceiver but one thing I thought could be improved on is the front panel presentation by using a better stand to the stock, foldable legs. 
The built-in foldable legs of the radio are a bit annoying to deal with as they require the user to manipulate the thumbscrews used also for holding the radio together. Because the thumb screws are opposing, this needs to be done in different directions when standing in front of the radio, not to mention that the front panel sits at too low of an angle for my taste.
I decided to design a lightweight stand that has small footprint, easily carried in the field and it can be assembled or taken apart in seconds. The goal is to give a good support for the radio without the need to completely unfold the stock legs.

The stand turned out to be a quick and fun half-day project.
Anyone who wants to play with this project can get it from TinkerCard


The two legs of the stand were designed with TinkerCad and then 3D printed.

All of the components for the stand - the 3 spacer rods (made from carbon-fiber arrow shafts) and the 2 3D-prineted legs. 
The weight is exactly 2oz. but there is a room to shave off some of the weight (in the next version).

Inside the blind holes of the legs used for the carbon-fiber spacer rods, I glued small neodymium magnets (source eBay - 1/4" x 1/8" N42 type). I made a "bed" for friction-fit of each magnet which has a slightly smaller diameter than the main hole, matching the inside diameter of the rod. All magnets are pressed into the "bed", glued in the same orientation (polarity) by adding a drop of Super Glue before pressing the magnet in place.
The tricky part is to get right the size of the main opening of the arrow-shaft receptacle. Arrow shafts come in different "spine" level (amount of flexing). This is controlled by the manufacturer with the thickness of the arrow-shaft wall or more specifically, the outside diameter - stiffer shaft (lower spine number like 350) will have a larger outside diameter than a 600 spine. Furthermore, when 3D printing, the plastic also shrinks as it cools so it takes some experimentation to get the size just right for a snug fit that will also afford smooth and effortless assembly / disassembly.  

For the spacer rods I used scrap cut-offs from carbon fiber arrow shafts. These are very strong and lightweight tubes and as bonus they have quite nice smooth finish. 
I have a whole bunch of these pieces in varying lengths leftover from sizing my kid's archery arrows.
 Inside each of the arrow shafts I glued the same size neodymium magnets, making sure that the polarity is the opposite of the ones in the legs. The glue was applied on the perimeter of the magnet and then inserted into the arrow shaft, on a flat surface, making sure it is perfectly flush with the end of the tube.


The stand can be assembled together literally in seconds. The spacer rods just snap firmly in place and hold the entire stand together. Disassembling is just as easy by pulling everything apart. 
The magnet-to-magnet attraction provides just the right amount of holding force without making it difficult to pull apart. 


The original foldable legs of the KX3 can be unfolded ever so-slightly to lock the stand in place so the radio cannot move sideways. This is not really necessary as the stand's legs fit between the stock legs rubber booths, but it can provide additional support if needed.


The angle of the front panel with the radio on the stand is not as low as with the original foldable KX3 legs.
The radio sits angled at exactly 45 degrees which I find to be more ergonomic - both, for viewing the display and operating the controls.


Short video of one-handed assembly of my KX3 stand.
 A set of shorter rods can turn this stand into a PX3 stand (the KX3's Panadapter). This stand also works great as a portable cell phone stand, and I'll be making another one for use during my air travels or when using the cell phone for logging in the field.