Sunday, December 30, 2012

Homebrew hangout

I've just participated in a Google hangout with a buch of homebrewers around the globe using Google's amazing Hangout video conferencing. Thanks Jason Mildrum, NT7S, for organising it.

Participants were on Linux, Windows, MacOS and iOS. There is a bit of confusion caused by Google's display of the time of the hangout in the zone of the organiser so for me it kind of looked like I'd missed it.

It seems like there is a limit of ten video participants but we think you can have ten sending video but many more if they are just viewers. More experimentation is needed.

The only other issue was echo from people who had their sound on a local speaker, we think that is due to the latency inherent in a global conference call. I think headphones are a must.

It was great to meet everyone and talk about projects. We discussed Antennas, arduinos, Raspberry Pi, making PCBs with a CNC, Beach 40, and got a tour of a station.

Thanks to Jason for organising this, can't wait for the next one.

Thursday, December 27, 2012

Preserving our digital photographs

Holiday season is family photo season and now that we’ve transitioned from film to digital photography the number of pictures we take is at an all time high. But while our family albums often have pictures taken a century ago, it’s likely that the current crop of snaps will be irretrievable in just a decade, unless we work to preserve them.

The oldest surviving photograph, taken in 1826 by French inventor Joseph Nicéphore Niépce, titled “View from the Window at Le Gras” is still visible today while the ink jet prints on my fridge from 2005 are badly faded.

Niépce covered a pewter plate in lavender oil containing dissolved bitumen and exposed it for eight hours to the sunlit scene outside. The exposed bitumen hardened and the rest was washed off to leave a permanent image.

Photography has got progressively easier since then, including Kodak launching the brownie in 1900 with the slogan “you push the button, and we do the rest”. Later mass market innovations included 35mm cartridges and instamatic cassettes (although I never liked them).

Film based photography peaked in 2000 at 85 billion photos (this estimate is based on the global use of silver in the process) but this year, now that we’re digital and don’t run out of film, it’s estimated to hit 380 billion pictures. (Whether this four-fold increase in snapping actually produces any better images is debatable).

The largest single archive of current images is Facebook who noted that they had 219 billion images as at September 2012.

From the time I was in my teens, until about two years ago, I selected the best images from each roll and glued them in a series of albums. Recently I find I’m showing images to family and friends via Instagram, Twitter and Facebook. My album series has ended and I fear that my digital image narrative my have ended too.

Often it is the images that capture the ordinary, the view of the kitchen bench, the junk near the TV, rather than the false smiling relatives that are the most rewarding in retrospect. But being able to keep everything is a double-edged sword.

My digital archival storage plan

While digital storage is reliable it is ironically brittle. I’ve used and thrown out: punch cards, data cassettes, eight inch floppies, 3.5 inch floppies, zip disks and CD ROMs will be next in line.

My Aperture library, containing all my serious (RAW) images for the past few years is under 90 Gigabytes. Many other images have been posted directly to Instagram and only survive in 612 square pixel format.

When much loved Panda the cat died recently after keeping us company for fourteen years, I realised how few images remain.

I have images all over the internet, on Google Picassa, Yahoo Flickr, DeviantART, MySpace, and MobileMe. The last ones, on MobileMe web albums were deleted when Apple closed it down earlier this year. Yes they gave me plenty of warning, but no, I never got around to looking at them or saving them.

Paying for online image storage provides some assurance that they’ll make an effort to contact you before disappearing. The act of renewing the payment details every few years also serves as a reminder. It’s not expensive, Google charges $5 per month for 100GB of storage, Yahoo charges $25 per year for “unlimited” storage - although I’m always a little suspect of unlimited things.

Hard disks get cheaper very fast and currently a terabyte drive is about $100 so a good plan is to purchase a new one each year and copy over the whole archive from last year’s disk plus all the new images. The act of re-copying, plus keeping a few past years disks provides some redundancy in case of mechanical failure.

Apple has photo stream and iCloud but at the time of writing I’ve seen enough weirdness to not trust their cloud services just yet. (Jobs should have purchased DropBox).

The answer for me is a combination of the annually refreshed external hard disks plus some online storage (in case the whole house goes up).

I’ve also started printing out a few pictures and the bound books from Apple and others are a nice update to the glued albums I used to keep.

More pictures are being taken than ever before but I don’t think they’re better. Sometimes I like to use a camera that slows me down and doesn’t track the faces automagically. My new years resolution is to take fewer, better pictures and make an effort not to lose them in a disk crash.

I discussed this topic with John Doyle on ABC RN Breakfast this week.

Saturday, December 22, 2012

Correspondence with planning minister Brad Hazzard about ham radio antennas

I wrote the following letter to the NSW planning minister, Brad Hazzard on 18 November 2012:

