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.


Sunday, January 31, 2016

QSL card for 100mW contact 16,194 km hand delivered

Yesterday I was emailed by Marek Petko, OK1BIL, of the Czeck Republic, who is visiting Australia for work. He noted that I had received his club's 100mW U3 WSPR beacon on 20m. Today at the ARNSW trash and treasure meeting, we met up and he handed me a QSL card.


Here's the report in the WSPRnet database:


The club is running a multi-band vertical antenna at their end and on my side it's a half size G5RV. The transceiver is an FT-817 and WSJT-X is running on MacOS.

Marek alerted me to the WSPR Challenge site which ranks wspr reporters on their relative 'receiving power'. I note that I'm the winner of the total of the distance to transmitting stations that I receive, presumably being in Australia and very far from everyone else helps us VKs:




I'm happy with my overall world ranking on 20m, the highest I've seen is 8.




Sunday, January 24, 2016

Cheap Windows 10 tablet running SDR# with SDRPlay

Wanting to get some hands on experience of Windows 10 in tablet mode led me to pick up a very reasonably priced Teclast tablet via Banggood. It's a "Teclast X98 Plus 64GB Intel Cherry Trail Z8300 Quad Core 1.84GHz 9.7 Inch Windows 10 Tablet PC".

The feature that attracted me is the screen resolution of 2048*1536, most of the cheap ones are much less.

I paid AU$276 including postage but the price seems to have crept up a little since then.

One thing I wanted to try was to see how well it would run SDR software so here it is running SDR# with an SDRPlay (which is powered by USB from the tablet).



As you see it's pretty usable although a bit more CPU performance would make the drag tuning smoother. This really has to be the future of radio receivers and possibly transceivers. A big responsive touch screen showing the spectrum is a great way to see what's on the band. The SDRPlay has a particularly wide band so you can zoom out to find activity.

Friday, January 22, 2016

Digital QST - does anyone like this reader?

I recently re-joined the ARRL so that I can get QST magazine. These days I prefer to read books on tablets or a Kindle. I was hoping that in the years since I last subscribed it might have improved but alas it's as bad as before.

The publishing and reading system is the proprietary nxtbook system. I'm an iOS user, it might be different on Android, but I find the reading experience:

  • Slow
  • Ugly
  • Extremely annoying to use
Judging by the "Digital QST FAQ" I'm not alone in having a bad experience.


Why is QST in digital format instead of PDF format?

"Research has shown that those who read magazines on electronic devices prefer this type of format. The digital format also allows us to use multimedia content and other features that are not available with "raw" PDF files. In addition, the Nxtbook digital format allows us to use digital rights management so that the digital edition of QST  cannot be viewed or downloaded unless you are an ARRL member."

Really ARRL? What research is this?

My QST app is slow and/or crashes. What can I do?

"We are sorry to hear that you are experiencing crashing and download problems. For best performance, shut down any other apps running in the background, force quit the app, then re-open it, or turn your device off and then turn it back on. Finally, you can try deleting and re-installing the app."

Hmm, or fix the app.

I suspect that the reason the ARRL has gone with the horrible nxtbook technology is that it appeared to offer some sort of DRM (digital rights management). Aside from a tiny bit of security through obscurity, this is certainly not the case at the moment.

I'll refrain from revealing the details but it seems that after a bit of logging in and reading JSON, pages of the magazine are downloaded by the app as simple JPEG image files with guessable urls like this. Click and you'll find that the image urls are not protected at all.

Others, like MikeW have proposed schemes to print to pdf from the app, but that is not a good solution (but again illustrates that the ARRL are being ripped off if they think they are buying DRM).

What I want, as a digital reader

First, what I don't want... tablet screens are mostly too small to show a full printed page with three or more columns of text. Zooming in and out is painful. Don't give me an image or even a PDF of the printed magazine.

The native reading experience on iOS iBooks, Android's reader and the Kindle reader are all excellent. They each have DRM that pretty much works.

I recommend selling QST (and that goes for you too WIA Amateur Radio Magazine), through each platform's native publication system. Arrange the content as a stream of single column text (with images) and give up the page layout.

This means that users can choose how they view, can increase or decrease the font size and pay you for your good work.