Monday, May 21, 2018

Home made ubitx box

Inspired by the excellent web site, I have bent a larger box so that the front panel ergonomics are improved. I added a nice tuning knob with finger depression and added a microphone pre-amp, compressor and noise gate board. The tuning knob is on its own on the right (not cramped with the volume control and mic socket) and with the new software it's a pleasure to spin up and down the dial.

I'm just using the mic amp board as it comes with a dynamic mic and levels look good but there's the option to add trimmers for both the compression and noise gate level. I have an output gain control knob in there.

My rudimentary metal work skills are slowly improving and I'm quite proud of the nibbled hole for the LCD display in this one. My nibbler has been sticking, which was frustrating, but a little WD-40 did the trick. I learned from a recent Adam Savage video that WD stands for "water displacement".

Saturday, May 05, 2018

Updated uBitx raduino software

Inspired by the latest edition of the Soldersmoke podcast, I took a look at the updated software that has been created for the embedded Arduino Nano.

My uBitx is looking much nicer since I made a new lid for it and mounted the speaker with a grill made of offcuts from the gutter guard we had installed last year.

I used the latest version of the Arduino IDE 1.8.5. Next I went to library manager and updated all updatable libraries and the same for boards. From the downloaded software from GitHub I opened the ubitx_20.ino file and did a build (the tick button). All built smoothly for me.

The Raduino board (sandwiched with the display) was removed from the uBitx, mainly because the position of my volume control blocks the mini USB port. I removed the display and plugged the board in to USB.

When I programmed it gave timeout errors saying that the board wasn't responding. I tried a different computer and different cables. Finally I tried the "old bootloader" option and all was good.

Along the way I first tried under Linux and then on macOS. The serial driver I needed was found via Bjorn's Techblog.

Now the uBitx is much nicer to tune and there are lots of interesting menu items to explore.

Some of the features are:
  • CAT control
  • S-Meter
  • Software defined radio output
  • Improved receive performance
  • IF Calibration
  • WSPR beacon
  • Bug fixes including CW key debouncing
Great work by KD8CEC and others on all this and of course credit to Ashar Farhan for creating the uBitx and making it all available for hacking.

Update: uBitx to uBitx contact with VK2BLQ

Encouraged by the improved tuning action, Stephen and I had our regular 20m sked with uBitx rigs on both ends. Stephen could hear me over the local noise and I could hear him pretty well when he "talked it up". Both of us have been reading the ubitx site and have independently ordered a low cost mic amplifier/compressor board.

I'm now keen to re-box my uBitx to give more room for the tuning knob. I'm looking for a knob with a finger indent that will screw on to a 6mm shaft. They are about but seem very expensive generally as an after market add on for a commercial rig.

We're also interested in digital modes on the uBitx and of course the best way to do this would be to build in a USB audio interface with VOX. Not sure that I'll go that far but worth thinking about.

Monday, April 30, 2018

First play with OSMO-FL2K compatible VGA dongle

Everyone knows about the popularisation of software defined radio that came about via the wonderful discovery that low cost USB TV dongles with realtech chipsets could be used. Now it looks like we have the same sort of thing but for transmitting.

Some low cost USB VGA adapters are so cheap that they are simply fast digital to analog converters. Steve M from Osmocom has figured out how to turn them into a simple output device suitable for transmitting. Mine came from Aliexpress but others are on eBay locally.

Here I tried a device and used the demo program to transmit an audio file (saved as WAV) over wide band FM to a nearby radio.

I'm on Ubuntu linux so there were some very small deviations from the instructions about USB memory buffer, I had to do this:

sudo sh -c 'echo 1000 > /sys/module/usbcore/parameters/usbfs_memory_mb'

To get some audio to transmit, I opened a 44100 rate mp3 in Audacity and saved it as WAV signed 16-bit PCM file.

The command line to transmit is:

fl2k_fm -s 130e6 -c 35e6 -i 44100 Electric\ Light\ Orchestra\ -\ Telephone\ Line.wav