The Hon. Brad Hazzard, MP
P O Box 405
Dee Why NSW 2099

Dear Mr Hazzard,

I am a member of your electorate and a licensed ham radio operator, VK2TPM.

I’ve recently heard that your new planning system for NSW does not include the streamlining of approvals for the antennas that we ham radio operators need to put up to pursue our hobby.

The antennas that most of us put up are no more unsightly than TV antennas and much less unsightly than many of the tall masts which are common in suburbs on the northern beaches. Further, I find the power poles and lines, along with the low hanging cable TV and internet wires, to be much more unsightly than the occasional ham radio antenna that my colleagues put up.

Ham radio is a wonderful hobby and serves an important public service in times of disaster when conventional communications is unavailable. 

Specifically, what I’d like to see is:
  • Ground mounted radio masts or antennas of up to 10m height (or 5m above a roof if attached to a building) be exempt from a development application.
  • Masts up to 15m should only require a simplifying permit based on given standards.
Victoria and South Australia have regulations like this. Can you explain to me why we can’t match this in NSW?

If I can be of any further assistance, or you’d like to visit my ham radio shack for a cup of tea, you’d be most welcome.


Peter Marks

He replied:

17 Dec 2012

Dear Mr Marks

I refer to your letter concerning the construction of radio antennas without the need for
approval, as exempt development.

I would like to acknowledge the valuable work performed by amateur radio operators in
transmitting vital information during natural disasters and other emergencies when
traditional infrastructure fails.

Provisions of State Environmental Planning Policy (Exempt and Complying Development
Codes) 2008 (Codes SEPP) allow antennas and aerials to be erected on most lots in
NSW to a height of 1.8m above the highest point of the roof on a dwelling. This includes
aerials and antennas which may be erected at ground level such as those used by
amateur radio operators. In situations where there is a two storey dwelling, this allows for
the erection of an aerial or antenna that is around 10m high.

These standards are designed to balance the rights of owners to erect these structures
which are suitable to the scale of existing buildings, while minimising visual and other
impacts on adjoining neighbours.

I note your reference to the approval and location of traditional infrastructure and the
impacts they have on amenity. The erection and development of power poles and lines as
well as cable TV and Internet wires is governed by other legislation, including the
Telecommunications Act 1979, administered by the Commonwealth Government.

Amendments to the Codes SEPP have recently been exhibited for public comment.
Amateur radio operators raised concerns regarding the Codes SEPP and the ability to
erect radio masts and antennas. Each submission is currently being reviewed and I have
asked the Department of Planning and Infrastructure to pay particular attention to the
concerns yo rail- in finalising the SEPP amendment.

Should you have any further enquiries about this matter, I have arranged for Mr Michael
File, Acting Executive Director, Assessment Systems of the Department of Planning and
Infrastructure, to asist. Mr File can be contacted on telephone number 02 9228 6407.

Yours sincerely


Wednesday, December 19, 2012

Codec2 and modem on a raspberry pi?

Encouraged by early success with FreeDV digital voice with codec2 it occurs to me that a great project would be to build the equivalent of these AOR digital voice modems. Looks like they sell for US$449 so to build something functionally equivalent based on a $38 Raspberry Pi is very attractive.

There's an interesting thread on the codec2 mailing list about running codec2 on a raspberry pi.

I imagine AOR are not too pleased about this prospect - if they are watching the road ahead, they would be working to build codec2 right in and they will pick up a potentially interesting early adopter market.

Looks like I'm not alone and ON1ARF is already working on this. Although he's using a pandaboard for decoding at this point.

We are at a fascinating time in Amateur Radio.

Update - audio on Raspberry Pi

Downloading and installing codec2 on the raspberry pi couldn't be simpler:

  • sudo apt-get install subversion
  • svn co codec2-dev
  • cd codec2-dev
  • ./configure
  • make
To get the play utility, install sox:
  • sudo apt-get sox

The test that encodes and then decodes out to the rpi's built-in audio works great:
  • cd src
  • ./c2enc 1400 ../raw/hts1a.raw - | ./c2dec 1400 - - | play -t raw -r 8000 -s -2 -
Next step, where I'm a bit stuck at the moment, is to record audio from an external USB headset. I plugged it in and you can list devices as follows:
  • arecord --list-pcms
My USB Headset is a little Sennheiser one, so I get:

$ arecord --list-pcms
    Discard all samples (playback) or generate zero samples (capture)
    Sennheiser USB headset, USB Audio
    Default Audio Device
    Sennheiser USB headset, USB Audio
    Front speakers
    Sennheiser USB headset, USB Audio
    4.0 Surround output to Front and Rear speakers
    Sennheiser USB headset, USB Audio
    4.1 Surround output to Front, Rear and Subwoofer speakers
    Sennheiser USB headset, USB Audio
    5.0 Surround output to Front, Center and Rear speakers
    Sennheiser USB headset, USB Audio
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
    Sennheiser USB headset, USB Audio
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
    Sennheiser USB headset, USB Audio
    IEC958 (S/PDIF) Digital Audio Output

