Tuesday, September 19, 2017

Very simple 40m portable dipole with speaker wire.


Talking with Ross, VK1UN, the other day we stumbled on the simple idea of using figure 8 speaker wire as the feed line up to an "inverted V" dipole held up with a squid pole. Compared to feeding with coax up to a balun, this is extremely light weight and so doesn't bend the squid pole too much.

The video above takes you through how it works.

This is the antenna a plan to take to the next Sydney QRP by the harbour event coming up in October.

Handy lightning map

Brian, VK2AAF, just alerted me to a fantastic map of current lightning. LightningMaps.

Were were talking on 80m and there was quite a lot of noise but the weather here is fine. Turns out there's a lot of lighting off the coast towards New Zealand.


Very handy, thanks Brian.

Wednesday, September 13, 2017

Simple Fronius logger

If you can install python (which you can pretty much anywhere) here's a little script to get started with logging from Fronius inverter.

The latest source code is here.
import requests
import json
import datetime
import time

# Set this to the IP address of your inverter
host = "192.168.0.112"
# number of seconds between samples, set to zero to run once and exit
sample_seconds = 60 * 5


def main():
    print("started")
    while True:
        try:
            watts = watts_generated()
            now = time.strftime("%H:%M:%S")
            line = "%s\t%s\n" % (now, watts)
            # print(line)
            write_to_logfile(line)
        except requests.exceptions.ConnectTimeout:
            print("Connect timeout at %s" % time.strftime("%H:%M:%S"))
        if sample_seconds > 0:
            time.sleep(sample_seconds)
        else:
            return


def write_to_logfile(line):
    today = time.strftime("%Y_%m_%d")
    file_name = today + ".csv"
    out_file = open(file_name, "a")
    out_file.write(line)
    out_file.close()


def watts_generated():
    url = "http://" + host + "/solar_api/v1/GetInverterRealtimeData.cgi?Scope=System"
    r = requests.get(url, timeout=2)
    json_data = r.json()
    result = json_data["Body"]["Data"]["PAC"]["Values"]["1"]
    return result


if __name__ == "__main__":
    main()



Note that I'm assuming Python 3 and you'll probably need to install the requests module. The program outputs a single file for each day.

Here's some code to draw a pretty graph.
"""
Simple code to draw a graph of a day of power.
Requires matplotlib

On Fedora Linux: sudo dnf install python3-matplotlib

"""

import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import matplotlib.dates as mdates
import csv
import time
import datetime

today = time.strftime("%Y_%m_%d")

INFILENAME = today + '.csv'


def main():
    data_reader = csv.reader(open(INFILENAME,'r'), delimiter='\t')
    y = []
    x = []
    for row in data_reader:
        if len(row) > 1:
            timeval = row[0]

            dt = datetime.datetime.strptime(timeval, "%H:%M:%S")
            print("timeval = %s -> %s" % (timeval, dt))
            x.append(mdates.date2num(dt))
            watts = float(row[1])
            y.append(watts)

    fig, ax = plt.subplots()
    ax.plot(x,y)
    ax.xaxis_date()
    my_fmt = mdates.DateFormatter('%H:%M')
    ax.xaxis.set_major_formatter(my_fmt)
    plt.ylabel("Watts")
    plt.xlabel("Time")
    plt.show()
    plt.savefig('%s_graph' % today)


if __name__ == "__main__":
    main()




Finding the IP address of your inverter is pretty easy if you have a network scanner such as nmap. I use LanScan on macOS and the Fronius comes up as having a network interface from "u-blox AG".

Saturday, September 09, 2017

Solar electric panels installed at home

The ham shed has been solar powered for many years. Finally it was time to install PV panels on the roof of the house.

The panels are installed on the west side of the roof as we already have solar hot water on the north side. Afternoon power might work well for running the air-conditioning on hot days.

Our last quarterly electricity bill was $447 and they say our average daily usage is 14.54kWh. (Yesterday the system produced 16.2kWh for the day, but much of it was excess).


