Back on the air with OpenHPSDR

Posted on 2020-03-30

After a bit of a gap, I am back on the amateur bands with my OpenHPSDR rig. This blog post outlines that journey.

Long time ago…

Back in 2006, a small group of radio amateurs got interested in DSP on FPGAs and started playing with off the shelf FPGA kits. The result was a design that we called as HPSDR (High Performance Software Defined Radio). Unlike some of the existing designs, these designs used a very high sampling rate to directly sample the HF (0-30MHz) spectrum. This has several benefits. For one, sideband rejection is great as we create the I and Q signals in the digital domain (this requires a high speed ADC/DAC). Other designs like Tayloe detector based ones use switches and other discrete analog components to convert into I and Q, then digitize these signals (which only requires low-speed sound-card type of ADC/DAC) and so some sort of balancing of magnitude and phase needs to be done in software. The downside is that the ADC/DACs are running at a very high speed and generate a lot of heat. They cost a lot. The manufacturing technology is still catching up, so high speed ADC/DACs tend to have lesser resolution compared to the low speed counterparts.

Around 2006-2007 time, I procured the first couple of boards for the project, the Atlas backplane and the USB interface card (called Ozy). I also procured components from Digikey and hand built the two boards.

I was so ignorant at that time and underestimated the efforts and skills needed to complete the project. Later in 2008 and later, I got busy with “real world” and constraints of life and changed environments at work. I had a bit of back and forth travel and relocation. When I came back, I found that a new building had come up behind our apartment and their transformer was emitting a lot of noise. After a couple of failed attempts talking to the local electrical company, I finally gave up on that and decided to concentrate on things other than amateur radio for a while.

Floods in 2018

All these years, I never forgot about amateur radio and had always been reading about it, but haven’t been operating much as I did not have access to a radio and an antenna. I shifted to a new place and had some space for an antenna. So, I decided to get an antenna up. But there was a problem, I did not have a radio anymore, so I will have to either buy one or build one.

The 2018 Kerala floods was an eye-opener. I had a self-realization that whatever skills I have are not very useful for the rest of the world. Tons of websites mushroomed with helpful info. But I am not a web programmer and can’t contribute much there in short time, I could learn web programming and contribute, but these situations need short bursts of high energy and contributions.

Even though, I am not a big supporter of amateur radio as a means to communicate during disaster (that is just a side effect of it being simple and decentralized), I thought I was really missing out. Without an antenna and a transceiver, I cannot even listen to the traffic and what is going on there. I also met some local hams in the area who added me to a communication chat group. I decided to buy the low cost micro-BITX transciever which was available as a partially built kit that only needs to be wired up to knobs and switches. That was up within a month or so. Floods were over by then and things had improved. I used a bamboo pole initially to get the antenna up about 40 feet from the ground to form an “inverted V” configuration of dipole. Not perfect, but something that can be made to radiate in limited space.

CW Academy

I have always been interested in CW as it is the mode with which one can communicate with the least amount of power and with simple equipment. Last year, I decided to improve my CW skills and signed up for the CW Academy program from the nice folks at CWOps. It is an 8-week program (for each level) and is completely free. There are three levels (used to be called Level 1, 2 and 3, but now called “basic”, “intermediate” and “advanced”). It is done mainly by the US/Canada based CWOps members. The timings are mostly suited for US residents, but with a bit of a stretch, it can be done by Indian radio amateurs too. My level 1 and 2 classes were at 5.30AM to 6.30AM. However, my Level 3 classes were at a more convenient 8.30AM since I work from home.

I thoroughly enjoyed the classes and made some lifelong friends in the process. The classes (especially the level 3) is rigourous and that is what makes it unique and interesting. It is challenging and without following the stipulated practice sessions, it is hard to catch up. I would rate myself as one of the worst performers in the class as we had some really excellent CW operators and contesters.

Getting on the air

One of the assignments that my level 2 instructor Bill DiVore used to ask us to do was to get on the air and work a few stations daily. I used to turn on my radio, keep hunting for stations. If I am lucky, I would work a station during the morning CW net. Not every day, because 40m often opens up a bit late and by then the 40m CW net is over. My receiver also had calibration problems and my transmitted signals was a bit away from the VFO frequency. This too contributed to the problem, I think, because others could not hear me if they had their filters set to low values like 500 Hz and that is a common value of receive roofing filter for CW.

After all the frustration, I decided that I need another radio - either a commercial one or a homebrew one. That is when I decided to complete my OpenHPSDR build.

OpenHPSDR components

