Tuesday, December 22, 2015

Building Farhans Minima Transceiver Part #1


I have started my most ambitious electronics project so far. After building my Softrock RXTX I was eager to learn more about RF designs, and HF radios in particular. I came across Farhan, VU2ESE, via Soldiersmoke and decided to build a transceiver based on his Minima.

There are three published versions, and many variations in between that are produced by others. All versions are based on a Si570 PLL Local oscillator and a discrete component BFO.

The first version uses mostly discrete components, KISS-mixer and discrete component audio amplifier, The IF is 20 MHz and it switches between two filters to cover the entire HF band.

The second version uses a FST3253 mixer and a TDA2822 audio amplifier

The third version uses a standard diode ring mixer and a TDA2822 audio amplifier and an IF of 24MHz. I have seen a few versions of the first Minima verison around the web, but I have not seen any of the other two. 

Building my own version

I plan to base my design on the third vesion. It seems to be the simplest of the three, although it does not cover the whole HF spectrum. Since the IF is 24 MHz and it uses only one LPF it is limited to the frequencies below 24 MHz.

To make things a bit more interesting, I have planned to make a few alterations to the Minima 3. First, I will use a Si5351 as the local oscillator instead of the Si570. I used the Si570 in the Softrock RXTX so this gives me the opportunity to try something new. In addition, it contains three oscillators so one can serve as the LO while the other can serve as the BFO. N6QW has advocated for this several times, so why not give it a try.

Further, I will use ADE-1 double balanced mixers for both mixing stages. I will also use a standard LM386 as audio amplifier as I have many of those in the junk box.

Display and front panel

The Minima design and the software from Farhan is based on a 16x2 display.
I have used the standard 16x2 and 20x4 LCD displays in several projects previously: My 3D-printer, my timelapse device, a Shruthi-1 synth, a LXR drum machine, and more recently, my SWR-meter all use this display technology. This time I want to try something different, something more in the spirit of homebrew oldschool radios, and something more difficult. We are talking, Nixie tubes, Dekatrons, tuning eyes and neon indicators. No freakin LCD display or even a single LEDs on this rig.

My initial front panel is made in Front panel express. I have printed a test version on paper and glued it to a piece of cardboard. The purpose is to verify that all the bits and pieces fits to the panel before I order the final panel from Schaeffer.
In the above picture, the eight nixie tubes, one dekatron and one tuning eye is mounted temporary.

I think it will look great when the front panel is all finished. For the time being, we have to use our imagination, but nothing beats the warm glow from nixie tubes and dekatrons. The nixie-board from the above picture is one of my previous creations.


Moving to the radio itself, I started out building a LM386 audio amplifier. Homebrew hero N6QW always recommends to get the audio part going first, so here we go. The circuit has only 20dB gain at the moment, and I will have to increase the gain to at least 40dB later on, but it is enough to get started.

The sound from the little chip is not bad, and I hooked it up to my iPhone for testing. The speaker is a simple 8 ohm 8cm speaker from Tayda.com.

Low pass filter

The next stage I built was the low pass filter.

As there are no build manuals for homebrew projects, I decided to simulate some of the circuit modules. This is simple in LTSpice and gives valuable insight.

The simulated frequency response seem reasonable for a sub 24MHz receiver.

I used 0805 surface mount capacitors for the LP filter. I made some room on the PCB for a second LP or BP filter, should I have the urge to go above 24 MHz in the future. I hooked up the ADE-1 to the Si5351 via a 6dB pad. The output is terminated to a 51 Ohm resistor for testing. I am not sure whether the 6dB pad is necessary, since it is possible to adjust the Si5351 output power to drive the required 7dBm to drive ADE-1 from the Arduino software.

Future work

There are many parallel projects going on in this build, there are dekatrons and neon tubes that should glow, there are front panels and mechanics to resolve, and there are amplifiers to solder, and crystals to characterize. Hence, I did not want to collect everything in one big and totally confusing posting at the end (will it ever end?). The next stage is to finish the IF amplifiers and the crystal filters. I hope that others will take on building the third version of the Minima as well. If you are one of them, I would like to know. Stay tuned.

