You are here

thinktime

Clinton Roy: clintonroy

Planet Linux Australia - Wed 25th Feb 2015 19:02

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
Categories: thinktime

The Long Shadow of the Great Famine on Irish people’s health at home and abroad

Location Copland, The Basement Theatre The Spot 198 Berkeley Street University of Melbourne, VIC 3010 Australia See map: Google Maps Professor Cecily Kelleher 18 March 2015 - 6:30pm - 7:30pm Professor Cecily Kelleher, Chair of Public Health at University College Dublin, is presenting the Miegunyah lecture on The Long Shadow of the Great Famine

The Great Famine of 1846 to 1852 cast a long shadow over the Irish people. A million died of hunger and disease; another two million fled to the United Kingdom and the New Worlds. Ireland was changed utterly. But the effects were also felt on the cities of Liverpool, Glasgow, Boston, New York, Montreal, Sydney and Melbourne. The demographic, political and religious legacy of the Great Famine is well researched and still debated. But was there also a more insidious biological legacy—an imprint of embodied history to be found in the health of the survivors and their descendants?

read more

Categories: thinktime

The numbers are in: 1.8m Australian smokers likely to die from their habit

Teaser:  The first large-scale, direct evidence on smoking and mortality in Australia shows up to 1.8 million of our 2.7 million smokers are likely to die from their habit if they continue to smoke, losing on average ten years of life expectancy.

This article originally appeared on the Melbourne Newsroom on February 25. View the original here.

The first large-scale, direct evidence on smoking and mortality in Australia shows up to 1.8 million of our 2.7 million smokers are likely to die from their habit if they continue to smoke, losing on average ten years of life expectancy.

read more

Categories: thinktime

10 Years Ago in ALA: Attribute Anarchy

a list apart - Wed 25th Feb 2015 00:02

WARNING: there are experimental elements and deeply controversial syntaxes ahead! Proceed at your own peril! You have been warned, and the website you save…could be your own. Ten years ago, right here in ALA, a wild-eyed hell-raiser going by “PPK” made a radical proposal: custom attributes in markup.

In my opinion, using custom attributes to trigger the behavior layer … will help to separate behavior and structure and to write simple, efficient scripts.

Besides, triggers can grow to be more complicated than just a “deploy behavior here” command. Sometimes you’ll want to add a value to the trigger.

Well, okay. At the time it was radical. Here in the future, we have perfectly valid HTML5 data- attributes to contain all manner of information and act as behavioral triggers for our scripts.

The front end of a website consists of three layers. XHTML forms the structural layer, which contains structural, semantic markup and the content of the site. To this layer you can add a presentation layer (CSS) and a behavior layer (JavaScript) to make your website more beautiful and user-friendly. These three layers should remain strictly separate. For instance, it should be possible to rewrite the entire presentation layer without touching either the structural or the behavior layer.

All of this holds as true today as it did a decade ago. I know I’ve used data- attributes for both: to invoke custom behavior without touching the classes I use for styling—keeping my behavioral layers and presentation layers separate—and to pass relevant configuration information to said scripts. Picturefill 1’s data-srcset="1x source.jpg, 2x hd-source.jpg" comes to mind: we could define an attribute and write a script that dictates how the associated element should behave, all in one perfectly valid package.

The presence of the maxlength attribute alerts the script to check user input in this textarea, and it can find the maximum length of this specific textarea in the value of the attribute. As long as we’re at it we can port the “required” trigger to a custom attribute, too. required=“true”, for instance, though any value will do because this trigger just gives a general alert and doesn’t carry extra information.

maxlength? required? These custom attributes that once so daringly flew in the face of conventional web standards are now part of the HTML5 standard.

Maybe it’s best that the web didn’t linger too long on our warning at the top of the page.

 

Categories: thinktime

David Rowe: Minimalist VHF Software Defined Radio Part 1

Planet Linux Australia - Tue 24th Feb 2015 23:02

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 linux.conf.au 2015 talk.

For the last two weeks I’ve been playing around with 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;

  

  si5351.init(SI5351_CRYSTAL_LOAD_8PF,25000000);

 

  while(1) {

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

      f_ull = f*100000000ULL;

      si5351.set_freq(f_ull, 0, SI5351_CLK0);

      delay(1000);

    }

  }



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.

Results

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 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 higher 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.

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?
Categories: thinktime

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

Planet Linux Australia - Tue 24th Feb 2015 23:02
Start: Feb 3 2015 19:00 End: Feb 3 2015 21:00 Start: Feb 3 2015 19:00 End: Feb 3 2015 21:00 Location: 

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

Link:  http://luv.asn.au/meetings/map

Speakers:

• 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 http://www.trinity.unimelb.edu.au/about/location/map

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:

http://www.metlinkmelbourne.com.au/route/view/725

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.

February 3, 2015 - 19:00

read more

Categories: thinktime

Shoes that don't fit (and free salt)

Seth Godin - Tue 24th Feb 2015 20:02
A beautiful pair of shoes, but one size too small, on sale and everything.... Not worth buying, not for you, not at any price. Because shoes that don't fit aren't a bargain. And at a restaurant, you may have noticed...         Seth Godin
Categories: thinktime

"Leap First" is now available

Seth Godin - Tue 24th Feb 2015 06:02
An original audio production* via Sounds True, with 100% of my royalties going to the Acumen Fund. Find it right here: Leap First. I just got this great note from Jason Connell. I hope the recording resonates with you as...         Seth Godin
Categories: thinktime

Ruckusmaker day

Seth Godin - Mon 23rd Feb 2015 21:02
About to be celebrated all over the world for the first time, tomorrow is annual Ruckusmaker Day. Tomorrow would have been Steve Jobs' 60th birthday. Steve's contribution wasn't invention. Technology breakthroughs didn't came out of his workbench the way they...         Seth Godin
Categories: thinktime

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

Planet Linux Australia - Mon 23rd Feb 2015 16:02

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!

Categories: thinktime

Michael Still: Oakey trig

Planet Linux Australia - Mon 23rd Feb 2015 16:02
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



Comment
Categories: thinktime

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

Planet Linux Australia - Mon 23rd Feb 2015 01:02
Categories: thinktime

The trolls inside

Seth Godin - Sun 22nd Feb 2015 21:02
The worst troll is in your head. Internet trolls are the commenters begging for a fight, the anonymous critics eager to tear you down, the hateful packs of roving evil dwarves, out for amusement. But the one in your head,...         Seth Godin
Categories: thinktime

Michael Still: Geocaching

Planet Linux Australia - Sun 22nd Feb 2015 20:02
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



Comment
Categories: thinktime

Francois Marier: Error while running "git gc"

Planet Linux Australia - Sun 22nd Feb 2015 19:02

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.

Categories: thinktime

Clinton Roy: clintonroy

Planet Linux Australia - Sun 22nd Feb 2015 16:02

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
Categories: thinktime

Clinton Roy: clintonroy

Planet Linux Australia - Sun 22nd Feb 2015 16:02

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



Filed under: diary
Categories: thinktime

Clinton Roy: clintonroy

Planet Linux Australia - Sun 22nd Feb 2015 15:02

Walked to work.

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



Filed under: diary
Categories: thinktime

Clinton Roy: clintonroy

Planet Linux Australia - Sun 22nd Feb 2015 15:02

A bit of a nothing apart from work day.



Filed under: diary
Categories: thinktime

Clinton Roy: clintonroy

Planet Linux Australia - Sun 22nd Feb 2015 15:02

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
Categories: thinktime

Pages

Subscribe to KatteKrab aggregator