We've put in 12 275W REC TwinPeak panels to give a theoretical total of 3.3kW. The house is three phase so we've gone with a Fronius three phase 3kW inverter.


The inverter sits next to the electrical switch box and there's a "smart" meter inside the box through which power to the house runs so it knows how much we're generating and how much we're using locally.


The Fronius connects to the home Wifi and pushes data up to a web site. For free it keeps three days of data and if you pay it keeps it longer. Here's how a full day without clouds looks:


The big lump of usage in the evening was me baking dinner. This is where a battery would obviously help.

Here's the highest power generation I've noticed so far:



I paid AU$6,201 for the system and given that we pay about $1,600 per year for electricity now, I'm hoping that it might pay for itself after about 5 years but this remains to be seen.

We currently pay about 24c per kWh but the feed in tariff is just 6c but on current figures there's quite a lot of spare power available to earn credits. After the next bill I intend to take the Prime Minister's advice and shop around to get a better price and better feed in tariff.

Already I've changed my behaviour in that I wait until sun falls on the panels from 9am before turning on the clothes and dish washing machines to take advantage of solar power. For breakfast I make coffee in a gas stovetop device.

A battery is an obvious enhancement but I'm not convinced that it would pay for itself any faster given the extra investment.

The German made Fronius inverter is an interesting device. As well as pushing data to their web site (or you can configure it to push to your own url) it has a group of web service APIs that produce JSON data. I have a simple project in mind to build a display of key data for the kitchen.

I think providing well documented open APIs in smart home devices is a key feature and I certainly chose to pay a little more to be connected. They have smart phone apps but oddly they have less information than the web site.

With a little hacking here's a little power generation display built with an ESP8266 and an OLED display.


HF radio interference?

I was concerned about this and chose not to go with panels that have built-in inverters. My tests so far show that the system does not produce noticeable HF interference when in operation. I have held a radio up to the inverter tuned off stations and can hear very little effect. Potentially having big diode panels on the roof might rectify HF transmissions but so far I haven't noticed any effects.

Monday, September 04, 2017

Door bench for the shed

A very simple, cheap, upgrade to my shed today. I've always struggled to build things on little folding tables. Today I paid AU$29 for a door and it makes a fine bench.


It's a hollow door so won't take much weight in the centre. I'm thinking of putting some sort of edge on it to stop things rolling off. I'll keep this next picture as a reminder of what it looked like originally.


The door is a narrow model. It's 2040x720x35mm. (I have no idea how many furlongs that is for you Americans).

Friday, August 18, 2017

Building wsjt-x 1.8rc1 on Fedora 26

The available binaries of wsjt-x don't run on Fedora 26. There's no problem building but it took a while to figure out the dependencies so this post is a note for myself that might help someone else.



From a fresh Fedora 26, here's the dependencies I needed to add before building.

sudo dnf install autoconf automake libtool libusb libusb-devel fftw-libs-single fftw-devel texinfo qt5 cmake asciidoc gcc-gfortran gcc-c++ qwt5-qt4 qwt qwt-qt5-devel qwt-qt5 qt5-qtmultimedia qt5-qtmultimedia-devel asciidoctor qt5-qtserialport qt5-qtserialport-devel

I stumbled around a bit figuring out what the missing thing was called in Fedora so there's undoubtedly things in that list that aren't actually needed.

At the end of the build I got an error linking -ludev so needed to do this to let ld find the library.

sudo ln -s /usr/lib64/libudev.so.1 /usr/lib64/libudev.so

(Let me know if there's a correct way to do this, I couldn't find a -devel package that should normally do this).

I basically follow the instructions directly from the excellent INSTALL document but I'm substituting the 1.8rc1 tag so I get the latest FT8 stuff.

cd ~
mkdir wsjtx-prefix
cd wsjtx-prefix

Download a snapshot from:
https://sourceforge.net/p/wsjt/wsjt/HEAD/tree/tags/wsjtx-1.8.0-rc1/

