Posted on Leave a comment

Test Equipment Upcycling – Variable Attenuator Module

A while back I found myself in the need of an adjustable RF attenuator capable of high-GHz operation. As luck would have it I had an old Spectrum analyser on the shelf at work, which we had retired quite some time ago.

Spectrum analysers being quite capable test instruments, I knew that the input attenuation would be done with a standalone module that we could recover for reuse without too much trouble.

The attenuator module

Here’s the module itself, with the factory drive PCB removed from the bottom, showing the solenoids that operate the RF switches. There are test wires attached to them here to work out which solenoid switches which attenuation stage. In the case of this module, there are switches for the following:

  • Input select switch
  • AC/DC coupling
  • -5dB
  • -10dB
  • -20dB
  • -40dB

For me this means I have up to -75dB attenuation in 5dB steps, with optional switchable A-B input & either AC or DC coupling.

Drive is easy, requiring a pulse on the solenoid coil to switch over, the polarity depending on which way the switch is going.

Building a Control Board

Now I’ve identified that the module was reusable, it was time to spin up a board to integrate all the features we needed:

  • Onboard battery power
  • Pushbutton operation
  • Indication of current attenuation level

The partially populated board is shown at right, with an Arduino microcontroller for main control, 18650 battery socket on the right, and control buttons in the centre. The OLED display module for showing the current attenuation level & battery voltage level is missing at the moment, but it’s clear where this goes.

As there weren’t enough GPIO pins for everything on the Arduino, a Microchip MC23017 16-Bit I/O expander, which is controlled via an I²C bus. This is convenient since I’m already using I²C for the onboard display.

Driving the Solenoids

A closer view of the board shows the trip of dual H-Bridge drivers on the board, which will soon be hidden underneath the attenuator block. These are LB1836M parts from ON Semiconductor. Each chip drives a pair of solenoids.

Power Supplies

The bottom of the board has all the power control circuitry, which are modularised for ease of production. There’s a Lithium charge & protection module for the 18650 onboard cell, along with a boost converter to give the ~9v rail required to operate the attenuator solenoids. While they would switch at 5v, the results were not reliable.

Finishing off

A bit more time later, some suitable firmware has been written for the Arduino, and the attenuator block is fitted onto the PCB. The onboard OLED nicely shows the current attenuation level, battery level & which input is selected.

Posted on Leave a comment

SDR FM Broadcast Stopband Filters

There’s a common problem with all Software Defined Radios – their input stage is wide open, and therefore susceptible to desensitisation by local high power transmitters. The main culprits are broadcasts in the FM band, from 88-108MHz. Commercial stopband filters are available to solve this issue, by cutting out the FM Broadcast band. Before I ordered a commercially produced filter, I figured I’d try my hand at building my own.

DIY Stopband Filter
DIY Stopband Filter

Here’s the filter I came up with, a Type 2 Chebyshev. It’s built on a prototype stripline PCB, with SMA connectors at either end for I/O. This was created with the help of a filter calculator, the response of the filter can be seen below:

Filter VNA Performance
Filter VNA Performance

The response of the filter isn’t bad at all! It’s shifted up a little high on the scale, with the lower -3dB point being at 91MHz rather than 88MHz, but it does indeed chop out the broadcast band by -52dB. The high -3dB point is at 141MHz.

Let’s look at a commercial filter now, here’s the unit below, it’s definitely been size & cost optimized!

Commercial Stopband Filter
Commercial Stopband Filter

The box is tiny, not much bigger than the SMA connectors!

Commercial Filter VNA Characteristics
Commercial Filter VNA Characteristics

Looking at the plot from the NanoVNA, it’s clear this is also a Type 2 Chebyshev, but it’s more effective. This has a stopping power of -82dB, it’s also better centred.

Commercial Filter PCB
Commercial Filter PCB

The board easily removes from the external shell. The SMA connectors are edge launch, which is good for maintaining impedance. There are a couple more stages of filtering in here than I put on my filter, which explains the much improved blocking characteristics. There does appear to be some damage though – there’s an inductor missing from the left side of the PCB. This is probably responsible for the odd response at the low end. There clearly was an inductor there, as the solder fillets are still present. Maybe this was removed at the factory as a form of tuning?

Posted on Leave a comment

NanoVNA-Qt Raspberry Pi AppImage Build

There’s quite a nice desktop app for the new NanoVNA v2, NanoVNA-Qt. It’s released as an AppImage for Linux, but unfortunately there is no version to run on a Pi supplied. The version below is built to run on the latest version of Raspbian (as of writing this, 2020-05-27).