Saturday, September 10, 2016

Selling Yaesu FT-101 and FT-7 transcievers

A wonderful feature of ham radio field days is the circulation of second hand radios. This means that you can buy an old radio, play with it for a year or two, and often sell it for the same price.

As a teenager I lusted after the Yaesu FT-7 and remember reading every ad and review with great interest. I'd also seen the classic FT-101 but it was way out of my price range. As an adult I was able to finally purchase both of these and have my (delayed) gratification.

The shack is too full and it's time to pass them on.





They are both up on eBay for the next seven days. FT-101 and FT-7.



Both rigs have sold. 

Sunday, August 21, 2016

Low cost 2.7GHz antenna analyser

Since starting to receive ADS-B signals on 1090MHz I was wondering how well my home made antenna was tuned to that frequency.

I spotted an analyser for AU$236 that covers up to 2.7GHz on Aliexpress here and it seemed worth a try. Here it is with a simple dipole that is reasonably tuned to 1090MHz.


It's advertised as "Antenna Analyzer N1201SA SWR standing-wave meter Talent instrument Impedance tester 140M~2.7GHz" and I'm very happy with it.

The unit contains a re-chargeable battery and is simply re-charged with a USB cable. The knob at the top makes it easy to tune the lower and upper range frequencies.

Output level is -18dBm and it seems on frequency as far as my UHF transceiver is concerned.

There are two modes, one with figures displayed and the other which draws a graph as you see above.


If you need to work in the GHz range, I recommend this little analyser. It turned out my home built antenna for 1090 was a little low and resonant at 1083.3 - not too far off.

Friday, August 05, 2016

WSPR decoding on a headless Raspberry Pi

At last Sunday's ARNSW Home Brew group meeting, Peter, VK2EMU handed me a Raspberry Pi a USB audio dongle and my mission instructions... to set up the Pi to decode and report WSPR spots in a headless configuration.

In the end I've built on the excellent work by DJ0ABR.

I had trouble recording the 118 seconds of audio at a sample rate of 12000 samples per second as it produced buffer overruns. Instead I've used the rec command from sox to record at the native sample rate of the USB audio dongle and then convert the file using sox.

I've pretty much used the code and scripts as supplied, with some modest improvements here and there.

Source code for the decoder is from here. This is a fork of the original code which has gone and been integrated into wsjt-x. I have forked it here and added my versions of the record and decode script and the simpler crontab. I've fixed a few things and pushed those changes to my fork of the code so I'd recommend that as a starting point.

Here's some spots on wsprnet.org reported from the raspberry pi:



Install a library you'll need, and sox which I use for recording:

sudo apt-get install libfftw3-dev sox

In the directory with the Makefile, type "make" to build the software. Also do mkdir wav.

The USB audio dongle is a low cost one called "3D Sound". I found that it picked up lots of hum until a junkbox audio transformer was wired in line.



Find the USB audio card with:
   cat /proc/asound/cards
and then create /etc/asound.conf with following:
   defaults.pcm.card 1
   defaults.ctl.card 1

# set audio levels
alsamixer # graphical in terminal

To allow the pi user access to the audio devices:

sudo nano /etc/group

and add the sound group to the pi user. You'll need to log out and back in for this to take effect.

To test the recording you can record while showing a level meter like this:

arecord -vv -fdat test.wav

Press Control-C to end the recording.

There are two scripts: record and decode. record is called from a cron job every two minutes to record 118 seconds of audio, convert it and kick off decode.

I installed in /home/pi/wsprcan

Here's my version of record:

#!/bin/bash
# WSPR Audio Recorder Script by DJ0ABR
# record WSPR signal at every even minute
# called by cronjob
BASEDIR=/home/pi/wsprcan
# number of files in wav folder
cd ${BASEDIR}/wav
file_num=$(ls -1 --file-type | grep -v '/$' | wc -l)
cd ..
if [ "$file_num" -le "1" ] ; then
        DT=$(date -u +"%y%m%d_%H%M")
RECFILE=${BASEDIR}/wav/wspr_${DT}.wav
        echo recording to ${RECFILE}
        #arecord -d 114 -f S16_LE -r 12000 -t wav ${RECFILE}
rec -V1 -c 1 -t wav ${RECFILE} trim 0 118 &>/dev/null
echo "converting sample rate..."
sox ${RECFILE} -r 12000 /tmp/out.wav
echo removing ${RECFILE}
rm ${RECFILE}
echo moving /tmp/out.wav to ${RECFILE}
mv /tmp/out.wav ${RECFILE}
        echo "running decode on ${RECFILE}..."
        ./decode ${DT} &
fi


