Planet Linux Australia

Syndicate content
Planet Linux Australia -
Updated: 13 min 17 sec ago

Clinton Roy: clintonroy

Thu, 2015-02-26 17:28

Another weird day really.

The headache from yesterday did not improve, after physio and tablets. I went to bed early and woke up around 2am with my head still banging.

Work has a construction site across the road and it’s still very noisy at times, it was very difficult dealing with both a headache throbbing inside my head and the builders machines throbbing the outside of my head.

I had lunch offsite with H, who is always doing a million and one things and making me feel lazy.

I decided I didn’t want to deal with the headache and noise in the afternoon and headed home.

Filed under: diary

Michael Still: Tuggeranong Hill (again)

Thu, 2015-02-26 10:28
I walked up Tuggeranong Hill again, this time as a geocaching run. This is the first trig I've visited twice!


Interactive map for this route.

Tags for this post: blog pictures 20150225-tuggeranong_hill photo canberra tuggeranong bushwalk trig_point

Related posts: Big Monks; A walk around Mount Stranger; Forster trig; Two trigs and a first attempt at finding Westlake; Taylor Trig; Oakey trig


Clinton Roy: clintonroy

Wed, 2015-02-25 19:28

Bit of an odd day today.

Physio appointment in the morning, specifically looking at my right forearm, I was concerned I was seeing the initial stages of RSI, but the physio relieved those anxiety’s at least. They physio used dry needles to  settle down the muscle that was acting up, that was a first and quite an interesting experience.

Next up I went out to the UQ Market day to rendezvous with the UQCS club, to give them some pamphlets describing PyCon Australia  and Humbug a little. Most of our volunteers last year were UQ students, and I’d be delighted if that were the case again this year.

I’ve ended up with a headache at the end of the day, maybe because I didn’t have any coffee till after lunch?

Filed under: diary

Clinton Roy: clintonroy

Wed, 2015-02-25 19:28

Walked to work.

While doing some conference stuff, discovered that I hate printers. It took something like an hour to print out two pages of basic text and one image. Whatever pdf version every tool was spitting out, was not handled at all well by either printer.

Filed under: Uncategorized

Clinton Roy: clintonroy

Wed, 2015-02-25 18:28

Did not walk in today.

Did go and see _Juptier Ascending_ which I really quite liked. If the main baddy wasn’t so completely over the top, I would have quite enjoyed it.

Filed under: diary

David Rowe: Minimalist VHF Software Defined Radio Part 1

Tue, 2015-02-24 22:30

I think the future of radio hardware is a piece of wire connected to a GPIO pin.

The rest of the radio will be “gcc compilable” free software running on commodity CPU horsepower. I spoke about this at length in my recent 2015 talk.

For the last two weeks I’ve been developing a simple radio architecture that is moving in that direction. The motivation is hardware to test our VHF FreeDV ideas. I’ve got to the point where I can tune 146 MHz VHF radio signals. The performance largely meets my design specs. The radio consists of about 20 off the shelf parts and a STM32F4 Discovery board with a Bill of Materials (BOM) cost of a few $. With another design pass it will be capable of good RF performance and also run FreeDV (or the mode of your choice). Completely stand alone – no PC.

Boo Baseband IQ, Chip-sets and FPGAs

I’m not a fan of baseband IQ designs, due to issues with phase and amplitude balance, and carrier feed through. This means development time and engineering pain. IQ signals should live only in software. Nor am I a fan of semi-closed chip-sets, FPGAs, or fixed point. More pain, development time, inaccessible tools, complex hardware designs, multilayer PCBs (even for prototypes), vendor lock-in, non-portable and proprietary issues.

I’m using the STM32F4, NE602 mixer, and Si5351 LO as that’s what I had laying about. However I’m not hung up on any of them. Please free free to subsitute your favourites. What I do care about is radio architectures that minimise hardware and maximise free software.

No chip-sets or lock-in here. The hardware is very simple so major changes can be made in minutes, and prototyped by anyone who can hold a soldering iron next to a piece of blank PCB.

Design Walk Through

I prototyped the radio on a few square inches of blank PCB:

In the foreground is the Open Radio that I’m using for the Si5351 LO.

High Q filters and MacGyver Filter Tuning

It took me a few days to get a decent 10.5MHz Band Pass Filter (BPF) working. Learned all about loaded and unload Q of various inductors, filters, and rigged up a way to sweep filters using some Si5351 code:

  float f;

  unsigned long long f_ull;




  while(1) {

    for (f=8.0; f<12; f += 0.1) {

      f_ull = f*100000000ULL;

      si5351.set_freq(f_ull, 0, SI5351_CLK0);




Using my oscilloscope’s FFT function with infinite persistence selected on the display I can get a good feel for the filter performance:

I needed a pretty high Q for the BPF so I tested several inductors in a parallel 10MHz LC tuned circuit. I swept the circuit with the Si5351 and measured the insertion loss at resonance. At resonance the only impedance is the effective resistance of the inductor Rl. This forms a voltage divider with the source impedance (1500 ohms in my case).

Inductor Insertion Loss (dB) Rl Xl Qu 6T 6mm air core 200nH 16 281 12.5 22.5 FT37-61 3T 1uH 4 2565 60 43 Jaycar moulded inductor 1uH 3 1500 60 85

I eventually settled on a T50-2 toroid, which could achieve an unloaded Q of over 100 at 10MHz. A two stage coupled resonator BPF gets 40dB attenuation at 10.5 +/- 1MHz. I’m still climbing the RF learning curve but this testing was fun and useful for me. A crystal filter designed for FM radios (16 kHz bandwidth) would also do the job.

Band pass Sampling

We are using the neat trick of band pass sampling. This is a bit confusing – how do we sample a 10.5MHz signal with a sample rate of 2MHz?

OK, say you want to sample a signal at frequency f with an ADC having a sample rate Fs. Turns out the ADC can’t tell the difference between between f, Fs+f, 2Fs+f etc.

Here’s an example of a f1 = 5 Hz and f2 = 105 Hz signal sampled at Fs = 100 Hz. Note how the sampled signal is exactly the same!

That’s why we usually put a low pass filter in front of the ADC, to limit the “images” that the ADC would otherwise sample. By using a band pass filter, we can intentionally select one of the images.

So the sample and hold of the ADC can also perform a frequency translation step, saving us the need for a mixer and second local oscillator. In practice, the ADC tends to be less sensitive when sampling higher frequencies. In the case of the STM32F4 the sample and hold is a RC circuit with a -3dB point of 7MHz. As a simple RC filter rolls off slowly it still has plenty of gain at 10.5MHz.

Software IIR Tuner

The big challenge with this architecture is how to handle 2 MS/s from the ADC on a uC that is only clocked at 168 MHz. That’s only 84 instructions per sample at 100% CPU load. In this small budget we need to “tune” the 500 kHz signal so that other adjacent signals are filtered out. Then re-sample down to 44 or even 8 kHz, hopefully with enough MIPs left over to run the FreeDV stack (a GMSK modem and Codec 2).

Here is the block diagram of the tuner, the C source code is in iir_tuner.c

The ADC sees our 10.5 MHz signal as a 500 kHz signal. We use an Infinite Impulse response (IIR) bandpass filter to stomp on everything else except the signal centred on 500 kHz. IIR just means it’s recursive (uses previous outputs). This filter is the exact DSP equivalent of a LC tuned circuit, as used in the analog BPF. Once filtered, we can then safely decimate the signal (reduce the sample rate) by a factor of 45 so our poor little uC can start breathing again. Much easier to process the signal at a sampling rate of 44.4 kHz (ish) than 2 MHz.

The IIR filter is implemented in C like this:

  y[n] = x[n] - 2*sqrt(beta1)*cos(w)*y[n-1] - beta1*y[n-2]

y[n] is the latest output, x[n] the input. The w is the centre frequency of the filter in radians (w = 2*pi*f/Fs) and beta1 is the “Q” of the filter, i.e. sets how sharp it is. If you set beta1 = 0.999 you get the filter we are using. Make beta1 = 1 you get an oscillator. If you make beta1 > 1 you get overflow errors.

As we are MIPs-shy we set w=pi/2, which is one quarter of the sampling frequency of 2 MHz, or 500 kHz. This makes cos(w) = 0 and the the whole filter reduces to:

   y[n] = x[n] - beta1*y[n-2]

This executes in about 12% of the STM32F4 without any particular effort in optimisation. Good enough.

The IIR filter does make the spectrum of the signal a little spikey in the middle so we use an equaliser to flatten it out again. This is a simple Finite Impulse Response (FIR) filter that is the exact inverse of the IIR filter, but scaled for the lower sampling rate:

   y[n] = x[n] + beta2*x[n-2]

I started by simulating the tuner in Octave (adcres.m), which produced these fine plots:

I set a spec of 40dB rejection of adjacent signals, which is a function of the IIR tuner and the analog 10.5 MHz BPF.

In the plots above there are 4 signals. First the “wanted” signals at f+8 and f-7kHz (6dB down), at the edges of the desired bandwidth we need for nasty old legacy analog FM. Then I popped in an interferer f-207kHz away. If we don’t filter well enough the interferer will get aliased into the pass band. You can see that in the lower plot – the f-207kHz signal now appears about 30dB down in the pass band. Hopefully the analog BPF will push it down a bit more in practice.

The fourth signal is an impulse that effectively has energy at all frequencies, and neatly shows us the shape of the filters that implement the tuner. That’s the continuous line in each plot (0dB on top plot). I set the level of this broadband signal to 40dB less than the f+8kHz pass band signal.


Here’s an example output for a 146.0025 MHz CW signal at -30dBm and -60dBm:

These are FFTs of 10 seconds of output samples. The x axis spans about 4 kHz, and the y axis is in dB, but not relative to any reference level. The central line is at about 2 kHz, so we have down converted by 146.005MHz from the input.

There is no gain apart from the mixer. Still, we can see at the -30dBm level we have about 60dB between the wanted signal and the highest spurious lines. At the -60dBm level the signal drops 30dB as expected.

Even at -30dBm the ADC is only being driven at about 10% of it’s maximum level, so we have another 20dB of headroom available there. Some gain would let us detect signals down to an appropriate MDS.

The spurious spurs appear to be 500Hz (ish) apart, which is the ADC interrupt service routine frequency. This is probably some power supply noise which we can clean up, as I did in the SM1000 development. The current prototype construction is pretty rough, so there are bound to be some issues in a VHF plus high speed digital system.

I wrote a FM demodulator in C and ran it on the STM32F4, sampling the results. Here is a strong local signal and here is a sample of Mark, VK5QI from a repeater.

The sample from the repeater is a scratchy. The periodic noise I think is at the rate buffers are transferred up to the Host PC I used for collecting samples. However please bear in mind this is not a finished radio, there is currently only about 10dB gain in total, and no input BPF! Off air reception at this early stage was just a long shot I thought I’d try for fun. Gain is cheap, we can add that in the next pass.

The real innovation here is the extreme simplicity of the hardware.

Being an on-chip ADC I’m not expecting sparkling performance. However it might be “good enough” – especially given it comes for free and the low SNR requirements (about 6dB) we need for GMSK. We shall see.

I measured the adjacent channel rejection as -30dB at 1 MHz and -40dB at a 25 kHz offset. The 25 kHz figure is exactly as designed (40dB). The 1MHz offset figure is 10dB worse than designed for. This could be due to the ADC input impedance loading the BPF and reducing the Q.

For a real radio these figures need to be much better, so another design pass is required. However I don’t think there is any risk here, just engineering effort. This first pass has shown that the architecture works.

Next Steps

  1. Replace the NE602 mixer with one that can deliver good strong signal performance.
  2. Have another design pass to meet a reasonable spec, like MDS of -120dBm for 1200 bit/s GMSK, adjacent channel rejection of -60dB, 100dB blocking of signals at +/- 1MHz. Rationalise the sampling rates (e.g. uC clock, ADC clock) so we get exactly Fs=48kHz at the output of the tuner.
  3. Put a proper 144-148MHz BPF on the input of the mixer.
  4. See if we can tune 70cm signals as well, e.g. with a harmonic of the LO. The mixer is good to 500 MHz.
  5. Determine if the Si5351 is OK in terms of phase noise, spurious lines. We could just about use a crystal oscillator, and tune chunks of the 2M band using banks of BPFs and IIR tuner software. The ADC sample clock might also be causing problems, e.g. spectral lines or phase noise. We can test that by measuring the implementation loss of the demodulator for a given receiver input C/No.
  6. Work out a clever way to transmit a 1W constant envelope signal at VHF. Perhaps a similar architecture operating in reverse, i.e. DAC running at 2MHz, tune to the 10.5 MHz image, up convert that to VHF. However as linearity is not required, the mixer could be a XOR logic gate.
  7. With a different BPF ahead of the ADC can we tune HF signals directly (i.e. delete the NE602)? What sort of performance will it have? Will the ADC dynamic range limit adjacent signal rejection?

Linux Users of Victoria (LUV) Announce: LUV Main March 2015 Meeting: CoderDojo / OpenPower and POWER8

Tue, 2015-02-24 22:30
Start: Mar 3 2015 19:00 End: Mar 3 2015 21:00 Start: Mar 3 2015 19:00 End: Mar 3 2015 21:00 Location: 

The Buzzard Lecture Theatre. Evan Burge Building, Trinity College, Melbourne University Main Campus, Parkville.



• Kieran Nolan and Martin Harris: CoderDojo

• Stewart Smith: OpenPower and POWER8

The Buzzard Lecture Theatre, Evan Burge Building, Trinity College Main Campus Parkville Melways Map: 2B C5

Notes: Trinity College's Main Campus is located off Royal Parade. The Evan Burge Building is located near the Tennis Courts. See our Map of Trinity College. Additional maps of Trinity and the surrounding area (including its relation to the city) can be found at

Parking can be found along or near Royal Parade, Grattan Street, Swanston Street and College Crescent. Parking within Trinity College is unfortunately only available to staff.

For those coming via Public Transport, the number 19 tram (North Coburg - City) passes by the main entrance of Trinity College (Get off at Morrah St, Stop 12). This tram departs from the Elizabeth Street tram terminus (Flinders Street end) and goes past Melbourne Central Timetables can be found on-line at:

Before and/or after each meeting those who are interested are welcome to join other members for dinner. We are open to suggestions for a good place to eat near our venue. Maria's on Peel Street in North Melbourne is currently the most popular place to eat after meetings.

LUV would like to acknowledge Red Hat for their help in obtaining the Buzzard Lecture Theatre venue and VPAC for hosting.

Linux Users of Victoria Inc. is an incorporated association, registration number A0040056C.

March 3, 2015 - 19:00

read more

Tridge on UAVs: APM:Plane 3.2.3 and 3.3.0beta1 released

Mon, 2015-02-23 15:36

The ArduPilot development team has a special treat for fixed wing users today - a double release!

  • A new stable 3.2.3 release with 3 fixes for 3.2.2
  • A new 3.3.0beta1 release with a lot more changes for wider testing

The 3.2.3 release is a minor update to 3.2.2 with 3 fixes:

  • A fixed to relative altitude drift when on the ground before takeoff
  • fixed TKOFF_THR_DELAY to be able to be up to 127 (for 12.7 seconds)
  • fixed INS_PRODUCT_ID (it was being reported as zero)

The most important fix is for the altitude drift, which could cause a poor altitude reference if your GPS altitude drifted while disarmed. The bug showed up as a significant drift in the reported relative altitude on the ground station when the aircraft was disarmed with the EKF enabled. The root cause of the bug was a disconnect between the EKF origin and the planes origin for relative altitudes. It only happened when the GPS altitude varied significantly while disarmed.

Start of 3.3.0 beta releases

The 3.3.0beta1 release has a lot more changes in it. The largest of the changes are internal, such as performance improvements in the NuttX operating system on Pixhawk, but given the size of the changes we want as many test users as possible.

Changes in 3.3.0beta1 include:

  • a new SerialManager library which gives much more flexible management of serial port assignment
  • changed the default FS_LONG_TIMEOUT to 5 seconds
  • raised default IMAX for roll/pitch to 3000
  • lowered default L1 navigation period to 20
  • new BRD_SBUS_OUT parameter to enable SBUS output on Pixhawk
  • large improvements to the internals of PX4Firmware/PX4NuttX for better performance
  • auto-formatting of microSD cards if they can't be mounted on boot (PX4/Pixhawk only)
  • a new PWM based driver for the PulsedLight Lidar to avoid issues with the I2C interface

I'm expecting a lot more changes will go into the 3.3.0 release as we still have a lot of pending pull requests. I will be doing regular beta updates as new patches go in (once they are flight tested).

Happy flying!

Michael Still: Oakey trig

Mon, 2015-02-23 15:28
I've got to say, this trig was disappointing. It was a lunch time walk, so a bit rushed, but the trig was just boring. Not particularly far, or particularly steep, or in a particularly interesting area. That said, it wasn't terrible. It just felt generic compared with other trigs I've walked to.


Interactive map for this route.

Tags for this post: blog pictures 20150223-oakey_trig photo canberra tuggeranong bushwalk trig_point

Related posts: Big Monks; A walk around Mount Stranger; Forster trig; Two trigs and a first attempt at finding Westlake; Taylor Trig; Urambi Trig


Sridhar Dhanapalan: Twitter posts: 2015-02-16 to 2015-02-22

Mon, 2015-02-23 00:27

Michael Still: Geocaching

Sun, 2015-02-22 19:28
I've been trapped at home with either a sick child or a sick me for the last four or five days. I was starting to go a bit stir crazy, so I ducked out for some local geocaching. An enjoyable shortish walk around the nearby nature park.

Interactive map for this route.

Tags for this post: blog canberra tuggeranong bushwalk geocaching

Related posts: Another lunch time walk; Lunchtime geocaching; Big Monks; Confessions of a middle aged orienteering marker; Geocaching in the evening, the second; Geocaching in the evening


Francois Marier: Error while running "git gc"

Sun, 2015-02-22 18:31

If you see errors like these while trying to do garbage collection on a git repository:

$ git gc warning: reflog of 'refs/heads/synced/master' references pruned commits warning: reflog of 'refs/heads/annex/direct/master' references pruned commits warning: reflog of 'refs/heads/git-annex' references pruned commits warning: reflog of 'refs/heads/master' references pruned commits warning: reflog of 'HEAD' references pruned commits error: Could not read a4909371f8d5a38316e140c11a2d127d554373c7 fatal: Failed to traverse parents of commit 334b7d05087ed036c1a3979bc09bcbe9e3897226 error: failed to run repack

then the reflog may be pointing to corrupt entries.

They can be purged by running this:

$ git reflog expire --all --stale-fix

Thanks to Joey Hess for pointing me in the right direction while debugging a git-annex problem.

Clinton Roy: clintonroy

Sun, 2015-02-22 15:28

Waking up at two for no discernible reason.

Breakfast with C was a better start to the morning.

Afternoon at The Edge doing conference stuff.

Filed under: diary

Clinton Roy: clintonroy

Sun, 2015-02-22 15:28

Coder Dojo down at Sunnybank Hill library. Quite exhausting after a bad night’s sleep!

Filed under: diary

Clinton Roy: clintonroy

Sun, 2015-02-22 14:28

Walked to work.

Caught up with a C after work, as a surprise thing rather than a planned thing.

Filed under: diary

Clinton Roy: clintonroy

Sun, 2015-02-22 14:28

A bit of a nothing apart from work day.

Filed under: diary

Clinton Roy: clintonroy

Sun, 2015-02-22 14:28

Walked to and from work, in an attempt to have a good night sleep tonight..

Tropical Cyclone Marcia has degenerated to a tropical low and is hovering around Brisbane today, making for a lot of rain. I quite like walking in the wet, as long as I’ve got my wet weather gear. Most of the work colleagues are cats and stayed home.

Conference planning later at The Edge.

Filed under: diary

Clinton Roy: clintonroy

Sun, 2015-02-22 14:28

Walked to and from work today.

Doing some conference planning later on.

Filed under: diary

Michael Still: Command and Control

Sat, 2015-02-21 14:29

ISBN: 9780141037912


I finished this book a while ago and it appears that I forgot to write it up. This book is by the author of Fast Food Nation and it is just as good as his other book. The history of America's nuclear weapons and their security (or lack thereof) is as compelling as it is terrifying. I found this book hard to put down while reading it, and would recommend it to others.

Tags for this post: book eric_schlosser nuclear weapons safety

Related posts: Random linkage; Fast Food Nation; Starfish Prime; Why you should stand away from the car when the cop tells you to; Random fact for the day; More nuclear bunkers Comment Recommend a book

Chris Samuel: Systemd joke

Sat, 2015-02-21 14:26

Since a few people seemed to like it on Twitter..

.@kartar "How many systemd's does it take to change a lightbulb?" "WHAT? SYSTEMD CHANGES LIGHTBULBS NOW? IS THERE NO END TO THIS INSANITY?"

— Chris Samuel (@chris_bloke) February 19, 2015

This item originally posted here:

Systemd joke