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

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 automatically using LogPusher


Many radio amateurs upload their QSO logs to 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, and point to the choosen log file. As soon as the file changes, it will upload to automatically.


Enter the settings for your 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 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: 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.