Here's my version of decode:

# Script for the K9AN WSPR decoder, by DJ0ABR
# ===========================================
# use the k9an decoder to get the spots out of the wav sound file
# the file 'spots' is used for storing all the spots and debug information
# the file wsprd.out contains the current spots in the format for wsprnet.org
# wsprdsum.out is used as a temporary storage if the upload fails

MYCALL=VK2TPM
MYGRID=QF56OF
BASEDIR=/home/pi/wsprcan

echo decoding >> spots
echo "decoding: /home/pi/wsprcan/wav/wspr_${1}.wav"
./k9an-wsprd -f 14.0956 /home/pi/wsprcan/wav/wspr_${1}.wav >>spots

# the wav file is processed, delete it (it should be in a ram disk folder if an SD card is used !)
rm ${BASEDIR}/wav/wspr_${1}.wav

# check if spots are available
FILESIZE=$(stat -c%s "${BASEDIR}/wspr_spots.txt")
echo data size= $FILESIZE >> spots
if [ $FILESIZE -ne 0 ] ; then

        # add the spots to a temporary file used for uploading to wsprnet.org
        echo add to wsprdsum.out >> spots
        cat ${BASEDIR}/wspr_spots.txt >> ${BASEDIR}/wsprdsum.out

        # upload the spots
        echo upload by curl >> spots
        # ping helps curl to contact the DNS server under various conditions, i.e. if the internet connection was lost
        ping -W 2 -c 1 wsprnet.org #> /dev/null;
        curl -m 8 -F allmept=@${BASEDIR}/wsprdsum.out -F call=${MYCALL} -F grid=${MYGRID} http://wsprnet.org/meptspots.php > /dev/null;
        RESULT=$?

        # check if curl uploaded the data successfully
        # delete only if uploaded
        if [ $RESULT -eq 0 ] ; then
                # data uploaded, delete them
                echo Upload OK, deleting >> spots
                rm wsprdsum.out
        fi
        echo curl result: $RESULT , done. >> spots
fi

Please replace VK2TPM with your call and grid square.
The crontab file:

# Start WSPR Recording at every even minute 
*/2 * * * * /home/pi/wsprcan/record

To see what's going on you need local email. I installed postfix and mutt for this. There's a log file called spots that shows what's going on and any decodes:

decoding
0648 -15 -2.5  14.097089 -2  K6PZB CM88 37 
0648 -20 -2.9  14.097099 -2  VK8ZI PH57 23 
0648 -24 -2.7  14.097116 -2  KD6RF EM22 37 

data size= 222
add to wsprdsum.out
upload by curl
Upload OK, deleting
curl result: 0 , done.
decoding
0650 -23 -2.6  14.097048 -2  K5XL EM12 33 
0650 -20 -2.1  14.097072 -2  AL7Q BP40 37 
0650 -19 -2.7  14.097158 -2  JA5NVN PM74 33 

data size= 222
add to wsprdsum.out
upload by curl
Upload OK, deleting
curl result: 0 , done.

So far I haven't used the ram disk but that's probably a good idea in the long term.

I also tried VisualWSPR which looks hopeful but crashed on startup for me. 

Thursday, June 09, 2016

What's inside an SDRPlay

I love tuning around HF with an SDR display, it's great to see the whole band in one go.

The recent v0.1.20-alpha update to CubicSDR works very well on MacOS and in particular with the SDRPlay. These things just look like a black plastic box and I haven't seen any pictures of the internals so here you go:



As you see not much there, but it has 8 automatically switched input band pass filters. Full technical information is here.

It interfaces with SDR software via SoapySDR:


And works really well.


Sunday, June 05, 2016

ADS-B Plane tracking with RTLSDR and Raspberry Pi

It's raining this weekend in Sydney so it's a good time to tinker with things indoors. Thanks to Ross, VK1UN for the tip, I'm now able to receive the location beacons from planes and plot them like this:



ADS-B transmits information about a plane and its position and speed on 1090MHz.

The hardware is a Raspberry Pi 3 and a low cost RTLSDR dongle. The software provides both a terminal live listing of what's been received and the amazing map you see above (which updates live).



Excellent instructions are here. All credit to David & Cecilia Taylor for the excellent job. I'm not uploading any data but rather am just watching what I can receive locally.

The command I run to produce this is:


./dump1090 --quiet --net --phase-enhance --net-http-port 8080&

And then I forward port 8080 from my router to the IP of the raspberry pi.

To run interactively on a terminal do this:


./dump1090 --interactive --net --phase-enhance

On the terminal you get a text version like this:



I found that the Terratec RTLSDR didn't need a powered hub on my pi which is powered from a modern iPhone charger. The antenna is the small TV vertical just sitting near a window facing south and it works amazingly well.

Ross, based in Melbourne, has been making co-linear antennas from coax and is doing much better than me at receiving both numbers of planes and distance. Check this out:


Update: Dramatically improved antenna

Under the direction of Ross, VK1UN, I've built an improved external co-linear antenna.

I'm using RG6 75ohm coax. The segments are 11.2cm long cut like this:


The segments are pushed together simply by pushing the centre of one under the insulator of the next.


The antenna is on the balcony pushed up a plastic pipe.


Previously the furthest plane I could receive was about 85km away, now I've seen planes over 300km away. I'm also seeing more planes.



Update

I've neatened up the antenna by purchasing some 25mm pipe and an end cap - about $5 all up.

Saturday, May 14, 2016

40m doublet antenna - excellent

This weekend some antenna work. I've put up an open wire fed "doublet" antenna for 40m and of course all bands up from that. The centre insulator is made from a piece of perspex.


The open wire ladder line runs down to the shed and terminates to a 4:1 balun I previously used for an off centre fed antenna. From the balun it goes into a transceiver with internal tuner that is able to tune it on all bands from 40m up.


The tree holds a few other antennas including an inverted L for 80m, and one end of a half G5RV.

So far my observation is that noise is low and signals are big, it's great to have the flexibility of multiple bands in one simple antenna.

Monday, May 02, 2016

Fifi SDR control app for MacOS

One of the intriguing things about the Fifi SDR is that as well as I/Q output via an in-built USB sound device it also has the ability to demodulate built right in and that audio output appears as an additional sound device.

The Fifi SDR can be controlled using the same API as a Softrock so I've started work on a native MacOS app that can control the frequency, bandwidth, demodulation mode and play through the audio. It's pretty rough so far but looks like this:



The code is based on rockprog and Apples AVRecorder sample.

So with just the Fifi box and this software you have a simple radio that tunes all of HF and plays through your Mac's audio. If you want the full, waterfall style, experience then I recommend DSP Radio which also supports Fifi.

You can download the alpha app here. As I haven't signed it you will need to right click (control click) and choose Open the first time to open it.

Be careful not to choose built-in audio from the input device and turn up the volume or you'll get feedback. Speaking of feedback, let me know if you find this useful.

Update

Build 2 has the following improvements:

  • Automatically selects the FiFi audio device if found
  • A button to set the frequency directly
  • A tuning slider - I'm still experimenting to get this working nicely.
On my device anyway, the frequency is off. I'll have to look at how to fix this.

Sunday, April 03, 2016

Fifi SDR - like a Softrock but with a built-in sound card

The nicest way to tune around is with a software defined radio. Being able to see a wide area of a band and simply click on the active signals is superior to spinning a dial up and down. This weekend a Fifi SDR arrived from Germany. They cost around 140 Euros from Funk so in a different bracket to the low cost RTLSDR devices.

This radio looks to the computer like a Softrock and frequency is controlled using the i2c USB interface to the Si570 clock oscillator. It has I/Q audio out but much more convenient is the built-in USB audio device which can do up to 192kHz. The USB audio worked without any extra driver install.

While it's a kit, all the hard stuff is done for you and you're just left to solder a few connectors, plug in a transformer and construct the case. Here's how it comes.


It's a nice snug fit in the excellent quality metal case.


It worked on first power up and I'm using it with SDRSharp and other software without too much messing around. Here's a few videos showing how it looks tuning around 40m.




Saturday, March 26, 2016

Graphing temperature on DataDog from an esp8266

One of my colleagues, Jules, is totally hot. I think his desk is under an air conditioning vent or perhaps he just works too hard. Anyhow, it gave me an idea. Recently we've been using the cloud logging service DataDog to send data to and have it graph and alert us. I wanted to log the temperature from an esp8266 01 board.


DataDog has a simple API for sending measurements to which you post JSON with an array of data points and a unix timestamp. Then you can make up dashboards with graphs like this:



The temperature and humidity sensor is one I grabbed at Jaycar, they call it a Duinotech XC4432 that contains a DHT11 sensor. Unfortunately the resolution seems only to be a degree so I'm waiting for something better to come in the post.

Because DataDog wants a time stamp with every reading, I get the time from an NTP server. The code is mushed together from three samples:

  • DHTester from Ladyada
  • The ESP8266 BasicHttpClient (but using POST instead of GET)
  • The UdpNtpClient from the Ethernet library
I'm using GPIO 2 on the esp8266 to read the sensor. 

Sunday, March 13, 2016

