Computers, bikes and things I’d like to remember.

Linux and 3G Broadband

December 20th, 2008 Posted in Computing | 4 Comments »

I have almost finished moving to another place in Waramanga ACT. Google thinks this is number 53, but really it’s number 52. Me, my bikes, computers, tools, electronics, books and music have made the move. I have a bed for me and one for each of the kids when they’re with me. I even have a dining table!

Having arranged for gas and electricity, I looked into my options for data. I had been accustomed to TransACT VDSL with Velocitynet as my ISP, but the world has moved on since I started using that service. These days the new hotness is ADSL2+ and if possible, ‘naked’. A naked service is one where you have no conventional analogue phone line and instead rely on either mobile or VOIP for telephony. This suits me perfectly because I almost never use a landline these days.

So I researched and found that Internode’s Naked Extreme ADSL2+ plan looked perfect for me but I soon found that it pretty well needs an existing phone service to disconnect and take over. So I had to get Telstra to connect the phone for me (bye-bye $80) so that I could pass the number to Internode to disconnect. Anyway, that all happened and the process is in train.

But… the new service won’t be available for almost three weeks. Eeep! Three weeks with no data? Unpossible!

So I set about getting dial-up working to my existing Velocitynet account. I’ll not dwell on it, but let’s just say that it wasn’t a bed of roses. No dial up for me.

Left with little choice, I bit the bullet today and bought a HUAWEI E160G USB HSDPA modem from 3 for $129. It’s a wee USB stick that provides reasonable data rates via the 3G network. I coughed up another $29 for 2 gig of data (ouch).

I’m using a Dell X1 laptop running Ubuntu 8.10 Intrepid Ibex. I brought the modem home and settled in to what I expected would be a long session of finding drivers, compiling kernel modules and editing configuration files. I plugged the USB modem in and… it worked. It just worked. Instant net connection. The device was detected, the right modules were loaded and up came the network.

Colour me very, very impressed with the kernel people, the Ubuntu people and whoever made sure Intrepid knows about these devices.

I’m getting about 1900kbps down and about 76kbps up, according to speedtest.net. That’ll do until my ADSL2+ comes along.

University finished for this year

December 3rd, 2008 Posted in General | 2 Comments »

At last. Uni is done and dusted for 2008. So I’m half way through an IT Masters at the ANU and it does feel good not to have to study for a while. Though I did find myself last weekend reading an academic paper about user interface design purely for personal interest. I think studying Human Computer Interaction and Usability Engineering for the last half of the year has done something to me.

Anyway, at year’s end I have accumulated a Distinction and three High Distinctions. Given a fairly eventful 2008 I think I’m pretty pleased with that result. I now know a whole lot more about java programming, design patterns, relational databases and HCI than I did a year ago. Not to mention the dozens of other things that sit inside those broad topics.

Now I need to work out what subjects to do next year.

Lowest Common Denominator

November 28th, 2008 Posted in General | 2 Comments »

My day job involves basking in the reflected glory of a talented small team of software developers and systems people who write cool applications and build cool computer systems. I employ the Homer Simpson style of management:

Homer: [to staff] Are you guys working?
Man 1: Yes, sir, Mr. Simpson.
Homer: Could you, um… work any harder than this?
Man 2: Sure thing, boss.
[they do]
Homer: Hey, call me Homer.
– You too can learn my secrets to successful mananagement,

From http://www.snpp.com/episodes/3F23.html

And we count ourselves lucky to be doing successful open source software development inside an Australian Federal Government agency.

Part of what we do involves copying files from computers in various government agencies onto some physical media to transfer to us. That’s right, nothing over the wire, it’s all copied to physical media and delivered to our door (don’t ask).

So it would be nice to know, on receipt of perhaps a DVD full of data, that the data on it is the data we are supposed to have and that it hasn’t been damaged or altered in any way during its journey to us. Enter the Manifest Maker.

We wrote the Manifest Maker as a simple tool for our own use and soon found that plenty of others needed it too. It’s a little Python app that creates a tab separated text file describing the content of an arbitrary hierarchical file system, including the calculation of a checksum for each data object and having the ability to associate a ‘barcode’ identifier with each data object. Its purpose is to make a manifest file to accompany a pile of data that is being transferred to us, so we can compare the data to the manifest to make sure that we received what we expected to.

We knew that this app’s half a dozen users would want a GUI, so we gave it one via Python’s wx-widgets. And it looks okay. Then we realised that the majority of potential users would want to run it on a Windows box, so I made a dot exe version with the Python libraries wrapped up in it so there’d be no need for Windows users to install Python before using Manifest Maker.

We released Manifest Maker via sourceforge as a zip file including a pre-built dot exe for Windows users, including all of the source and instructions for Windows and Linux:

http://sourceforge.net/project/showfiles.php?group_id=116934&package_id=299017

And today someone asked me for a link to Manifest Maker. I supplied the link above.

The response, and I understand why it matters, was “Can we have just the exe on a web site somewhere? No user wants all that other stuff.”

And that’s right, but I die a little inside to hear it.

DIY LED Dyno Bike Lights

November 26th, 2008 Posted in Bikes, General | 3 Comments »

The whole bike

For several months every year, commuting by bike involves riding for quite a while in the dark. Here in Canberra that’s all of Winter and maybe a few weeks either side as well. For years I used a series of battery powered lights, starting with incandescents powered by lead-acid gel batteries, then graduating to brighter incandescents powered by nickel metal hydride batteries. These were all quite good, but the need to keep batteries charged all the time and the constant planning to make sure I’d have enough light to get home was rather inconvenient.

The advent of highly efficient, very bright LED emitters has revolutionised bike lighting, but doesn’t seem to have been applied much to commuter lights. And by commuter lights, I really mean lights powered by the rider’s effort. Dynamo lights.

It so happens that LEDs and dynamos turn out to be pretty much made for each other. LEDs require a current limited power source and dynamos are inherently just that. This means that you need no fancy (and potentially lossy) regulation to get between your LEDs and their power source.

So I set about making a set of dynamo powered bike lights just for commuting.

First I researched bike dynamos online. These tend to come in two broad types. One type is the old style rub-on-the-tyre ‘bottle‘ kind, and in general these are inexpensive but they tend not to be very efficient and tend to wear your tyres. The other type is the hub dynamo which lives inside your wheel’s hub. These are usually quite efficient but they have the disadvantage that you can never remove the slight drag that they introduce. I have found in practise that the drag is almost impossible to detect. There are not many easily available hub dynamos to choose from. The Schmidt and the Shimano are the main contenders these days with Schmidt winning on efficiency and Shimano winning on price. I bought a Shimano.

I also bought a 700C rim and 32 spokes so I could build the hub into a wheel, but if wheel building isn’t your cup of tea you could always get a bike shop to do it for you. I usually get a bike shop to do the final true and tension on my wheels after I have made something mostly wheel-like to work on.

Shimano Dyno Hub

With a working source of power, the next thing to think of was the lights themselves. I chose to use two Cree X-LED emitters wired in series as my light. These were very, very cheap from http://dealextreme.com and were the brightest available when I bought them a year or more ago. Every few months these things get brighter, so I’m sure anyone making something like this now will have better lights than I do.

A dynamo is usually used to power filament lamps rather than LEDs, so the fact that it produces AC is of little consequence there, but LEDs need DC so something must be done to turn the AC into DC before the applying it to the LEDs. A key goal in designing all this stuff is to get as much of the energy as possible from the hub into the LEDs and converted to light with minimal losses. So I made a bridge rectifier from Schottky diodes which have a low forward voltage drop and should introduce minimum loss.

One trouble with dynamo powered lights is that when you stop moving, for example at an intersection, your light stops too. Luckily, these days there’s a simple piece of technology that can take care of this problem. Just a few years ago, these supercapacitors were unimaginable but now they are inexpensive and readily available. I used this One Farad capacitor, connected across one of the two LEDs in my light to provide enough power to illuminate the LED for several minutes after I stop. It’s not bright enough to ride by but it doesn’t need to be - it’s only for being seen when you’re stationary. The supercap starts charging as soon as you start moving, and when you stop, it discharges slowly through the LED, keeping it lit.

The Dynamo, two LEDs, four diodes and the tiny supercapacitor make up the complete circuit of the LED commuter dyno light:

Dynamo LED circuit

One thing that I have deliberately not included in this design is an on/off switch. There are a couple of reasons for not having a switch. The first is that it creates another possible point of failure where reliability is quite important. Next is that if the dynamo is disconnected from a load, its open circuit voltage can rise to very, very high levels. In itself this doesn’t matter much, but if the instant of switch-on occurs while riding at speed with a high voltage on the output of the dynamo it’s possible that either the LEDs or the supercap may be damaged. No such problem if there’s always a load connected across the dyno.

To build the light, I started by hacking up some old aluminium channel material that I had retrieved from a local recycling centre. It forms a nice heatsink for the LEDs, though I think that in this application it’s probably overkill. As can be seen in the image below, the bolts holding the LED emitters in place have insulating washers under their heads to avoid creating a short circuit through the heatsink where the bolts touch the emitters. Wires from the LEDs pass through holes in the aluminium and into a short length of electrical conduit that houses the diodes and the supercapacitor. Wires from the dynamo enter the same place. The whole assembly is attached to the handlebars using a recycled reflector bracket.

Construction

To seal off the short length of conduit, I used a pair of plastic chair leg stoppers from the local hardware shop. One has holes drilled to accommodate all of the wiring. The conduit is zip tied to the aluminium channel.

Rear of the light

To get the light to go mostly where I want it, a pair of collimating reflectors fit over the LEDs and are held in place by a couple of cut down plastic plumbing fittings. The plastic fittings are glued into place with a contact adhesive. The photo below was taken about fifteen minutes after parking the bike. You can see that the LED on the right is still slightly illuminated by the supercap. It decays away very slowly.