When the HPSDR project started (it was called that way back then), it started with a pluggable architecture. There is a backplane (called Atlas), a USB2.0 interface board to take data in and out of the PC (called Ozy), a receiver board that has a highspeed ADC and an FPGA (called Mercury) and a transmitter board that produces about 0.5W output that has a high speed DAC and an FPGA (called Penelope). There are additional parts like power supply, GPS source, Power Amplifier, TX/RX filters etc etc.

Now, for some pictures of the individual boards.

This is the Ozy board.

Ozy

and this is the Penelope board (transmitter).

Penny

and this is the Mercury board (receiver).

Mercury

The project learned from these sub-projects and moved to a single board architecture later (called Hermes). But I stopped following it back in 2010 at that point.

The idea is that once we directly sample signals (0-30MHz) and get them into a computer, we can do the interesting bits in software. So, PowerSDR, forked from FlexRadio’s SDR-1000 project is the heart of the radio. All sorts of interesting bits are happening inside PowerSDR (like modulation/demodulation, noise filtering and blanking, CAT control, pulse shaping, TX/RX filter control, power/SWR reading etc etc. It is truly an amazing piece of work. Unfortunately, windows only, though, the Signal Processing parts of it is a portable library called WDSP.

HPSDR repository was in SVN a few years ago and now it is on git, hosted on github. Unfortunately, it is not a very modular repository and takes a bit of time to find one’s way into what one wants to find.

The boards are pretty dense and needs some skills to solder. I was pretty naive on what my capabilities are, which is why I ventured into this project. Had I known the difficulty of building the boards, I wouldn’t have gone through this path. Sensing the difficulty, TAPR stepped in and started offering bare boards and built-kits. I took advantage of it for some of the boards.

Problems with the TX board

I had a hand-built Atlas and Ozy from 2007. I have Janus from TAPR (a high quality custom sound card of sorts - this was built to make it work with FlexRadio’s SDR-1000 but then HPSDR moved to the goal of direct sampling of the RF instead of the Tayloe detector path), I have Mercury and Penelope, also from TAPR. That was the state when I came back to OpenHPSDR project in 2019 January.

After hooking up the system, I noticed that I am unable to read the version number of the Penny (TX) FPGA firmware revision. Recieve works fine. I then updated the FPGA image for Mercury (RX) board. There is a nice technique where the Ozy (USB interface board) can emulate and act as the Altera USB Blaster II. However, downloading FPGA image into Penny fails. Inspecting the board by touching various ICs revealed that one of the regulator ICs are getting too hot. With the help of a friend who had access to a hot air gun at his work place, I removed the capacitors around the regulator and found that one of them has a short. Replacing it didn’t change much. It looks like the FPGA is not functional.

Getting a replacement board

I contacted my good friends at TAPR (John N8UR) and Scotty. They suggested that it is probably better to get a new board. Fortunately, they had some returned boards when a newer version of Penelope was brought out (called PennyLane). A friend was visiting the US, so I got that board in a month’s time.

Making a full system

At that point, I had Atlas, Mercury, Ozy, Penny. That only puts out 0.5W into the antenna. Connecting all the boards together revealed another anomaly.

The system was sending a series of dits even while in the receive mode. This was revealed while trying to listen to CW signals with a narrow bandwidth filter. Problem “appears” to go away if I change the mode to LSB, but that simply mislead me for a long time. It was sending the series of dits even while in LSB or any mode. After thoroughly cleaning the board with IPA, the problem seemed to go away at that time. But it returned after a while.

Since I am using the USB board which is mostly obsolete by now, I suspected that some change in the FPGA verilog code caused it. I went down that path for a few days and came back with nothing (other than some learning about how the FPGA code worked).

I started looking at the circuit diagram and with the help of a multimeter, started tracing the signals around the CW input (done via a DB-9 connector). It was finally found out to be a floating input to the FPGA’s CW input pins. There is a passive RC-circuit array chip and one end of it was not making contact, so the input from the DB-9 connector, which is pulled up via resistors, wasn’t making it all the way to the FPGA pin. Fixing that took a minute and after that everything was fine.

Power Amplifier and filters

Two crucial things were needed for the above system to be more useful.

  1. A power amplifier to put out a few Watts into the antenna.
  2. A set of transmit/receive filters + T/R switch.

Power Amplifier was somewhat easy. I had an unbuilt kit from TAPR for many years and I took it one weekend and built it. The toroid/transformer windings was pretty new to me at that time, but I managed to do it well.

Now, the filters. One needs to filter out the harmonics generated at the non-linear devices (power transistors) in the PA to be compliant with the law. For instance, while transmitting a signal at f0 = 7.030 MHz, the transmitter should not be transmitting at its third harmonic, 18.090 MHz. For a transmitted signal in the 0 - 30 MHz range, the harmonic should be at least 43 dB below the the main signal.

HPSDR project has a sub-project called Alex that consist of two banks of filters, a set of low pass filters (for Tx) and a set of high pass filters (that combine in the receive mode to act as bandpass filters) for Rx. In the Rx filter boards, there is an additional 55MHz low pass filter as well and a pre-amp for 6m band.

Now, TAPR did a special build long ago for the Alex filters. The Tx filters were available for purchase. A friend of mine carried it for me during one of his trips to the US. I was out of luck as far as Rx filters are concerned. The board design wasn’t on the HPSDR wiki or in the repositories. TAPR didn’t have any stock of them. A few parts (mainly 6m amp) had EoL components.

I contacted Graham KE9H, the designer of Alex filters and he kindly sent me the gerbers for the board. This was in December. I immediately ordered all the parts and toroids and used JLCPCB to upload the design. End of December, the boards were shipped out of china. I also ordered a nanoVNA so that it can help me with the winding of toroids. There were 20+ toroids to wind. It looked daunting to me. However, with no other option in front of me to complete the transciever, I decided to take on the project.

The parts arrives by mid January. NanoVNA arrived after 4 weeks. However the bare PCBs were stuck in the local customs and arrived only by the end of February. That is a whopping 2 months for shipping and customs clearance. Thank you, Government of India, for making the lives of electronics builders as hard as possible!

I built the Alex Rx Board over a couple of weekends. I built a small test-jig for measuring the inductance with the nanoVNA. That turned out to be very useful. The inductance values matched within 10% of the given values and in some cases, within 5%.

Here is the picture of Alex Rx filters:

AlexRX

.. and the Power Amplifier:

PennyWhistle

Enclosure

Any project is not complete unless it is boxed up. Otherwise, is just a bunch of “boards” that would likely not see much use in the long run either because of the dust gathered or because it is so loose that one would cannibalise the cables etc for another project and forget about this one.

HPSDR project has produced a design for an enclosure called Pandora (a pun on “Pandora box”). The design in PDF form is available on the wiki, so I got it made by a local aluminium fabricator. It costed me a bit of money. The box had some problems with holes in the wrong place etc, but some of them could be rectified. I had to make a trip on a Sunday to the other side of the city to get it fixed, but it is good enough.

I still need to fix a fan and find a way to install the power amplifier (drilling holes is one thing, but doing it at the right place is important to maintain good air flow..).

The Alex RX/TX filters are boxed in a hammond case and that box itself needs to be fixed to the box. Right now, I have “taped” them (yuck!) into the enclosure.

A picture of the front side:

Front side of hpsdr

and the inside view:

Inside hpsdr

The real test on the air

I am not a Microsoft Windows user. I have been using GNU/Linux for all my computing needs since 1996. But the software used by most of the HPSDR users is a forked version of PowerSDR that works only on Windows. There is also KISSKonsole (KISS for Keep it simple and stupid) and it is really nice as well. George Byrkit is the maintainer of KISSKonsole. George and I debugged some problems with it remotely (via email) and it was a pleasure to work with George and with the KISSKonsole. I am using an “unverified” copy of Windows 10 Pro that I downloaded from the Microsoft website. Apart from a non-intrusive banner, it does not seem cripled.

I called my friend Bejoy, VU3BOJ, who lives a couple of kilometers away for a listening test and he came back with a good report. I also had a short QSO with Manoj, VU2CPL. The first DX contact came on March 26, 2020 with Serg R3XE. Then on the next day, I made a few more contacts with a station in Brunei (V85T), another russian station RA6Y and a Greece station SV2JAO. At that point, I declared my homebrew project a success. Especially the power amplifier and the filters, which I was a bit scared off. Meticulous measurements and a more methodical assembling and testing paid off.

So far, I have made several CW QSOs with the radio and am pretty happy with it.

I have also had success with FT8 mode (with the WSJT-X software interfaced to PowerSDR via virtual com ports – I used com0com and was helped by Gopan VU3HPF to get it working – and virtual audio cable – voice meeter is what I used and it works perfectly). I also had success with N1MM logger interfaced to powersdr.

What is next?

I would like to do quite a few things with the project.

  1. Get a microphone ready and wire it up.
  2. Install a fan in Pandora box.
  3. Drill holes to house the PA in the box.
  4. Build a 100W PA.
  5. Try out the metis board that George has sent me via someone who travelled to the US. Because of the COVID19 situation, I am yet to receive the board.
  6. Move over to GNU/Linux and for that, use linhpsdr as the starting point.
  7. Interface GNU Radio with the ethernet based Metis (or using the Ozy/Metis gateway, which seem to work well).
  8. Play with the software (like gr-fosphor).
  9. Explore the Unix philosophy for ham radio software development. I will write a few rough ideas I have in mind in another post.