PlatformIO, the Arduino IDE for programmers

The Arduino IDE is a great way to get started with embedded programming. It combines an editor, library manager, board manager, examples, programming tool and serial monitor all in one easy to install application.

As a programmer I'm used to my editor understanding the code and helping me out by suggesting what I might like to type next and showing me errors right in line with the code.

Here's PlatformIO in the Atom editor suggesting completions to Serial.


I also like the cool dark look.

PlatformIO is a set of command line tools that can be hooked in to various text editors but the easiest way to get started is to download the IDE they've made from the GitHub Atom editor here.

Although Arduino code is c++ the actual files aren't strictly c++ so a few changes need to be made to get some sketches ported over.

Typically you'll need to #import arduino.h and put a function declaration above where a function is first called.

(PlatformIO has the ability to import an Arduino sketch too).

Here's how Blink looks:

#include <Arduino.h>

// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin 13 as an output.
  pinMode(13, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(13, HIGH); 
  delay(1000);              // wait for a second
  digitalWrite(13, LOW);    // turn the LED off 
  delay(1000);              // wait for a second
}


To use external libraries you've imported into your Arduino environment you need to add the path to that library directory in the platformio.ini file.

; Here's the trick for finding Arduino libraries
[platformio]
lib_dir = ~/Documents/Arduino/Libraries

; Windows OS / "piolib-arduino" project
; [platformio]
; lib_dir = ~\Documents\Arduino\libraries


; Linux OS / "piolib-energia" project
; [platformio]
; lib_dir = ~/sketchbook/libraries

The environment  It supports more than 200 development boards along with more than 15 development platforms and 10 frameworks. It took me a while to find the esp8266 board I have, (search for board might be a good feature), but when chosen programming worked perfectly and it figured out the serial port automagically.

This looks like a great way to explore the Internet of Things.

Welcome to the Reddit community, there's an interesting thread here.

Installing on MacOS "just worked" but that's probably because I already have Xcode installed. On Linux I needed to install clang to get code completion going, but the IDE told me what was missing. I'm sorry I can't help Windows users.

Saturday, March 12, 2016

Minimal esp8266 board runner

I've been playing with the interesting esp8266 which can be programmed with the Arduino IDE and has built in Wifi capability. Today I made a little carrier board for just running the projects. My first time using Fritzing which is an amazing piece of software (although do save frequently).



The diode drops the 3.7 volts from the Lipo cell down to a safe 3.1V and all seems to work nicely.

WSPR via WSJTX on Raspberry Pi 3

My thanks to Ross, VK1UN, for the following instructions which allow the easy installation of WSJTX on a Raspberry Pi 3 (and earlier is no doubt fine too) running Rasparian.

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 862549F9
sudo nano /etc/apt/sources.list

Add the following to the end of the sources.list file:

deb http://ppa.launchpad.net/ki7mt/wsjtx-next/ubuntu trusty main

Ctrl-X to save and exit.

sudo apt-get update # important
sudo apt-get install wsjtx

Then just run from the command line the first time to see any errors, after that run it from the Ham Radio applications menu.

I'm running a SignaLink USB interface and controlling an FT-817 via Hamlib. It correctly found the audio interface on first run.


Here it is sitting on top of the PC tower it has replaced.


Tuesday, March 08, 2016

ABC iview now on Apple TV 4

This might surprise my radio friends, but by day I'm a software developer. We've just finished a new version of ABC iview (only available in Australia) and I wrote some notes on the project here.


It's a real treat to work on software that gets used by large numbers of users and to read all the comment and criticism on social media. If you have the new Apple TV and live in Australia, we hope you'll try it out.

Sunday, March 06, 2016

Purchased toaster oven - not reviewed by Siracusa

We have a toaster and we have an oven, but we don't have a "toaster oven". Recently Phillipa has been producing a huge crop of home grown tomatoes and they beg to be sliced and have cheese melted over them, but the oven is so big it seems like a waste to grill things in it.

On Saturday, I slipped out and came back with this $59 beauty:



It has elements at the top and bottom. Here's the first result (after running it for a while to burn the plastic coating off the elements).




What's great about these little ovens is that they come up to temperature extremely quickly. Hilariously the instruction book includes recipes for roast pork and lamb.

When I posted a picture on Instagram of the new toy, several people asked if it was a model that had been reviewed by John Siracusa in his excellent series sponsored by Cards Against Humanity. Checking the list, it's not. I recommend this one so far though.

Sunday, February 28, 2016

Beautiful day at the Wyong field day 2016

This year was a perfect day for the annual Wyong field day.


Rowetel had a table this year showing FreeDV and the SM1000s were selling like hot cakes.


