Wednesday, June 08, 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.


Saturday, June 04, 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.

Sunday, May 01, 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.

Saturday, April 02, 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.




Friday, March 25, 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. 

Saturday, March 12, 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.