Sunday, November 10, 2019

MLA-30 active receive loop antenna

After reading a glowing review of the low cost MLA-30 active receive loop antenna, I ordered one from Aliexpress for just AU$55. Here are my initial impressions.

The components are of good quality and you get a generous run of coax.


The phantom power box is good (although the power LED is very bright). It's powered from a micro USB socket which might add to the noise floor.


I installed it on the balcony on a PVC pipe. I haven't done a good job of getting the steel wire to be circular but it's a good start. At least it has a low wind profile.


Comparison here is rather unfair on 40m as I have an excellent dipole. Here's reception on the dipole.


Here's reception on the loop. The noise floor is certainly higher.


Of course, the benefit of the loop is that it covers all of HF so beats the dipole on bands like 80m.

Here's a snippet of the ARNSW Sunday broadcast received on 80m using the loop.



Connectors are SMA which works well with SDR receivers. Here is a recording of 9MHz shortwave using the loop. It's not as good as my big dipole but I'm really impressed with what you can hear with a small loop on the balcony.


I'm impressed with this receive loop. If you have space for a full size dipole then that's the way to go but if you only have a balcony then this is a great way to listen.

G8jnj has reverse engineered the circuit of the MLA-30 here.

Check out this comparison from "Scanner and SDR Radio" between several receive loops, some much more expensive.


The author has replaced the co-ax with better stuff and used a larger loop.

Wednesday, November 06, 2019

13 Minutes to the Moon - interesting podcast

Thanks to talented friend Aidan Roberts, I've just listened to a fascinating podcast series from the BBC World Service called "13 Minutes to the Moon". You can get it by searching in your podcast player or downloading here.

The series tells the story of Apollo 11 but in particular examines the final descent to the moon and the things that went wrong, including communications failure and the 1202 (and 1201) overflow alarms from the flight computer.

As well as different versions of the audio from the mission, there are original interviews with some of those involved. I've read several books about the Apollo program and there was new material for me in this.

The music for the podcast is by Hans Zimmer and he's even interviewed about his memory of the landing. You've got to take podcasts seriously now that they have music composed by the guy who wrote themes for Interstellar and many others.

Friday, November 01, 2019

First experiment with LoRa transceivers

LoRa is a fascinating radio system for low power but long range digital data communications. Low cost transceivers claim a range of 15km. John, VK2ASU, has been working with these for a few months with an application involving reporting activity at a remote site.

I also came across LoRa when talking with the City of Ballarat for a GovHack story. They put a LoRa Gateway up on the town hall and are using it to collect data from all over town including things like rubbish bins reporting their fullness.

Here's my hardware setup. (Receive and transmit sides look the same).


I'm using cheap Arduino Nano Pros. They need to be 3.3V to talk to the LoRa Module.

The modules I purchased are RA-01 SX1278 on 433MHz. They were AU$8.67 each (but cheaper if you buy 2 or more). For starters I'm using ones with the little spring antennas and obviously better antennas help them go further.



With one at the extreme end of the house to the other here's the received packets.


So none are being lost. I'm not sure if the protocol re-sends if there's no ACK.

The Arduino library is one of the ones available right in the IDE. It is by Sandeep Mistry and the source code and documentation is here. To get started I wired up to Arduino Nano Pros using the wiring diagram from this excellent tutorial. The examples titled "LoRaSender" and "LoRaReceiver" work well and the only change is to set the frequency to 433E6 (meaning 433MHz) on each end.

There are many levers to adjust with LoRa and you can trade of data rate for range. John ASU advises that he uses these settings:

TxPower (20,20);
Spreadfactor (12);
Bandwidth (62.5E3);

I'm just using the defaults for now.

The tutorial mentioned that the 3.3V supply from the Arduino wasn't sufficient and that may be the case at higher transmit power levels, but for me it's working from the VCC line on the board which is powered by the USB Serial board I use.

The LoRa physical protocol

LoRa is a proprietary protocol but, naturally, this puzzle has led to some excellent work to figure out how it works.


On a waterfall, the spectrum shows what people call "chirps", that is the frequency sweeps rapidly up or down. Here's a picture from the GRCon16 video above by Matt Knight.


The receiver looks for the regular header at the top and uses that to sync up with the transmitter before the data packet begins. Note that the image above is vastly expanded. I've tried to view this with an RTL-SDR dongle in SDR# and all you see is very brief signals for each packet.



Thursday, October 24, 2019

Review of Australian Broadcasting Services in the Asia Pacific released



The long awaited review of Australian Broadcasting Services in the Asia Pacific has been released and is available here.

The 193 page report has been prepared for the Department of Communications and the Arts. The review was announced in September 2017.

I'm particularly interested in that it specifically includes the role of shortwave broadcasting. Australia has ceased shortwave broadcasts.

An interesting conclusion in the report on page 128 is that the authors estimate that shortwave broadcasts to the Asia and Pacific by Australia have a net economic benefit since 2007-08 of $40.3 million.


Supporters of Australian Broadcasting in Asia and the Pacific (SABAP) (I am a member). Has issued an initial response.