Unzip then rename:
mv wsjt-wsjt-8028-tags-wsjtx-1.8.0-rc1 src

From the file src/INSTALL, follow the instructions to download, build and install hamlib.

# As per the instructions in INSTALL
cd ~/wsjtx-prefix
mkdir build
cd build
cmake -D CMAKE_PREFIX_PATH=~/hamlib-prefix ../src
cmake --build .
sudo cmake --build . --target install

wsjtx 

Building is a good way to exercise your CPU.


Binaries?

I notice this site hopes to have binaries available but the builds seem to be failing. Does anyone know what I need to do to build wsjt-x as a static binary for easy distribution?

Sunday, August 13, 2017

Charging a laptop from 12V

Keen on portable QRP operation, I'd like to use digital modes which might require a laptop. While battery life is excellent with some models, I'd also like to be able to charge a laptop from my solar powered shed.

Recently I purchased some voltage buck modules which can step up a voltage to a settable output controlled with a multi-turn potentiometer.


There's lots of variations of these on ebay. This one takes an input of 3-35V DC and turns it in to an output of 2.2-30V DC with an output current of up to 1.5A.

I'm charging a little HP laptop which takes 19.5V so the converter is set to that and all boxed up nicely. (Except that I drilled the holes in the wrong places).


HP laptop chargers have three wires in the lead, positive, earth and ID. The ID wire (I learned thanks to commenter Brian G8OSN) needs to be pulled high for the laptop to charge the battery. I connected the middle ID wire to positive 19.5V via a 100K resister and that seems to do the trick.

On a related topic, I'm becoming a fan of 18650 Lithium Iron batteries, not just for super bright torches and Tecsun radios, but also for powering QRP gear if powered from a set of three 3.7V cells in a little case available for under $2.



These cells can be harvested from old laptop battery packs. Often when they die it's because one cell has gone bad and the others can be re-used. They don't make it easy to get them out though.


This pack from an old Asus netbook has three rows of two cells in parallel. These cells have a huge capacity compared to an AA rechargeable which might be 1,200mAHr, they are often 5,000mAHr or more. Here they are in the fancy new charger that's just arrived.


I see that this month's Silicon Chip has an article about these cells.

Monday, July 31, 2017

Meetup with Peter VK3YE

Peter, VK3YE, was in Sydney briefly and a few of us had the pleasure of meeting up before he braved the enhanced airport security. Stephen, VK2BLQ, brought along his beautiful valve regenerative radio.


John, VK2ASU, made the journey from Maitland and brought a few interesting projects for inspection including a Tuna Tin radio.


After Peter left we had a duel between John's regenerative 80 receiver and a Tecsun PL-880.


Thanks Peter for popping by. Catch you on the air by the bay or the harbour!

After lunch, John and I walked around Chatswood inspecting cameras, telescopes, 3d printers and torches. After becoming familiar with the prices out of China on Banggood and AliExpress it's hard to take the retail prices of many of these products.

Lubuntu Linux for low power, low memory computers

I like the little HP Stream 11 laptop but Ubuntu is a bit slow on it so I've recently installed Lubuntu Linux. Based on Ubuntu but with a lighter weight desktop and windowing environment it runs well and does not use the 2GB of RAM available in this machine.


Even with the Chromium browser running there is free memory available.

To find out more detail about where your battery power is going, there's a utility that can be installed with apt, called powertop.


Amazing to see an Intel laptop consuming 3.55W.

There are a bunch of tunable settings that can be adjusted in Linux to get better battery life, mainly turning on some power management settings, I've turned on each of these and so far so good.

While Lubuntu is fine, I do miss a few things from full Ubuntu such as the ability to search for an app to run it, also the window edges are very narrow and rather hard to grab with the mouse.

I've noticed that some operations, such as 'apt update' hang for 120 seconds before starting. At first I thought this was a DNS issue but it turns out that disabling ipv6 fixes this for me. (Obviously, I would prefer to use ipv6 but perhaps my ISP or home network isn't quite up to it).

All in all, worth a try on a low end laptop.