Saturday, December 5, 2015

Homebrew SWR and power meter

First of all, this SWR meter in this article is not exactly homebrew, as I based the circuit on the schematic in the excellent book Arduino Projects of Amateur Radio. Although I bought the book and respect the copyright of the authors I will share my own schematic here. Why? First, the design in the book is not completely original and is based on similar designs from others. One example here.  Second, I changed a few things, removed some stuff,  and added some other things, to my own liking, so the design is not identical anymore.

The circuit is based on two AD8307 log amplifiers, which are connected to the forward and reflected ports on a directional coupler.  The AD8307 amplifiers gives a DC voltage of about 25mV/dB of the input signal, which is amplified using an opamp (LM324). The opamp also provides the reference voltage to the Arduino (AREF) to ensure that the full ranges of the A/D converters are used.

I used the fourth opamp in the quad LM324 to provide input voltage reading. That is why the PCB in the picture has two power jacks. One input and one output. That way I know the drive voltage for the radio. I primary plan to use this device for my Softrock.

I created the schematic and the board in Eagle, and submitted the gerbers to Elecrow. I received 10 PCBs after about 25 days.

The board is not much larger than a standard 20x4 LCD.

I choose to use an Arduino nano rather than populating a AVR328 on the board and messing with USB converters. I am glad I did. I did one mistake on the board however. The Arduino was not powered from the 5V rail. The problem was that it was an error on the Eagle footprint for the Arduino Nano. I just downloaded the footprint file uncritically from the Internet without checking it. Other than that, It was fine.

Another problem was that I got oscillations on the LM324 opamps connected to the AD8307. The oscillations were around 40KHz and about 400mVpp on top of the DC signal. Hence it was impossible to calibrate the device. The solution was to desolder the output capacitors on the LM324. I do not think they are really needed on a DC design.

This was my first SMT design, and I am fairly happy with the result. The SWR and the power measurements seems accurate. I used the Arduino software from the book, and modified it to include a larger display and some other things. As you may notice, there are no buttons on the device. Originally I planned to use a rotary encoder and a bunch of menus, but as they say in the Soldersmoke podcast, menus are for restaurants. I totally agree. Besides, programming all kinds of features to the device is totally insane. This is a simple SWR meter and thats it. 

The files are available here, should you be interested. Note that there is an error in the schematic. The Arduino is missing +5V, but it should be easy to fix.

Sunday, October 18, 2015

Nixie tube experimentation with IN-12


I have always wanted to try out Nixie tubes in one of my projects, and here we go. Nixie tubes come in many different sizes and there are both top view and side view nixie tubes out there. I settled on some russian IN-12 top view nixie tubes as they are cheap, and should fit nicely on a front panel (for example on a radio).

The IN-12 was originally used in russian multimeters, radios, frequency counters. This R-155A Brusnika Radio Station serves as a good example on how nixie tubes were used in the cold war era.

Recently, this particular tube has been used for many hobby purposes such as clocks, geiger counters, etc. While I am mentioning it, the major page for steampunk and Nixie-fans is Bad dog designs having loads of excellent clocks using nixie tubes. Ok, enough drooling over other designs. Back to my modest attempts.

Testing a nixie

I purchased a 110-180V power supply kit from ebay. I highly recommend this kit from seller lumos-sk. It comes with an excellent build manual and was very easy to assemble.

The assembled power supply was set to 170V...

...and the IN-12 glows fine.

A PCB for four IN-12 tubes.

To control the nixies, I made a PCB in Eagle. The circuit uses two 74HC595 shift registers to drive four K155ID1 decimal decoders.

The schematic is shown above.

It is possible to cascade several of these boards to drive eight, twelve, sixteen, etc Nixies from just three pins on the microcontroller. I ordered the PCBs from OSH-park, and they were excellent.

However, I should have read Kevin Ryes blog before creating the PCB. I just took it for granted that the Eagle IN-12 part was correct, but as Kevin Rye found out, it is not. The pin numbering on the silk screen is wrong and the anode is connected to pin 5 instead of pin 1. However, if one ignores the numbering, my PCB works if the IN-12 is mounted on the back side of the board (i.e. mirrored). 