Wednesday, October 23, 2019

ESP32 OLED display of power generated via Fronius inverter

This is a followup to an earlier post where I used an ESP8266 to connect to Wifi and call a JSON web service on my Fronius inverter to show the current power being generated by the solar panels here on the house.

Since then, I've moved on to marvellous little boards that combine an ESP32 with an OLED display.


(Yes, I'm rushing to finish this before the sun goes down).

The Fronius inverter joins the home wifi network and has a simple web service endpoint that returns JSON data.

To compile this you'll need:
Settings in the Arduino IDE are:

  • Board: WEMOS LOLIN32
  • Upload speed: 921600
  • CPU Frequency: 240MHz (WiFi/BT)
  • Flash Frequency: 80MHz
  • Partition Scheme: "Default"
  • Port: "/dev/cu.SLAB_USBtoUART" (Note that I'm on macOS)

Documentation is a bit of a puzzle and some of the examples are wrong for this board. The magic I needed to talk to the display on this board is:

SSD1306  display(0x3c, 5, 4);

To program the ESP32 board from the Arduino IDE, the trick is to click upload and wait until it starts showing "Connecting........_____.". Then hold the "Boot" button, and let go when it starts uploading code.

For my own future reference (and you never know, this might help someone else), here's my code. I was using Arduino 1.8.10 but have now switched to Visual Studio Code with PlatformIO. (Note that Angle Brackets don't work on Blogger so the include files have quotes in place of them). Don't forget to fill in your own WiFi SSID and Password.


#include "SSD1306.h" // alias for `#include "SSD1306Wire.h"`
#include "WiFi.h"
#include "ArduinoJson.h"
#include "HTTPClient.h"

// Fronius Inverter
const char *HOST = "192.168.86.23";
const char *SSID = "XXXXXX";
const char *PASSWORD = "XXXXXX";
const long kMaxPower = 3300; // maximum watt for the bar graph
const int16_t displayWidth = 128;
const int16_t displayHeight = 64;
  
// Initialize the OLED display using Wire library
SSD1306  display(0x3c54);
void connectToWiFi(const char * ssidconst char * pwd);

void setup() {
  // put your setup code here, to run once:
  //Serial.begin(115200);
  display.init();
  // display.flipScreenVertically();
  display.setContrast(255);
  display.setFont(ArialMT_Plain_24);
  display.setTextAlignment(TEXT_ALIGN_CENTER);
  connectToWiFi(SSID, PASSWORD);
}

void connectToWiFi(const char * ssidconst char * pwd)
{
    WiFi.begin(ssid, pwd);
    while (WiFi.status() != WL_CONNECTED) 
    {
        delay(500);
        //Serial.print(".");
    }
    //Serial.print("Wifi connected");
}

void displayThis(String textlong power
{
  display.clear();
  display.drawString(displayWidth / 216, text); // x,y
  const int16_t barHeight = 8;
  
  display.drawRect(0, displayHeight - barHeight, displayWidth, barHeight);
  long barWidth =  power * displayWidth / kMaxPower;
  display.fillRect(0, displayHeight - barHeight, barWidth, barHeight);
  display.display();
}

void loop() {  
  if((WiFi.status() == WL_CONNECTED)) {
        HTTPClient http;

        String url = "http://" + String(HOST) + "/solar_api/v1/GetInverterRealtimeData.cgi?Scope=System";
        http.begin(url);

        // start connection and send HTTP header
        int httpCode = http.GET();

        // httpCode will be negative on error
        if(httpCode > 0) {
            // HTTP header has been send and Server response header has been handled

            // file found at server
            if(httpCode == HTTP_CODE_OK) {
                String payload = http.getString();
                
                // Allocate the JSON document
                // Use arduinojson.org/v6/assistant to compute the capacity.
                //const size_t capacity = JSON_OBJECT_SIZE(3) + JSON_ARRAY_SIZE(2) + 60;
                DynamicJsonDocument doc(900);

                // Parse JSON object
                 DeserializationError error = deserializeJson(doc, payload);
                 if (error) {
                      //Serial.print(F("deserializeJson() failed: "));
                      //Serial.println(error.c_str());
                      return;
                  }

                  // Extract current power generated from the Fronius inverter
                  long generatedPower = doc["Body"]["Data"]["PAC"]["Values"]["1"];
                  String displayedPower = String(generatedPower) + " W";
                  displayThis(displayedPower, generatedPower);
            }
        } else {
          displayThis("HTTP Error"0);
            //Serial.printf("[HTTP] GET... failed, error: %s\n", http.errorToString(httpCode).c_str());
        }

        http.end();
    } else {
          displayThis("Wifi Error"0);
          connectToWiFi(SSID, PASSWORD);
    }
  delay(5000);
}

The sun has come out again!


I've added a bar that shows how much of the maximum output of the panels we're at. Not in the code above but it's pretty simple using the excellent display library.


Update: now building under PlatformIO

I prefer to develop using Visual Studio Code and PlatformIO but initially ran in to trouble getting it to work with the ESP32. This tutorial gave me the key, which is to use the "Espressif ESP32 Dev Module" as the board.

One reason why I prefer using VSC to edit is the excellent code completion:


The Arduino IDE has a lot of weirdness compared to what I'm used to.

Monday, October 21, 2019

Multiple Low Earth Orbit satellite service will soon offer global internet access

Low Earth Orbit (LEO) satellites are cheaper to launch than geostationary satellites and, with modern manufacturing, can be cheap enough to make in the thousands.

There are several companies currently launching experimental satellites and it seems that there will soon be ways to get internet access either directly or via a small ground station that relays via local WiFi.

If the satellites are in very low earth orbit, some as low as 200km, the latency can be comparable to ground based internet services.

SpaceX

SpaceX was granted permission to launch 7,000 satellites for Starlink internet provision back in 2018. The full plan involves 30,000 satellites. The plan is offer internet to every part of the earth by having at least one satellite visible at any time. Initial service might start as early as 2020.

There's a rather out of date FAQ here on Reddit.


Amazon

Amazon's Project Kuiper involves 3,236 satellites at various low earth orbit heights. "784 satellites at 367 miles, 1,296 satellites at 379 miles, and 1,156 satellites at 391 miles". Rather than covering the entire globe, they're going for a band north and south of the equator that covers 95% of the population. 

OneWeb

OneWeb provides internet for business jets. Their system is made up of both a swarm of satellites and ground stations.


OneWeb recently completed tests from Seoul, South Korea using just six satellites and showed they could deliver "high-speed, low-latency services at speeds of more than 400 Mbps, enabling the fastest real-time video streaming in Full HD". Latency is reported to be 40 milliseconds but with an average of just 32ms.

Swarm Technologies

Swarm has been granted permission for a constellation of 150 LEO satellites for provision of non-voice Mobile-Satellite Services (MSS). While targeting IoT customers, which suggests low bandwidth. Reportedly 1kbps initially, rising to 2.7kbps. Not much good for internet but useful for tracking and messaging.

New internet competition?

The big question with all of these new options is the price. If players choose to go after the elite end of the market, such as business jets, then it won't affect many of us. If players, as Amazon is reported to be doing, target advanced markets like the US, then this could threaten terrestrial providers.

My hope is that we get services that target under served markets such as outback Australia and the Pacific Islands. Particularly in developing countries prices will need to be low to be affordable.

The equipment needed to talk to low earth orbit satellites must have rapidly steerable directional antennas but just as GPS receivers have become small and cheap, this will also become affordable at scale.

Can satellite internet be blocked?

Some countries filter the internet. Australia is on this list as a surveillance state. Unlike bans on receiving satellite TV (which used to require large dishes that could be seen), it's going to be hard to detect users of satellite internet. Like jamming of GPS, presumably these satellites or the receivers could be overwhelmed by strong RF until they comply with local requirements.

Please let me know in the comments if there are other players I've missed.

Great documentary about "Stuxnet" - "Zero Days"

There's a great documentary made in 2016 called "Zero Days" that I watched on the recommendation of a daughter. It investigates the detection, effect and alleged origin of the internet work publicly called StuxNet but known to the authors as "Olympic Games".

StuxNet was modified to aggressively spread itself but was originally highly targeted at industrial controllers connected to computers running Windows. The specific controllers ran nuclear fuel refining centrifuges.

When activated, the malware would spin the centrifuges until they were physically damaged.

What's interesting about cyber warfare is that it is a new kind of weapon which does physical harm to an enemy without it being obvious what happened and who the attacker was. It's clear that developed countries, with highly connected industrial control grids are highly vulnerable to this new kind of attack.

If our power grid was disabled by an external attacker, (for example), would that prompt a "kinetic" response?

I rented the movie on iTunes and highly recommend it.

Monday, October 14, 2019

Weekend away in the van near Goulburn playing ham radio

Kevin, VK2KB, kindly invited me to stay on a friend's property near Goulburn, south of Sydney. On a hill near the homestead, Kevin had installed a wire dipole for 40m. We added an extra dipole (fan style) for 80m and later Kevin put up another dipole for 160m.

The site seems too close for communication on 40m but 80m and in the evening, 160m was excellent.

Having no mains power and distant neighbours promises low noise and it certainly is up on the hill but closer to the house we found that the power inverter for the home solar system created quite an RF racket.

We put up a 40m dipole closer to the house (and power) which we transmitted on WSPR using an Ultimate beacon 3 and were received widely.

On Sunday we listened to the ARNSW Sunday broadcast from Sydney. You can see some of the antenna work here.


On Sunday evening, reception on 160m was excellent as you can hear here:



Out here, the blocks seem to all be 100 acres and up. I slept comfortably in the van even though the overnight low was 3C.


It was wonderful to meet a few neighbours who have built wonderful houses tuned to their own comfort. Here's Nick's place.


Nick also has built a pizza over out of dirt from an ant mound.


Pretty much everything is re-cycled.

Another neighbour, Michael, (shown at the top right of this post), showed us very interesting VR180 and VR360 movies playing on a Samsung Gear VR.