Copy the device name from the list above and use it in arecord and aplay below. To record 10 seconds of audio from the USB headset:

  • arecord -D sysdefault:CARD=headset -d 10 test.wav
To play that back to the USB headset:
  • aplay -D sysdefault:CARD=headset test.wav
I can hear my voice but it sounds terrible. It would be an abuse of codec2 to use it as input. Any tips would be appreciated!

Saturday, December 15, 2012

First HF Digital Voice contact with codec2 and FreeDV

I'm very excited to report that I've had two digital voice contacts on HF using FreeDV which runs codec2 by David Rowe. (There's also a very active digital voice Google Group).
Here's how Patrick VK2PN looks to me running 5W.

This mode uses about half what a sideband radio would use and is perfectly intelligible when it's working. The other bonus with a digital mode is the complete lack of background noise.

Here's how I look to Patrick on his panadapter:

Patrick has written up our contact from his side on his blog.

FreeDV is very easy to get going on Windows, I had a go at building it for Ubuntu Linux but ran into a few bumps in the road.

Here's a video from my end where you'll hear how Patrick sounds to me as we both reduce power.

After the contact with VK2PN I was also able to talk with Graeme, VK4CAG pretty well.

So, this is an extounding day! Great work by David Rowe and all those involved. It's fantastic to have a good quality low bit rate voice codec that is public domain. This is a great thing for Ham Radio and I would think will have reverberations through the voice over IP business as well.

Update - FreeDV under Wine

Stephen, VK2BLQ, has just pointed out that FreeDV seems to run well under Wine on Linux.

Update - FreeDV now builds on Ubuntu 12.10

The latest code from subversion now builds smoothly on Ubuntu 12.10 but for me the audio stutters for some reason so I'm still using the Windows version under Wine. I just heard VK4BD on 14.236 but couldn't decode more than the call sign.

Update - FreeDV on MacOS via wine

FreeDV appears to run ok on MacOS under wine but again I'm hearing audio stuttering. It looks pretty good though:

I installed wine with brew. Note that to get it installed you need to do the following:

  • brew rm libpng
  • brew install libpng --universal
  • brew install wine
Then you cd to the directory with freed-windows and wine freed.exe

Tuesday, December 04, 2012

Current project - the "Beach 40" DSB transceiver

Peter, VK3YE, is an inspirational home brew designer and constructor. In a series of YouTube videos he demonstrates and then walks through the design of a simple double side band transmit, direct conversion receive, transceiver he calls the "Beach 40".

The minimalist QRP Transceiver group has drawn the circuit up (in the files section).

I started construction over the weekend but my oscillator didn't.

I'm using the "manhattan" or "paddy board" construction technique using bits of PCB cut with tin snips and superglued on to the base board as insulating islands. It's not as compact as "ugly" construction but the circuit is more obvious and it's very low profile. I'm thinking of stacking boards one above the other in the final box.

After some tips on non-starting oscillators from VK2ASU and VK2BLQ (who's also building one), I put a variable capacitor in place of the 390pF in the Colpitts oscillator and it started.

Peter's design has evolved through the YouTube video series, mostly in the receive audio switch to an LM386 but I am attracted to the all discrete transistor version if it can be made to work. It's much quieter in my shed than it is on Elsternwick beach.


Stephen, VK2BLQ, is also building and it's looking good (click to embiggen):

His CRO is much fancier than mine but I'm a bit suspicious of that waveform from modulation of a 1kHz tone on 7144kHz:

VK2BLQ is powering ahead of me:

But I own Saturday....

Update. Does this look right?

I'm still on the balanced mixer. I'm feeding in a 2.2V peak to peak 1kHz tone and here's the modulated RF output I get.

Seems very low level and somewhat non-symetrical. The variable resistor changes it but the trimmer capacitor has very little effect.

Stephen is powering ahead and now can transmit, here's his latest work (I wish mine was as good).

Stephen writes "Hi Peter, seems to be real QRP final current less than 250mA can't read any power
on  the meter.

As can be seen on the CRO, the PEP is 20v p-p which is about 250mW or 1 watt if it were CW. I think the final transistor  is not right. It is  a CB radio final and should be good for 4W. Time to cook dinner and have a look later"

Update - My power strip

Like Stephen, I'm getting 20V p-p or 1W out which seems a little disappointing.

Don't worry I will find some heat sinks. Here's a top view: