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

Introduction


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.

LogPusher


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. 

Friday, May 22, 2015

Building a SoftRock Ensemble RXTX SDR

Introduction


The last couple of months I have been listening a lot to the soldersmoke podcast. In case you do not know, it is two guys, Bill N2CQR and Pete N6QW babbling about building homebrew radios. I am very happy I found this podcast. It is highly inspiring, and by listening to the two experienced homebrewers I immediately wanted to melt some solder and build radios myself. Hence, I had to get myself a licence (got it last week: LB0MG) and start soldering radios.

As much as  I would like to be in the possession of a totally homebrew fundamentalist discrete component ham radio station (like Bill N2CQR), I concluded that I rather should start out with a kit. (I guess some homebrew fundamentalists threw up a bit now since I mentioned the word "kit").

Building the Softrock RXTX


Anyway, choosing a kit I might as well do it the modern way and build a SDR. I initially considered the PeaBerry SDR, but ended up with the Softrock Ensemble RXTX SDR Transceiver kit since I have the required sound card capabilities laying around after my previous synth projects.



The kit is nicely packaged and contains about 250 parts. Some through hole and some SMT.
I am pretty sure I will not do much contesting in any perceivable future so I choose to build the Softrock for the 17m, 20m, and 30m bands (two contest free bands).

There is an excellent build manual on the pages of WB5RVZ.  I addition I have had great use of some of the videos from W2AEW to understand the concepts of SDRs and to improve my toroid winding technique. He has some of the best engineering videos on the entire Youtube.


Progress


So far I have built the entire RX part of the kit and it has come along quite nicely. The SMT parts are rather easy to solder. Surprisingly enough, the through hole parts are a bit more challenging since there are very little space around the components, and the pads are really small and not gold plated. A lot of flux really helps.


The only mistake I did was that i lost the LT6231 SMT RX opamp (probably in the vacuum cleaner). Straight away I ordered two new chips from DigiKey and when they arrived at my door merely 36 hours later, I was so eager to get the RX working, that I accidentally soldered the small SMT chip in the wrong orientation. Hence I had to use the second one (glad I ordered two of them). But it worked! I got a small Image rejection problem, but traced it down to a setting in the sound card I used (Behringer UCA-202).


In the above picture you can notice the excellent indoor dipole "antenna" connected to the Softrock. The length of the dipole is about 5m, so It is not the best choice for receiving either of the bands. I guess some you antenna fundamentalists threw up watching this picture, but hey, the antenna sort of works. 


To please the homebrew fundamentalists out there, I used my 22 year old homebrew LM317 bench power supply to provide clean and pure 12V DC.


I connected the receiver to HDSDR, grabbing the I/Q signals. I have received SSB, RTTY, WSPR and JT65 on 17, 20, 30 and 40m bands. In the above picture you can see some digital signals popping in at 20m. I tried to use WSPR software directly on the I/Q signals from the radio but with little success. I had to output USB audio from HDSDR via a second sound card and then into WSPR.







From my perspective the RX test was a great success. Even with the indoor "antenna" I received WSPR on 30m from 60 different transmitters over a 24h period, and even across the pond. You might see LB0MG in the above map: Yeah, that's my Softrock sniffing RF from the ether, placed in an attic in Norway. 

I even got reports coming in from K1JT (yes, the Nobel laureate, Joe Taylor, that created WSPR) himself and got a bit starstruck. It is funny to think about the fact that he was transmitting his modest 5 Watts from New Jersey, and that my home soldered Softrock received his RF vibrations all 6000km away, even with a crappy piece of wire as antenna. The radio gods are undoubtedly on my side on this one.  

Now, I am eager to generate some RF myself and will get on finishing the TX part.

Thursday, May 14, 2015

OpenPanTilt electronics

It has been a while since I made the OpenPanTilt prototype. It is now available on Thingiverse:655790 and I am quite surprised about the feedback and attention it has gotten. Billions of people have now downloaded the design files (at least 430) and millions have asked me about the electronics (at least three individuals). It is about time that I provide some details. (I also plan to publish a few more time lapse videos to show this magnificent piece of equipment in action.)



The electronics consist of an Atmel ATMega328P-PU a.k.a barebones Arduino. The AVR is run on 16MHz and driven by 5V from a 7805 regulator. It can be bootloaded using something like this. Two optocouplers drives the camera (shutter and focus). I guess any optocoupler will do, but I used 4N35. Besides from a reset switch and some filtering caps here and there, thats it.

The stepper motors are driven by easydriver stepper motor drivers. I made room for three of these on the board, so it can drive a camera dolly in addition to pan and tilt.

The schematics was created in Kicad. This was my first project in Kicad, and since I was impatient, I used the autorouter in Kicad according to the instructions at Wayne and Layne.  I think the autorouter performed well for this small project.

When the board seemed fine, I created the gerber files using this guide at Toymaker Television. Notice the "mirror X-axis" when creating the drill file. Finally, I submitted the gerbers to OSH-park. The project can be found at OSH-park if you are interested.



The PCBs have excellent quality and the soldering goes like a blast.


Two Easydriver stepper motor drivers are fitted on the PCB (room for one more).



The user interface is simply a TM1638-based 8x7segment display with control buttons. It was ordered from China and can be found everywhere on the interweb. I soldered some wires going from the TM1638 PCB to my own panel mounted control buttons.



In the above picture you can see the extremely simple user interface. It works as follows:
  1. Use the buttons to pan and tilt the head to the desired start position.
  2. Press P1 (programs the start position).
  3. Use the buttons to pan and tilt the head to the desired end position.
  4. Press P2 (programs the end position).
  5. Press Start. The Pan/Tilt head will now return to the start position and will start shooting.
You can optionally press the Menu button before programming to set the interval between each step and each picture.
This is extremely easy, but it works. The display shows the number of pictures shoot and the current pan/tilt position. I choose to use a 7-segment display just because I like the old school looks of it. A 20x04 LCD with a rotary encoder would, of course, be more sensible.  


The box has connectors for 12V DC, camera (shutter and focus), Pan stepper motor, Tilt stepper motor and an auxiliary stepper motor.

Some mistakes 


I did some mistakes while building the control unit. If you want to build something similar, you should try to avoid these.

First of all, the 12V power header for the stepper drivers was was reversed on my PCB layout, meaning that the driver did not initially get any power.


Hence, I had to modify the mounting of the easydrivers a bit (notice the white wire on the above picture). No big deal, but it means that you should not order these boards from OSH-park, even if the board was selected amongst the staff picks of the week. :-)

A second error on the board is that there is no protection whatsoever on the 12V DC. No diode, no polyfuse, no fuse. Nothing. At least a diode should be placed in there, somewhere.

A third thing that I was not aware of is that the easydriver board must be connected to a load. Without a load (i.e., a stepper motor), the driver IC will burn up. Totally stupid, but I burned up two boards this way, and had to wait forever to get some new boards from Shenzhen, China. Thankfully, they are easy to replace.

Summary


Ok. Thats it. I learned a lot while building OpenPanTilt. And, best of it all, it works. If you want to build something similar, or have comments, please let me know. I know Josh Sheldon was inspired by OpenPanTilt and has developed some of the ideas further, and I must say, with impressive results.