Something I hadn't come across before was the excellent (for communications) JRC ST-3 headphones.


The Home Brew Group had a display with amazing work from all including Stephen Vk2BLQ and in the background you can see my tiny crochet loop antenna.


Arduinos and other small computers continue to draw radio folks over to "the dark side" and John VK2ASU showed his serial radio link experiments.


There were lots of great old radios for sale, but I resisted this year.





As always it was great to catch up with many new and old friends including John VK2JPM, William VK2NWB and Nigel who has the very latest in phone technology.


Finally, hidden away at the amateur TV display were some incredible home made - working - valves.


My thanks to the organisers who ran a terrific show again this year. I loved the tea and cheese cubes and experienced a new dish not tried before - sausage on a stick.


Hmmmmm.

Friday, February 26, 2016

esp8266 Arduino programming

The esp8266 is a tiny board that costs from about $5 and has a processor with Wifi capabilities. I bought a pack of the 1Mb upgraded version.


Following these instructions I've built a rat's next of a programmer:


My USB serial interface has a jumper for 5 or 3V so I set it to 3V and there was no need to add the voltage regulator. So far I've got it to join my wifi network and pull a web page.

I'm able to program it with the Arduino IDE which is convenient.

Using code derived from Sparkfun I'm able to create a hotspot with a web server on it.


The device has two GPIO pins and a serial port so it can be used to monitor and control devices. John, VK2ASU, drew my attention to the incredible range some experimenters have been getting from these modules.



At the Wyong field day I had a great chat with someone from the Sparkcc group who is using even lower priced esp8266s than me.

Monday, February 22, 2016

Compiling VfoSource from QST's excellent article on DDS for Forty-9er

QST March 2016 has a terrific article on using a DDS controlled by an Arduino to be the VFO for a cheap CW transceiver known as the Forty-9er.

Download it here: http://www.arrl.org/files/file/QST%20Binaries/Mar2016/Purdum-Zia-Kidder.zip

But the instructions on compiling the code leave a few things out and I thought I'd document it here for others who might run in to problems.

  • I'm Running Arduino 1.6.7 from: https://www.arduino.cc/en/Main/Software
Opened VfoSource

Users/marksp/Downloads/Purdum-Zia-Kidder/VfoSource/VfoSource.ino:11:76: fatal error: rotary.h: No such file or directory
 #include <rotary.h>   // From Brian Low: https://github.com/brianlow/Rotary
                                                                            ^
compilation terminated.
exit status 1
Error compiling.

--

Went to Sketch - Include Library - Manage Libraries
Searched for Rotary but not found.

--
 
Now, following the instructions from the top of the source code.

Went to https://github.com/brianlow/Rotary
Clicked the "Download ZIP" button which downloaded the zip file.

Choose Sketch - include library - Add .Zip library and chose the downloaded Rotary-master.zip.

Choose Sketch - include library - Chose Include Rotary-master.

I note that the IDE now shows:

#include <Rotary.h>   # Note angle brackets around Rotary.h (I can't get this blog to include them)

rather than

#include <rotary.h>

So case is important.

Clicked the tick and the error now is:

VfoSource.ino:21:31: fatal error: LiquidCrystal_I2C.h: No such file or directory
 #include <LiquidCrystal_I2C.h>
 
--

Visit https://bitbucket.org/fmalpartida/new-liquidcrystal/downloads

Downloaded the latest LiquidCrystal which for me is LiquidCrystal_V1.2.1.Zip

Unzip the download to LiquidCrystal. I renamed this to LiquidCrystal_I2Cqst to avoid a collision with an existing library.

Copied these files over to that directory:

LiquidCrystal_I2C.cpp
LiquidCrystal_I2C.h
I2CIO.cpp
I2CIO.h
LCD.cpp
LCD.h

Choose Sketch - include library - Add .Zip library and chose the folder LiquidCrystal_I2Cqst
  • Choose Sketch - include library - Add .Zip library and chose the folder LiquidCrystal_I2Cqst


Hit the tick and all compiles now:


Sketch uses 9,460 bytes (30%) of program storage space. Maximum is 30,720 bytes.
Global variables use 544 bytes (26%) of dynamic memory, leaving 1,504 bytes for local variables. Maximum is 2,048 bytes.

I hope this saves someone else a little frustration.

Sunday, February 07, 2016

CubicSDR with SDRPlay on Linux

I love tuning HF with this configuration. CubicSDR is a very good piece of software and it's open source.  With an SDRPlay device you can see the whole band at once and click to listen in. Here's a little video.


I wish the SDRPlay USB driver wasn't closed source so it could be built in to software.