Originally I planned to use IN-12 sockets (purchased from Ukraine) but since the IN-12 part was mirrored, the mounting holes were on the wrong locations and it made no sense to use the sockets. In addition, the parts I got were used, so I had to desolder chunks of 30 year old wiring. Totally boring work. So instead, I went back on Ebay and ordered some pins from the old Soviet Union (see picture above). They were excellent for this purpose.

To test the shift registers, I copied the Arduino code made by Imperkins over at Instructables. The only change was to add support for an additional shift register.

The above film shows the Nixie PCB in action.
As mentioned, it is simple to cascade several PCBs to control more nixie tubes. My secret plan for the future is to use eight nixie tubes as a frequency display for a HF radio, such as Farhans Minima.

Further Reading

1. http://scott-bot.com/nixie-bot/
2. KiCAD library
3. IN-12 datasheet (in Russian)
4. IN-12 geiger counter (with laser cutted parts).
5. IN-12 clock (shares Eagle files and svg of front panel cutout)

Sunday, September 13, 2015

Directional coupler


I have been struggling to understand how my simple dipole antenna works (or doesn't work). The diycrap way to understand stuff is usually to read, build and measure, and then read some more. The key factor here is the measuring part, as I need to measure the standing wave ratio (SWR) on the feed line, as this is a key parameter. To measure the SWR, I need a directional coupler. And it is going to be homebrew.

Later, the coupler is going to be the basis of a SWR-meter, but for now, lets just look at the coupler.

The directional coupler design is classic and well known. Notice the input port and the output port on the upper line and the forward port and the reflected port on the bottom line. (My graphics software is Field Notes.)

Some theory

The principle of the coupler is based on two toroid transformers. The first is a current transformer and the second a voltage transformer. Each taking samples of the signal on the main line. The two transformers are equal, reducing the current and the voltage to the same level, meaning that the impedance is constant. The two transformers are connected in such a way that for a forward signal, the signal cancels out on the reflected sample port, but adds up on the forward sample port. And vice versa, a reflected signal adds up on the reflected sample port but cancels on the forwards sample port. Since we now have a sample of both the forward signal and the reflected signal, it is straightforward to calculate the SWR.

For a deeper understanding on how the coupler works, I recommend this web page, or the excellent YouTube video from W2AEW.


It is simple to construct the directional coupler. The transformers are FT50-43 toroid cores with 32 turns of 24 AWG enamel wire. The primary winding is simply a piece of RG58 through the torioid (i.e., one turn). Different designs use different toroids and number of turns. I settled down on a design found in Arduino projects for amateur radio.

I used a aluminum box and BNC connectors. I used copper clad boards as shielding here and there. I did not have any 50 ohm resistors in my junk box so I used two 100 ohm resistors in parallel. They are all 2W resistors, which is totally unnecessary and overkill.

Rudimentary testing

Testing the forward port. The output port is connected to my 50 Ohm dummy load. As signal source I used my GW Instek GFG-8255 signal generator, which unfortunately maxes at 5.5 MHz. 

8.2 Vpp on the input port resulted in about 244 mVpp on the forward port. Hence, the coupling factor is about -30dB. The signals are not in phase, but that does not matter for voltage measurements in a SWR-meter.

Testing the reflected port

8.2 Vpp on the input port results in 1.60 mVpp on the reflected port. This translates to a reflected signal of -74dB. The directivity is the reflected signal (-74dB) minus the coupling factor (-30dB) which equals -44dB.

Testing over the HF band

Later I borrowed a TTi TG2511 function generator which goes all the way up to 25 MHz. I tested with 10 Vpp on the input port and got these results:

frequency coupling factor return loss
1.8 MHz -30 dB -84 dB
3.5 MHz -30 dB -80 dB
7 MHz -30 dB -75 dB
10 MHz -30 dB -72 dB
14 MHz -30 dB -69 dB
18 MHz -30 dB -66 dB
21 MHz -30 dB -65 dB
25 MHz -30 dB -62 dB

The directivity is between 54 dB and 32 dB. The numbers seem reasonable, but indicates that the coupler should not be used for VHF/UHF.

Future work

The plan is to build a power meter and SWR meter using AD8307 logarithmic amplifiers and an Arduino. I will probably base the device on the design from the book Arduino projects for amateur radio.

Further reading

Sunday, August 16, 2015

Homebrew dummy load

I have created a simple 50 Ω dummy load to test transmitters. I also added a simple RF diode detector so I can measure the peak voltage, and calculate the power.


The dummy load consists of eight 100 Ω resistors rated at 2 W so the load should handle 16 W, at least for short periods. I constructed the dummy load using a combination of ugly construction and Manhattan style, by gluing pieces of PCB  (as isolation pads) on top of a ground plane PCB.  Then I soldered the components directly on the copper without drilling holes.

RF Probe

The RF probe part consist of a simple 1N4148 diode and a 0.01 uF ceramic capacitor. I only had a 50 V capacitor in my junk box, but it should be sufficient given that this is a 16 W dummy load and 16 W translates to 40 V peak.

I added female banana connectors, which connects to a multimeter. The power can be calculated by Ohms law by subtracting the forward voltage on the diode from the measured voltage, then multiply by 0.707 (to get RMS), then square the result and finally divide by 50 Ω. Some homebrewers add a voltage divider to their RF probes using a 4M7 resistor to get RMS voltage directly. I did not bother since I am sure the input impedances on my multimeters varies.

The calculations might seem a bit cumbersome, but I might print out a small lookup table and glue it to the box to have some ballpark figures. However, this is not a precision instrument. The forward voltage on the diode varies with load and can be somewhere between 0.4 and 0.7 V. I simply use 0.5 V in my measurements.

So far, the dummy load has been very convenient when testing my Softrock RXTX and its low pass filter,

Further reading

1. Jeelabs, Forward voltage drop on a diode
2. NXP, 1N4148 data sheet
3. N5ESE, Classic RF Probe

Thursday, August 13, 2015

Lowpass filter for 30m

I just finished a 30m lowpass filter for the Softrock Ensemble RXTX tranceiver.

I used the schematic provided by WB5RVZ

L200 and L201 is wound to about 0.9uH, whereas C200 and C202 is 100pF and C201 is 330pF. Everything is soldered to a PCB (ugly construction) and I added two switches and a coax to enable on and off switching of the filter.

Ugly construction...

I tested the filter using a 25 MHz function generator and my Rigol 1052 scope. The filter was connected to a dummy load. The first two pictures below show 1 Vptp at 10 MHz with the filter off and on respectively. The two pictures thereafter show 1 Vptp at 20 MHz (on and off).

10MHz lowpass filter switched off

10MHz lowpass filter switched on

20MHz lowpass filter switched off

20MHz lowpass filter switched on

As a three pole filter it should have a roll off at 18db/octave. This seems about right when I compared 12 MHz and 24 MHz (9.3V and 0.9V ptp respectively). I measured the -3dB point to be around 14.7 MHz. The purpose of the filter is to reduce the the 2nd harmonic when transmitting in the 30m band (10.1 MHz). The second harmonic is down about 13dB.

Function generator on burst mode, Oscilloscope on FFT, center frequency is 10.5MHz and filter is off

Same as above, but lowpass filter is switched on

I also looked at the FFT on the Rigol scope while using burst mode on the function generator. In the pictures above, the center frequency is 10.5MHz and the grid is 12.5MHz in the X axis and 10dB in the Y axis. Here it seems like the filter contributes to 20dB attenuation at 23MHz which is about right.  I have not measured the second harmonic while using the Softrock, since I have no real spectrum analyzer. However, as the filter is working, I guess I can legally transmit on 30m. 73!

Thursday, July 30, 2015

Upload log files to QRZ.com automatically using LogPusher


Many radio amateurs upload their QSO logs to QRZ.com. Not all logging programs can interface with the QRZ API, and unless you are a subscriber, the API does not work. The log can be uploaded manually, but this is a tedious process.

Hence, inspired by the bash-script by WB4IT I have written a simple C# program (LogPusher) that takes care of the business. All there is to it, is to enter some settings in the dialog: Mainly your user name, password and log book id at  QRZ.com, and point to the choosen log file. As soon as the file changes, it will upload to QRZ.com automatically.


Enter the settings for your QRZ.com account

Make some contacts and wait for LogPusher to upload the new log tile

LogPusher works by first logging in to the front page of QRZ.com and by keeping the session cookie and after that it enters the logbook and uploads the file. It seems simple, but I had to monitor the messages going between Google Chrome and QRZ during manual uploading several times until I got it right. I used Fiddler for this, and it was excellent.

I had great help from this page on stackoverflow discussing how to upload HTTP form entries from C#.

How to get it?

LogPusher is available at Github: https://github.com/DIYcrap/LogPusher/. You may download the code (press download zip at Github) and compile it with Visual Studio 2015 (it is free) and modify it yourself, or you can just use the executable file directly.

Please let me know in the commentary field below if you like the project or if you encounter any issues or if you have any suggestions for improvements. Stay tuned for updates on this project.

Sunday, June 28, 2015

WSJT-X and HDSDR with Softrock RXTX

Introduction - A Raspberry failure

My first (and, as it turns out, rather ambitious) plan was to use a Raspberry Pi 2 as SDR computer for my SoftRock, with Quisk, Fldigi and WSJT-X. The plan was to use VNC to connect to the Raspberry, so I could operate digital modes from all my devices; iPad, iPhone, Mac and so on.

I made all of the above almost work. Quisk was easy to get going, but I struggled to compile WSJT-X. However, after a very time consuming upgrade from Wheezy to Jesse, I managed to make it run. But due to a conflict between Qt (the GUI framework in WSJT-X) and TightVNC, I could not make it run without a display connected. Bummer.

Second bummer: I had a hard time getting my Behringer UCA-202 sound card work correctly,  It seems like that the left channel is delayed by exactly one sample relative the right channel on this card. Reading this, I gave up, and ended up purchasing a Asus Xonar U7. I made the Asus work with the Softrock RXTX, but only on 192KHz, which seemed to be to CPU intensive for the Raspberry. The sound quality was really poor. 

All in all, I gave up on the Raspberry (for now), as I was eager to get the Softrock on the air and make some QSOs.

Softrock RXTX and Asus Xonar U7 in a "Pelicase". Plenty of room for Power supply, LP-filter and SWR meter.

Going all in for Windows

Being a Mac and Linux user for many years, I finally took the plunge and purchased a Windows 7 based Lenovo machine. It was a bit painful, but I came over it.

I now use HDSDR as the SDR program communicating with the Softrock RXTX with I/Q using the Asus Zonar U7. I use 48KHz 24bit at the moment (both directions) although the Asus can go all the way to 192KHz. I do not see the wide spectrum given by 192KHz being all that necessary for digimodes, but is certainly very handy to view the band in a glance panadapter-vise if you are searching for SSB ragchewers or whatever.

To connect HDSDR to digital-mode programs I purchased "Virtual Audio Cable". It was dead simple to set up, and worked with WSJT-X straight away. I also use com0com as a virtual serial port to let WSJT-X enable TX-mode on the Softrock through HDSDR. I have not made full CAT-control working yet, so I have to dial the tuning frequency on both WSJT-X and HDSDR.

I do not know anything about logging QSOs online or shipping QSL cards, but it has came to my understanding that logging as such is important and after a quick search I installed DXKeeper. It is free and it seems to work.

DXKeeper interoperates seamlessly with JTAlert which is a must-have add-on for WSJT-X.

To make all the above interoperate, the applications have to be started in the correct order. Virtual Audio Cable and com0com seems to always work, and can be set and forget. To make HDSDR, WSJT-X, JTAlert and DXKeeper play nicely, I created a small script:

echo off
echo "Starting ham radio software"
echo "Starting DXKeeper"
start C:\DXLab\DXKeeper\DXKeeper.exe
timeout 20

echo "Starting HDSDR"
start "" "C:\Program Files (x86)\HDSDR\HDSDR.exe"
timeout 10

echo "Starting WSJT-X"
start C:\WSJT\wsjtx\bin\wsjtx.exe
timeout 15

echo "Starting JTAlertX"
"C:\Program Files (x86)\HamApps\JTAlert\JTAlert.exe" /wsjtx

I saved it as a *.bat on my desktop. By clicking the bat-file the applications starts in the correct order, and ensures that JTAlert can talk to the DXKeeper database.

HDSDR, WSJT-X and JTAlert. The radio was absent when the picture was taken.

First QSO

With all the above running on my fresh Windows computer I threw out a simple dipole antenna and tried to make some QSOs with JT9 and JT65. M0LMI, Lubomir, from England, answered one the very first CQs sent by my Softrock and minutes later I had made my first QSO! I checked the power with my scope later and it turns out I was only running about 0.5 Watts. After cranking up the power to 1 Watt I made a few more QSOs, and I have to say I am happy with the setup. I have only been running on 20m so far.

JT9 and JT65 may be an easy mode compared to CW, but with limited power and a compromise antenna (I have no idea about the SWR and resonance and all that), you sure have to be patient.

Future work

I still have not given up on Raspberry Pi2, but before working on that, I will build a low-pass filter so I can operate on 30m. I think I also need a decent power meter so I can have an idea on what is going on. It is probably going to be a power meter DIYcrap style.

Saturday, May 30, 2015

Softrock RXTX completed

After finishing up the receiver part of my Softrock Ensemble RXTX SDR transceiver with great success, I got really motivated to get the transmitter going. The last weeks I have followed AB4UG's progress building his own RXTX with great interest, and I got even more motivated to finish my own kit when I saw that he got the last component soldered on his RXTX.

Soldering the last component on the RXTX

Building the TX part was fairly easy after having built the RX part. The first thing after melting the last piece of solder on the board was to make a 50 ohm dummy load using a few resistors, and then to measure the output power with my scope. After that, I balanced the I/Q signals by playing with the TX image rejection settings in WSPR and by watching the transmitted signal on a RTL-SDR receiver. The RTL-SDR operated in a software direct sampling mode to make it work on the 20m band. This setup is not the best tool for this calibration task, but I think I came pretty close in my effort. I might check it up more thoroughly use a spectrum analyzer later.

RXTX is running WSPR

WSPR is an excellent choice for testing out a freshly built transceiver since it gives immediate feedback through Internet if anyone out there receives my signals. After a bit of fiddling, I got the RX mode running directly on I/Q in WSPR, and prayed to the radio gods that the TX would work as well. After verifying that the transmitter did "something" when connected to WSPR (it went hot), I left the softrock running for 24h with about 1W output. Then I just hoped that the black suited government frequency authorities would not kick down my door to revoke my amateur licence due to RF harmonics or for causing QRM on the image frequency.

Both RX and TX is now working in I/Q mode
Luckily the frequency authorities have not been kicking down my door (yet). On the contrary, during one night of operation I have gotten WSPR reports that my signals have reached most of Europe and even across the pond to America!

I can enjoy my working transceiver from my iPhone
I am truly amazed that my 1W transmitter (which I bravely soldered myself) can reach more than 7000 km. Notice that my "antenna" is just an indoor wire dipole (at about 5m length).

If you are listening on 20m and observe that my Softrock emits energy in the wrong parts of the frequency spectrum, please be kind to me. Please. I am a fresh amateur with very limited RF self esteem.

Summary of the build experience

I followed the excellent build guide of WB5RVZ step by step and it was really helpful. The most challenging part of the build was in fact soldering the through hole components on the awfully small soldering pads on the PCB. The SMT parts were mostly SOICs and 1205, which were easy. The Si570 (QFN) were the most challenging. I measured every resistor before soldering and took great care not to make any mistakes along the way. All in all, it was really an enjoyable build and the entire process building the transceiver took about 10-12 hours in total. The only mistake I did was to solder an opamp in the wrong orientation, but that was easy to fix.

Future work

The next step is to test out other WSJT digital modes such as JT65 and JT9 and to make some real QSOs. The goal is to make the Softrock operate stand alone on my Raspberry Pi2.