Close-up

At this point I had planned to show some mind-blowing beam shots and maybe a short video of just how bright the lights are. And they are incredibly bright - all the more so for running purely from unnoticed pedaling effort. It turns out that riding a bike while photographing your headlights is… tricky. So that may have to wait.

The lack of an on/off switch has prompted just a couple of concerned commuters to advise me in daylight that I’ve left my lights on. At night, though I have a good cutoff at the leading edge with the lights aimed away from the eyes of oncoming traffic, I have had several complaints that the lights are “too bright.” From a dynamo? How can that be?

Cameras (or Thanks Dad!)

November 10th, 2008 Posted in General | No Comments »

Canon 300D

I have messed around with cameras since about 1972 when Mum and Dad gave me a Kodak Instamatic for my birthday. Dad was a big influence because he always had an ambition to be a photographer, so I grew up understanding black and white processing and the idea that photography nicely blends art and science.

As a teenager I collected old cameras, buying Brownie Boxes and old bellows cameras from Op Shops, buying old film from chemists for next to nothing, way past its use-by date because it mattered little for the B&W 120 film. Nights hiding under my blankets waiting for total dark to load the dev tank. At secondary school I played with more advanced photography and had the chance to use SLR cameras supplied by the school. Yay!

As an (almost) adult I bought a Canon T50, seduced by its price and motor drive. It took great photos but lacked the aperture or shutter priority or manual modes that I would have preferred. Years later I managed to swap a cordless phone for the more advanced Canon T90, but I did so just as 35mm film was being edged aside by digital.

Working at Panasonic I managed to pick up a 640 x 480 pixel digital camera for IIRC about $250 at a time when such things cost around $1k. It was amazing. I was hooked. I started to learn about image editing on a computer. A couple of years later I had been with Panasonic 10 years and had the opportunity to select a product to a certain dollar value as my bonus for still being there. I chose a DMC-LC40 digital camera and I was in love. Three times zoom, four megapixels (I only ever used two) and a very, very nice lens.

Both of my Panasonic cameras are still going strong, and the old 4 megapixel LC40 still takes a wonderful photo with none of the shutter lag exhibited by its contemporaries or many more recent competitors. A couple of years ago I bought a Nokia 6288 mobile phone, and it has a 2 megapixel digital camera built in. The lens is awful, but when it’s always in my pocket, it’s a useful thing to have around.

Time has moved on and I have been thinking of looking for a new digital camera. Ideally, I want all of the features of the current crop of Digital SLRs, but I’d like something compact enough to slip into a pocket or a camelback or similar.

A couple of weeks ago I was exchanging emails with my Dad. He was buying a new DSLR and managed to snare himself a shiny new Canon 50D. I quizzed him about DSLR features and mentioned that one day I’d like to get either a new DSLR or a fancy compact camera. Dad mentioned that having bought the new Canon, he no longer needed his old Canon and would I have a use for it?

Is the Pope Catholic? Do bears shit in the woods? Are Kennedies gun-shy?

So this week, a large box arrived. Inside was a sturdy, nondescript backpack. Inside the backpack was a Canon 300D DSLR with an 18~55mm Canon lens, a 75~300mm Canon lens, a macro lens, a 420EX speedlite and a bunch of batteries, CF cards, cables and software.

Wow.

From my limited and very excited testing, it all works perfectly. The 300D is old hat by 2008 standards with just over 6 megapixels and data transfer via USB1, but it’s a ‘proper’ camera with every tweakable tweak a photographer might ask for and the ability to be used very manually or very automatically with every shade in between. And it’s an SLR! You get to use a real viewfinder to see what you’re really shooting!

So it won’t fit in my Camelback. Darn.

Thanks Dad.

Bike lights and longevity

November 6th, 2008 Posted in Bikes | 1 Comment »

Way back in the distant past of perhaps 2005, I made myself a pretty good L.E.D. based light for night time cycling. I wrote up what I did and put it on the web: http://michaelcarden.net/luxeon/luxeon3.php

Since then I have received the occasional email from someone wanting to make something similar, but I have mostly forgotten that light, having moved on to newer, brighter and better designed home made lights.

So I was surprised today to receive an email purporting to be from someone at http://www.instructables.com/ telling me that my old light had been featured at http://bikehacks.com/5-killer-looking-diy-bike-headlights/111/. I took a look at bikehacks and was delighted to see my old light being described as being reminiscent of a Stormtrooper. Cool.

All of which just reminds me of how stuff you cast out on the internet is likely to hang around for quite some time and draw attention long after you had considered it gone and forgotten.

I probably should get around to putting up a build guide for my current Home Made Lights Of Awesomeness. I’m into ‘no lights needed’ season now, but the hub powered lights are still on the bike, and with no off switch, blaze away through all of my daylight commute. They get quite a bit of attention.

Two Cree X-LEDs with a hub dynamo to run them so I never have to think about batteries and a nice super capacitor to give me light from one of the Crees when I’m stopped. Commuter light Nirvana.