Planet Linux Australia

Syndicate content
Planet Linux Australia - http://planet.linux.org.au
Updated: 8 min 24 sec ago

Sridhar Dhanapalan: Twitter posts: 2015-02-23 to 2015-03-01

21 hours 11 min ago

Clinton Roy: clintonroy

Sun, 2015-03-01 16:28

A quite full on day.

Woke up early because..that’s what I do. Headed out to Sunnybank library in the morning, CoderDojo, then back to The Edge for minicomicon, where I picked up a few small freebies, but didn’t spot anything that I felt like buying. I spent a little time coding up a simple Markov generator, hopefully simple enough for the coder dojo folks to follow. After all that, out to Humbug.



Filed under: diary

David Rowe: SM1000 Part 11 – Accepting Pre-orders!

Sun, 2015-03-01 07:30

The first batch of 100 SM1000s are being built in China right now and we estimate shipping will start in late March. Due to popular demand I am accepting pre-orders right now!

Australian customers can buy directly from my Store, rest of the world please use the Aliexpress Store for direct shipping from Shenzhen, China.

Thanks Rick KA8BMA and Edwin from Dragino for all your kind help!

Clinton Roy: clintonroy

Fri, 2015-02-27 20:28

I went to bed really early last night due to my weird ongoing headache. I had a little help getting to sleep. This meant I basically had a full nights sleep by three o’clock. So I ended up walking to work stupidly early and arriving before five am. I still had some residual effects of the whatever-the-heck headache in the morning, but it’s gone by the evening.

The internet was really weird today, llamas and dresses for some reason.

Doing some conf stuff at The Edge. See three friends walk past on the walkway :)



Filed under: diary

Binh Nguyen: Fried Rice Recipe

Fri, 2015-02-27 20:13
This is based on a family recipe, recipes online, and an interpretation by local restaurants that I used to frequent. While there are other alternative recipes that possibly taste better, I find that this is the quickest and easiest version.

- chinese sausage

- rice

- eggs

- onion

- garlic

- tomato sauce

- salt- sugar

- soy sauce

- spring onion (optional)

 - dried shrimp (optional)

- shitake mushrooms (optional)

- lettuce (optional)

- fried shallot (optional)

- prawns (optional)

- Chinese BBQ Pork (also called char-siu/charsiu. See elsewhere on this blog for this recipe)



Sautee onion, garlic, chinese sausage in pan. Fry egg and then shred so that it can be mixed through rice more easily later on. Add rice and then add the rest of the diced/chopped ingredients. Add salt, sugar, soy sauce, etc... to taste. Garnish with shredded lettuce and fried shallots.



The following is what it looks like.

http://www.taste.com.au/recipes/1351/chinese+fried+rice

http://www.taste.com.au/recipes/15297/easy+fried+rice

http://www.taste.com.au/recipes/collections/fried+rice+recipes

Jeff Waugh: A(nother) new era of WordPress

Fri, 2015-02-27 12:38

The other night at WordPress Sydney, I dropped a five minute brain-dump about some cool things going on in the web ecosystem that herald a new era of WordPress. That’s a decent enough excuse to blog for the first time in two years, right?

I became a WordPress user 9 years ago, not long after the impressive 2.0 release. I was a happy pybloxsom user, but WordPress 2.0 hit a sweet spot of convenience, ease of use, and compelling features. It was impossible to ignore: I signed up for Linode just so I could use WordPress. You’re reading the same blog on (almost) the same Linode, 9 years later!

WordPress

Fast forward to 2015 and WordPress powers 20% of the web. It’s still here because it is a great product.

It’s a great product because it’s built by a vibrant, diverse Open Source community with a fantastic core team, that cares deeply about user experience, that mentors and empowers new contributors (and grooms or cajoles them to become leaders), and isn’t afraid of the ever-changing web.

Another reason for the long term success of WordPress is that it’s built on the unkillable cockroach of the world wide web: PHP.

I won’t expound on the deficiencies of PHP in this post. Suffice to say that WordPress has thrived on PHP’s ubiquity and ease of adoption, while suffering its mediocrity and recent (albeit now firmly interrupted) stagnation.

HHVM

The HipHop Virtual Machine is Facebook’s high performance PHP runtime. They started work on an alternative because PHP is… wait for it… not very efficient.

Unless you’ve goofed something up, the slowest part of your PHP-based application should be PHP itself. Other parts of your stack may exhibit scaling problems that affect response times, but in terms of raw performance, PHP is the piggy in the middle of your web server and data stores.

“But like I said, performance isn’t everything.” — Andi Gutmans