So far other examples, and there are some amazing ones, require GNU Radio, but hopefully we'll get some more accessible ways to do interesting things like transmit WSPR in the near future.

This is a wonderful example of where the cheaper product is actually more useful than the more expensive versions.

There is a pretty good explanation of how this works in an earlier project VGASIG.

Here's how it looks on an SDR receiver. A little off frequency but looks reasonable to me.

And here's how the 35MHz waveform looks on a CRO:

So when working it's a decent 0.5V peak to peak waveform, DC offset. And a good signal on an FM radio at 95Mhz

I have noticed that this software/hardware works on some Linux machines and not others. It works fine on an Ubuntu 18.04 desktop but not on Fedora machines. When running on some machines it fails silently in that all appears to be running but there's no RF output.

Using the fl2k_file utility I output a sine wave. I can see the sine wave in the dongle output but there is lots of nasty spikes too. I guess a low pass filter could clean this up but it's not a good look.

Please let me know if you've got a better result than I have.

Update: Now getting a better waveform.

I've done some hacking on the FM code, basically stripping it right back and focusing on generating the cleanest wave I can on 40m.

This is running at a sample rate of 150Mega samples per second and a carrier of 7.159MHz. Not great but might be eventually useful (with some filtering) for something like WSPR transmit.

My stripped back version of the source now builds stand alone (no library) and simply generates a sine wave carrier. The source is available here.

Made a small project box

I'm not very good at this and figuring out how much extra to allow for the bend in aluminium continues to elude me but gradually I'm getting there.

The box shown here is still pretty rough but it's good enough for my little projects. Being able to make them at home means I can adjust the size to suit the project.

This morning I looked up Aluminium in Google maps and lucked upon Aluminium Engineering near by in Brookvale. What a wonderful establishment. I purchased a sheet of 0.9mm aluminium and loaded it in to the van.

The shop front is a work of art and should be classified as a heritage building to be preserved for ever.

Inside they're well stocked and the two chaps in there are friendly and informative. The warned me not to try welding 0.9mm which is fine.

Here's the shiny new hand shear which is making all of this cutting pretty easy. A cat is shown for scale.

Here is the current iteration of my box plan.

The measurements in the lid on the right are based on 0.9mm thickness and my dodgy bending. As you can see this makes a 100mm x 100mm x 40mm box. I'm using self tapping screws on the sides and it needs rubber feet to avoid scratching tables.

Sunday, April 29, 2018

Metalwork upgrade - a hand shear to make boxes

I'm terrible at metalwork. Cutting even 0.5mm aluminium sheet is difficult with a hacksaw or jigsaw. Today I went on an expedition to machine tools supplier Hare & Forbes and it was a great place to look around and the staff were friendly.

Half the battle is working out what things are called. I bought a "hand shear" which is like a heavy duty guillotine operated by hand through a big lever. While they had them from $99, I spent a bit more ($169) to get one with a 300mm blade length.

I have owned a small hand brake metal bender for some time but the inability to cut metal cleanly has hindered my use of it so far. Hare & Forbes have a great range. The one I bought is second from the left.

As a first project I bought a rectangle of 0.5mm aluminium and re-made a box lid to replace one I messed up for the uBitx.

My dream is to be able to make small custom boxes for projects. There is much to learn but happily YouTube is a great place to see how to operate this kind of equipment. Peter, VK2EMU, kindly sent me a link to this video about making Aluminium enclosures from Chuck Adams, K7QO.

I've had a shot at a small box out of 0.5mm aluminium.

It's pretty rough but not bad for a first attempt. The trick is to make the top part wider than the lower part by the right amount.

Vanlife: another tour north

This past week I headed north with a friend back to Dorrigo and surrounds. Once again, I was the perfect guest and slept in the van outside the homestead.

Really lovely country and views to be seen as we toured around stopping at some wonderful creeks. The van is going well although it doesn't have a lot of power going up hills.

No radio activity, other than listening to the local FM version of ABC Radio National.

Here's a few photos of the trip. Click to see a larger version.