What is the practical implication of “performance isn’t everything”? Slow response times, unhappy users, more servers, increased power utilisation, climate change, and death.

Facebook’s project was released in 2010 as the HipHop compiler, which transpiled PHP code into C++ code, which was then compiled into a gigantic monolithic binary, HTTP server included.

In early 2013, HipHop was superseded by HHVM, a jitting virtual machine. It still seemed pretty weird and awkward on the surface, but by late 2013 the HHVM developers added support for FastCGI.

So today, deployment of HHVM looks and feels familiar to anyone who has used php-fpm.

Want to strap a rocket to your WordPress platform? I strongly recommend experimenting with HHVM, if not putting it into production… like, say, Wikipedia.

Hack

Not content with nuking PHP runtime stagnation, the HHVM developers decided to throw some dynamite in the pants of PHP language stagnation by announcing their new Hack language. It’s a bunch of incremental improvements to PHP, bringing modern features to the language in a familiar way.

Imagine you could get in a DeLorean, go back to 2005, and take care of PHP development properly. You’d end up with something like Hack.

Hack brings performance opportunities to the table that the current PHP language alone could not. You’ve heard all those JavaScript hipsters (hi!) extolling the virtues of asynchronous programming, right? Hack can do that, without what some describe as “callback hell”.

Asynchronous programming means you can do things while you wait. Such as… turning database rows into HTML while more database rows are coming down the wire. Which is pretty much what WordPress does. Among other things.

Based on the WordPress team’s conservative approach to PHP dependency updates, it’s unlikely we’ll see WordPress using Hack any time soon. But it has let the PHP community (and particularly Zend) taste the chill wind of irrelevance, so PHP is moving again.

WP-API

Much closer to WordPress itself, the big change on the horizon is WP-API, which turns your favourite publishing platform into a complete and easy-to-use publishing API.

If you’re not familiar with APIs, think about it this way: If you cut off all the user interface bits of WordPress, but kept all the commands for managing your data, and then made them really easy to use from other applications or web sites, you’d have a WordPress API.

But what’s the point of stripping off all the user interface bits of WordPress? Aren’t they the famously good bits? Well, yes. But you could make even better ones built on top of the API!

Today, there’s a huge amount of PHP code in WordPress dedicated to making the admin user interface so damn good. There’s also a lot of JavaScript code involved, making it nice and interactive in your browser.

With WP-API, you could get rid of all that PHP code, do less work on the server, and build the entire admin user interface in the browser with JavaScript. That might sound strange, but it’s how most modern web applications are built today. WordPress can adapt… again!

One of the things I love about WordPress is that you can make it look like anything you wish. Most of the sites I’ve worked on don’t look anything like traditional blogs. WP-API kicks that up a notch.

If you’ve ever built a theme, you’ll know about “the loop”. It’s the way WordPress exposes data to themes, in the form of a PHP API, and lots of themers find it frustrating. Instead of WordPress saying, “here are the posts you wanted, do what you like”, it makes you work within the loop API, which drip-feeds posts to you one at a time.

WP-API completely inverts that. You ask WordPress for the data you want — say, the first ten posts in May — then what you do with it, and how, is 100% up to you.

There’s way more potential for a WordPress API, though. A fully-featured mobile client, integration with legacy publishing systems at your newspaper, custom posting interfaces for specific kinds of users, etc., etc., etc.

The best bit is that WP-API is going to be part of WordPress. It’s a matter of “when”, not “if”, and core WordPress features are being built today with the WP-API merge in mind.

React

According to its creators, “React is a JavaScript library for building user interfaces”, but it’s way cooler than that. If you’re building complex, interactive interfaces (like, say, the admin back-end of a publishing platform), the React way of thinking is fireworks by the megaton.

For all the hype it enjoys today, Facebook launched React in 2013 to immense wailing and gnashing of teeth. It mixed HTML (presentation) and JavaScript (logic) in a way that reminded developers of the bad old days of PHP. They couldn’t see past it. Some still can’t. But that was always a facile distraction from the key ideas that inspired React.

The guts beneath most user interfaces, on the web or desktop, look like a mad scientist’s chemistry lab. Glass everywhere, weird stuff bubbling over a Bunsen burner at one end, an indecipherable, interdependent maze of piping, and dangerous chemical reactions… you’d probably lose a hand if you moved anything.

React is a champagne pyramid compared to the mad chemistry lab of traditional events and data-binding.

It stresses a one-way flow: Data goes in one end, user interface comes out the other. Data is transformed into interface definitions by components that represent logical chunks of your application, such as a tool bar, notification, or comment form.

Want to make a change? Instead of manipulating a specific part of the user interface, just change the data. The whole user interface will be rebuilt — sounds crazy, right? — but only the changes will be rendered.

The one-way data flow through logical components makes React-based code easy to read, easy to reason about, and cranks your web interface to Ludicrous Speed.

Other libraries and frameworks are already borrowing ideas, but based on adoption to date, number of related projects, and quality of maintenance, I reckon React itself will stick around too.

Connecting the Dots

It won’t happen overnight, but WP-API will dramatically reduce the amount of active PHP code in WordPress, starting with the admin back-end. It will become a JavaScript app that talks to the WP-API sooner than anyone suspects.

Front-end (read: theme) development will change at a slower pace, because rendering HTML on the server side is still the right thing to do for performance and search. But themers will have the option to ditch the traditional loop for an internal, non-remoting version of the WP-API.

There’ll be some mostly-dead code maintained for backwards compatibility (because that’s how the dev team rolls), but on the whole, the PHP side of WordPress will be a lean, mean, API-hosting machine.

Which means there’s going to be even more JavaScript involved. Reckon that’s going to be built the same way as today? Nuh-uh. One taste of React in front of WP-API, and I reckon the jQuery and Backbone era will be finished.

In WordPress itself, most of this will affect how the admin back-end is built, but we’ll also see some great WordPress-as-application examples in the near future. Think Parse-style app development, but with WordPress as the Open Source, self-hosted, user-controlled API services layer behind the scenes.

What about HHVM? You’re going to want your lean, mean, API-hosting machine to run fast and, in some cases, scale big. Unless the PHP team surprises everyone by embracing the JVM, I reckon the future looks more like HHVM than FPM (even with touted PHP 7 performance improvements).

Once HHVM is popular enough, having side-by-side PHP and Hack implementations of  core WordPress data grinding functions will begin to look attractive. If you’ve got MySQL on one side, a JSON consumer on the other, and asynchronous I/O available in between, you may as well do it efficiently. (Maybe PHP will adopt async/await. See you in 2020?)

End

Look, what I’m trying to say is that it’s a pretty good time to be caught up in the world of WordPress, isn’t it?

Binh Nguyen: Chicken Curry Recipe

Fri, 2015-02-27 05:52
This is based on a family recipe.

- chicken

- sugar

- salt

- pepper

- garlic

- curry

- onion

- carrot

- potato

- fish sauce

- coconut milk

- curry mix (powder or liquid)(optional)

- tomatoes (optional)



Marinate chicken in sugar/salt/pepper/garlic/curry powder mixture. Brown off chicken in pan. In the meantime, dice vegetables and put into microwave for short period to speed up cooking time. Put all vegetables into pan. Add coconut milk and possibly a curry mix (to boost the flavour) to pan to create sauce. Use fish sauce to taste. Goes well with white rice or else bread.



The following is what it looks like. 

http://www.taste.com.au/recipes/7378/coconut+chicken+curry

http://www.bbcgoodfood.com/recipes/1993658/homestyle-chicken-curry

Binh Nguyen: Szechuan Pork Mince Recipe

Fri, 2015-02-27 05:06
This is based on recipes online and an interpretation by a local restaurants that I used to frequent. While there are other alternative recipes that possibly taste better, I find that this is the quickest and easiest version.   - pork mince

- salt

- sugar

- pepper

- chilli bean paste

- rice wine

- soy sauce

- tofu (fried or fresh)

- soy sauce

- garlic (optional)

- ginger (optional)

- caramel (optional)

- green beans (optional)



Marinade pork mince in salt/sugar/pepper/rice wine/soy sauce. Fry off off mince in wok/pan. Add chilli bean taste. Add sugar, pepper, soy, caramel, etc... sauce to taste. Slice tofu, put into microwave for 30 seconds and drain liquid, and stir through sauce. Fry off green beans in the meantime and add into mixture if you want at this point. Water down sauce if it gets too thick.



Goes well with a asian chicken soup (use pre-made or make a quick one using carrots, celery, onion, chicken bones, water, pepper, salt, pepper, soy sauce, and fish sauce) and steamed white rice.



The following is what it looks like.

http://www.girlichef.com/2014/03/Szechuan-Green-Beans-with-Ground-Pork.html

http://www.cookinglight.com/food/in-season/green-bean-recipes/szechuan-green-beans-ground-pork

Binh Nguyen: Vietnamese Grilled Lemongrass Pork Chop Recipe

Thu, 2015-02-26 22:51
This is based on recipes online and an interpretation by a korean/japanese fusion restaurant that I used to frequent. While there are other alternative recipe that possibly taste better, I find that this is the quickest and easiest version.  - pork chops- sugar

- garlic

- shallot or yellow onion- lemongrass

- pepper

- soy sauce

- fish sauce- rice wine vinegar

- oil

Coat pork with bicarbonate soda if desired (meat tenderiser) and then wash off in cold water. Create marinade sauce by starting with liquids and then adding sugar, soy sauce, garlic, etc... Marinade pork with sauce. Cook rice in meantime. Pan fry pork and then place under grill for quicker results or else place directly in grill/oven/bbq from start to finish. 

 Goes well with a asian chicken soup (use pre-made or make a quick one using carrots, celery, onion, chicken bones, water, pepper, salt, pepper, soy sauce, and fish sauce) and steamed white rice, fried eggs, pickled carrot or cucumber (sliced finely and dressed with vinegar and sugar) and nuoc mam as a sauce.

http://www.sbs.com.au/food/recipes/vietnamese-dressing-nuoc-mam-cham?cid=trending

The following is what it looks like.  http://www.bonappetit.com/recipe/vietnamese-pork-chops

http://www.vietworldkitchen.com/blog/2009/04/vietnamese-restaurantstyle-grilled-lemongrass-pork-thit-heo-nuong-xa.html

http://www.epicurious.com/recipes/food/views/vietnamese-pork-chops-51169530http://www.epicurious.com/recipes/food/views/grilled-pork-chops-with-sweet-lemongrass-marinade-51115010http://www.bonappetit.com/recipe/vietnamese-pork-chops

Binh Nguyen: Chinese Roast (BBQ/Char-Siu) Pork Recipe

Thu, 2015-02-26 22:38
This is based on recipes online and an interpretation by local restaurants that I used to frequent. While there are other alternative recipe that possibly taste better, I find that this is the quickest and easiest version. - pork

- soy sauce

- hoisin sauce

- Chinese rice cooking wine

- sugar

- garlic

- honey (optional)- pepper (optional)- oyster sauce (optional)

- star anise (optional)

- red food colouring (powder or liquid)Split (if too large to fit into oven/grill) pork if required. Coat pork with bicarbonate soda if desired (meat tenderiser) and then wash off in cold water. Create marinade sauce by starting with hoy sin sauce and then adding sugar, soy sauce, garlic, etc... Marinade pork with sauce. Cook rice in meantime. Pan fry pork and then place under grill for quicker results or else place directly in grill/oven/bbq from start to finish. 

Goes well with a asian chicken soup (use pre-made or make a quick one using carrots, celery, onion, chicken bones, water, pepper, salt, pepper, soy sauce, and fish sauce) and steamed white rice.

The following is what it looks like. http://yireservation.com/recipes/char-siu-chinese-bbq-pork/

http://allrecipes.com/recipe/char-siu-chinese-bbq-pork/

http://www.taste.com.au/recipes/19078/chinese+barbecue+porkhttp://thestonesoup.com/blog/how-to-make-authentic-bbq-chinese-pork-at-home/http://www.gourmettraveller.com.au/recipes/recipe-search/masterclass/2011/12/char-siu/

Binh Nguyen: Korean/Japanese Pork Bolgogi (BBQ Pork) Recipe

Thu, 2015-02-26 22:28
This is based on recipes online and an interpretation by a korean/japanese fusion restaurant that I used to frequent. While there are other alternative recipe that possibly taste better, I find that this is the quickest and easiest version. - pork (purchase offcuts/pre-sliced pork belly in some stores for a more timely meal)

- bolgogi sauce

- sugar

- mirin or rice cooking wine

- crushed/diced garlic or powder

- soy sauce

- ginger (optional)

- pepper (optional)

- spring onion (optional)

- shichimi togarashi spice mix

http://en.wikipedia.org/wiki/Shichimi



Slice pork if required. Coat pork with bicarbonate soda if desired (meat tenderiser) and then wash off in cold water. Create marinade sauce by starting with bolgogi sauce and then adding sugar, soy sauce, garlic, ginger, shichimi togarashi spice mix, etc... Marinade pork with sauce. Cook rice in meantime. Pan fry pork and then place under grill for quicker results or else place directly in grill/oven/bbq from start to finish.

Serve with Miso soup, sweet potato fries, and rice. Garnish pork with shichimi togarashi spice mix and rice with soy sauce. Add kimchi to meal if desired.



You can change the meat to chicken or even beef if the sauce is changed to the appropiate one.



The following is what it looks like.

http://zenkimchi.com/featured/recipe-dwaeji-bulgogi-grilled-korean-spicy-pork/

http://crazykoreancooking.com/recipe/spicy-pork-bulgogi-spicy-marinated-pork

Binh Nguyen: Simple Pasta Recipes

Thu, 2015-02-26 21:55
As the title states the following are a bunch of recipes that I sometimes use for pasta. This is being placed here for my own possible records and for others to use if so desired.

The point of these recipes is to achieve the best taste, in the quicket possible time, at the cheapest possible price. That's why the ingredients are somewhat non-traditional at times. Here's the other thing, it's obvious that they can be altered quickly and easily to suit other core ingredients. Don't be afraid to experiment.

Bacon and Mushroom Carbonara with Pasta

- white pasta sauce (can be any. We will modify to suit our tastes but most are roughly the same. Alfredo is often the easiest/closest to what we finally want though)

- mushrooms (buy them pre-sliced and you'll have the sauce done for this recipe done in no time)

- bacon (buy it pre-diced and you'll have the sauce done for this recipe done in no time)

- sugar (to taste)

- salt (to taste)- soy sauce (to taste)

- pepper (to taste)Fry off bacon then mushroom in a pan. Add pasta sauce. In the meantime, cook pasta with some salted water. Use sugar/salt/soy sauce to change sauce if too tart, sweet, etc... Garnish pasta and sauce with parmessan if desired.

Spaghetti Bolognese with Pasta

- pasatta or tomato based pasta sauce

- beef mince- onion (optional)

- garlic (optional)

- fresh chilli or chilli flakes (to taste)- salt (to taste)

- sugar (to taste)

- soy sauce (to taste)  - pepper (to taste)- tomato sauce (to taste) Sautee onion, garlic, and chilli. Brown mince (remove excess liquid if desired. It will change the nature of the sauce if there is excess liquid). Add pasta sauce. In the meantime, cook pasta with some salted water. Use sugar/salt/pepper/soy sauce to change sauce if too tart, sweet, etc... Garnish pasta and sauce with parmessan if desired.

Spaghetti Bolognese (Asian Interpretation) with Pasta

- pasatta

- sliced beef- onion (optional)

- garlic (optional)

- fresh chilli, sriracha chilli sauce, or chilli flakes (to taste)- salt (to taste)

- sugar (to taste)

- soy sauce (to taste)  - fish sauce (to taste)  - pepper (to taste)Sautee onion, garlic, and chilli. Brown mince (remove excess liquid if desired. It will change the nature of the sauce if there is excess liquid). Add pasta sauce. In the meantime, cook pasta with some salted water. Use sugar/salt/pepper/sriracha chilli sauce/soy sauce to change sauce if too tart, sweet, etc... Garnish pasta and sauce with parmessan if desired.

Seafood or Chill Prawn Tomato Sauce with Pasta

- pasatta or tomato based pasta sauce

- prawns or seafood

- onion (optional)

- garlic (optional)

- fresh chilli or chilli flakes (to taste)- sriracha chilli sauce, sambal oelek, or chilli bean paste (to taste) - salt (to taste)

- sugar (to taste)

- soy sauce (to taste)  - pepper (to taste)- tomato sauce (to taste) - diced fresh tomato (optional)(buy pre-diced canned if pressed for time)

- olives (optional)(buy canned, pre-sliced, and drain holding liquid if pressed for time)Sautee onion, garlic, and chilli. Sear seafood (remove excess liquid if desired. It will change the nature of the sauce if there is excess liquid). Add pasta sauce, and fresh tomato and olives (if desired). In the meantime, cook pasta with some salted water. Use sugar/salt/pepper/sriracha chilli sauce/soy sauce to change sauce if too tart, sweet, etc... Garnish pasta and sauce with parmessan if desired.

Pork Chops With White Sauce with Pasta

- pork chops

- cream- tomato sauce- garlic - salt (to taste)

- sugar (to taste)

- soy sauce (to taste)  - pepper (to taste)- tomato sauce (to taste) Sear pork chop with garlic to level desired (remove excess liquid if desired. It will change the nature of the sauce if there is excess liquid) and remove from pan. Add cream to deglaze pan and create sauce. In the meantime, cook pasta with some salted water. Use sugar/salt/pepper/tomato sauce/soy sauce to change sauce if too tart, sweet, etc... Garnish pasta and sauce with parmessan if desired.

Clinton Roy: clintonroy

Thu, 2015-02-26 18: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 11: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



Comment

Clinton Roy: clintonroy

Wed, 2015-02-25 20: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 20: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 19: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 23: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 linux.conf.au 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;

  

  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 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 23: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.

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.

March 3, 2015 - 19:00

read more

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

Mon, 2015-02-23 16: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!