There is a steam rail museum coming soon they say.

I haven't visited Uluru yet so it was great to see this totally accurate reproduction.

Tuesday, April 17, 2018

OLED GPS display on Arduino with a little C++

 The Arduino language is actually C++ but you never see that unless you look at library source code which tends to be a C++ class. I've written a little code to read the $4.10 GPS and display a bit of info on a small OLED display using the excellent Adafruit library.

To avoid spaghetti code I put the parsing of the NMEA string into a class. This is a quick hack but you don't see many examples like this so here you go.

Just for fun I've boxed this little project up all held together with hot glue and running from a 3.3V LiPo cell. The low price of the GPS along with the low price of an Arduino Nano Pro makes this a very attractive platform for building embedded computing devices.

Update: now with charger

I've added a USB charging board, this one from Jaycar. I have some others on order. This one will not run the Arduino board if the battery is removed, I read that some do and that would be a useful feature.

Display info from a cheap GPS on an Adafruit OLD display


SoftwareSerial GPS(2,3); // rx pin = 2, tx pin for GPS

#define OLED_RESET 4
Adafruit_SSD1306 display(OLED_RESET);

class NmeaRecord {
    void clearFields();
    bool parseLine(char *line); // return true if useful
    // GPGGA fields
    enum {
    // string lengths, +1 for null terminator
    enum {
      kLabelLen = 7,
      kTimeStampLen = 11,
      kLatLen = 9,
      kLatNSLen = 2,
      kLonLen = 10,
      kLonEWLen = 2,
      kFixLen = 2,
      kSatellitesLen = 3,
      kHorizontalDilutionLen = 4,
      kAltitudeLen = 7
    char label[kLabelLen];
    char timeStamp[kTimeStampLen];
    char lat[kLatLen];
    char latNS[kLatNSLen];
    char lon[kLonLen];
    char lonEW[kLonEWLen];
    char fix[kFixLen];
    char satellites[kSatellitesLen];
    char horizontalDilution[kHorizontalDilutionLen];
    char altitude[kAltitudeLen];
    void storeField(int index, char*field);

NmeaRecord nmeaRecord = NmeaRecord();

void setup()   { 
  // by default, we'll generate the high voltage from the 3.3v line internally! (neat!)
  display.begin(SSD1306_SWITCHCAPVCC, 0x3C);  // initialize with the I2C addr 0x3C (for the 128x32)
  // init done
  display.print("Looking for satellites...");

void loop() {
  String line = GPS.readStringUntil('$');
  // GPGGA,054540.000,3346.7737,S,15113.2178,E,2,12,0.99,94.2,M,21.9
  if(nmeaRecord.parseLine(line.c_str())) {
    display.print("UTC: ");
    display.print(" sats=");
    display.print("Lat: ");
    display.print("Lng: ");
    display.print("Alt: ");
    display.print("m   fix=");

NmeaRecord::NmeaRecord() {

// return true if it's a useful line
bool NmeaRecord::parseLine(char *line) {
  char *token;
  token = strtok(line, ",");
  if(strcmp(token, "GPGGA") != 0) {
    return false; // don't parse
  int fieldIndex = 0;
  while(token != NULL) {
    this->storeField(fieldIndex, token);
    token = strtok(NULL, ",");
  return true;

void NmeaRecord::clearFields() {
  strcpy(this->label, "");
  strcpy(this->timeStamp, "");
  strcpy(this->lat, "");
  strcpy(this->latNS, "");
  strcpy(this->lon, "");
  strcpy(this->lonEW, "");
  strcpy(this->fix, "");
  strcpy(this->satellites, "0");
  strcpy(this->horizontalDilution, "");
  strcpy(this->altitude, "");

void NmeaRecord::storeField(int index, char*field) {
  Serial.print("Storefield index = ");
    Serial.print(", field = ");
  switch(index) {
    case eLabel:
      strncpy(label, field, kLabelLen);
    case eTimeStamp:
      strncpy(timeStamp, field, kTimeStampLen);
      Serial.print("got timeStamp = ");
    case eLat:
      strncpy(lat, field, kLatLen);
    case eLatNS:
      strncpy(latNS, field, kLatNSLen);
    case eLon:
      strncpy(lon, field, kLonLen);
    case eLonEW:
      strncpy(lonEW, field, kLonEWLen);
    case eFix:
      strncpy(fix, field, kFixLen);
    case eSatellites:
      strncpy(satellites, field, kSatellitesLen);
    case eHorizDilution:
      strncpy(horizontalDilution, field, kHorizontalDilutionLen);
    case eAltitude:
      strncpy(altitude, field, kAltitudeLen);

String formatTime(String timeString) {
  String newTime = timeString.substring(0,2);
  newTime += ":";
  newTime += timeString.substring(2,4);
  newTime += ":";
  newTime += timeString.substring(4,6);
  return newTime;

String formatLat(String raw) {
  // 4807.038,N   Latitude 48 deg 07.038' N
  String result = raw.substring(0,2);
  result += " deg ";
  result += raw.substring(2,7);
  return result;

String formatLng(String raw) {
  //  01131.000,E  Longitude 11 deg 31.000' E
  String result = raw.substring(0,3);
  result += " deg ";
  result += raw.substring(3,8);
  return result;

Monday, April 16, 2018

The VK3ZZC "Horror" transmitter

A fond memory from my early days of ham radio was talking with Ralph, VK3ZZC, on 2m as he drifted up and down. To my amazement he was using a home brew valve transmitter he dubbed the "horror mitters".

I just noticed that he has written a post about this project here. It's worth having a look through all of Ralph's site as there's lots of good stuff.

In my view this transmitter is a thing of beauty.

(Photo from Ralph's site, used with permission).

Low cost Neo-6M GPS works well

Ross, VK1UN, tipped me off to these GPS modules available from Aliexpress for AU$4.10. At that price I ordered 2. Here's the ad as it appears at the moment.

Here's me running it via a USB serial device supplying 3.3V. The specs say it will run from 3.3 - 5V. Default baud rate is 9600 and amazingly these devices have the 1Hz PPM output which used to only be available on the more expensive modules.

With a little bit of tinkering I've now got it displaying on an OLED display. Makes a nice clock for the shack.

Amazing that a device costing $4 can receive satellites.

Sunday, April 15, 2018

Vanlife: another tour south

I'm back from a tour south from Sydney ending up in Melbourne. Gradually I'm learning how to find places to stay that I like.

My preference is for places that are very quiet and look out at water or nice bush. The most up to date reference is the WikiCamps app. (This is a very poorly designed app, but the information in it is good). Reviews of camp sites are naturally in terms of what the reviewer likes so you tend to find great reviews for crowded sites that happen to have clean toilets.

Caravan parks can be nice if the unpowered sites are well away from the powered sites where the giant caravans tend to go.

The trick seems to be to find locations on WikiCamps and then check them out from Google's satellite view to get an idea of the layout.

On this trip I met up with my sister Jane and her partner Paul who have a lovely "teardrop" trailer.

It's very compact and presumably easy to tow. You sleep inside but it's pretty cramped but comfortable.

I also met a wonderful French Canadian couple who had sailed to Australia and are now touring around in a van.

It's fascinating to see how vans are configured. They shared red wine with me which they gleefully said had come from Aldi and wasn't too bad for $5.

One trick I've discovered is sleeping in the bush and then visiting the sea for breakfast and a swim.

It's lovely sitting in the van and having vastly different views from day to day.

The configuration is gradually changing. These days, when parked, I fold the passenger seat down and place the fridge there so there's more cabin space. I have a small folding chair from Banggood and this was great on a day when there was rain.

The mosquito net (there were mosquitoes and wasps at this site) is held up with magnets.

The van is going pretty well but the oil light came on and it needed a bit over a litre of oil to be filled up again. It's now done 378,000 Km and I'm not sure if it's normal to be using some oil like this.