Summer Paws by Tom Royal on Flickr
Hi, Robot by Tom Royal on Flickr
The Strip by Tom Royal on Flickr
Public Transportation by Tom Royal on Flickr
Vice City by Tom Royal on Flickr
Show by Tom Royal on Flickr
Bellagio by Tom Royal on Flickr

You're using a very old version of Internet Explorer which can't show the photos that should be in this box. Please consider upgrading to a newer version of IE or an alternative such as Firefox. Thanks.

Lewisham East Candidate Expenses

July 20th, 2010

You've probably seen Channel 4's report on campaigning expenses, and Zac Goldsmith's rather bizarre attempt to ignore every rule of media training in addressing the allegations made against his campaign. In any case, once he did finally turn to the matter at hand, one of Mr Goldsmith's key arguments seems to be that the methods he used in his campaign – apportioning a percentage of costs for signs bearing his name and face to council elections, for example – are standard and have been used across the country. At the very end of the interview he even notes, of the Electoral Commission:

"Or they'll look at it and find something wrong. In which case, we'll need a repeat general election, because the rules that I adhered to are the same as the rules for other MPs".

This doesn't entirely make sense – as if he has adhered to the rules there'll be nothing for the commission to rule against – but the point's clear. Apparently every MP out there has been apportioning some costs off to local elections, leaving their short campaign expenses within the limits.

Only one way to find out, then.

As Mr Goldsmith claimed to have taken advice from Conservative Central Office, I figured it was worth checking the Short Campaign expenses of our local Conservative candidate, Jonathan Clamp. And, just to see if the other parties might be up doing the same sort of thing, I also checked the records for his opponent – Labour candidate, and now MP, Heidi Alexander.

The Short Campaign expenses limit in Lewisham East for the General Election 2010 was £7,150 plus 5p per elector. I took the electorate figure of 64,880 from the Lewisham council website, making this £10,394.40. Interestingly both candidates had worked to different figures, based on different numbers of voters, but not by much – we all believed the limit to be around £10,400 to £10,600. So, what did they spend?

Jonathan Clamp

In Mr Clamp's case, it's all rather simple. His expenses were neatly tallied up with receipts, and having spent around £400 on advertising and £7225 on direct mail his total was barely above £8,000. Should anyone wish to check I've created a PDF of his short campaign expenses here – note that I've redacted his home address from the one document where it appears. There are a few costs on the print receipts not included in the Short Campaign tally, but those were all accounted for in his Long Campaign expenses (examined, but not reproduced here). So far, so good.

Heidi Alexander

It might be argued that, as a third candidate in what is largely a two-horse race between Labour and the Lib Dems, Mr Clamp had little incentive to really push his campaign as hard as possible. So, I checked Heidi Alexander's expenses also. Again, I've created a PDF of the short-run receipts, which you can download here. I've redacted Ms Alexander's home address, her website username and a few bank account details from some receipts, and skipped the inside pages of BT phone bills.

These are rather more tricky to check, with hand-written documents and more receipts. The summary page lists a total spend of just under £6,000 – even less than Mr Clamp – although looking at the Spending Breakdown you can see that many items are marked with an "amount paid" significantly greater than the "value of item" that was included in this total.

In some cases this disparity makes sense, as for example it appears that £200 of a £400 sum paid for balloon gas was a deposit, but it's not always as clear. Nonetheless, assuming the worst case scenario – that the entire Amount Paid should have been accounted for in every case – the total expended works out at £9190.03, which is still some way below the maximum.

And that's it – a lot of ink and a few badly photocopied receipts, but not much else. I look forward to seeing what the people checking other constituencies come up with, not to mention what the Electoral Commission decides with regard to Mr Goldsmith's signs.

Ralph Cat is a Genius

July 15th, 2010

Ralph

Photo: Ralph, with coursework. But not his coursework, obviously.

A University Degree is a funny thing – a bit of paper that can, under some circumstances, make a difference to both one's credibility and one's bank account. But then all degrees – not to mention doctorates – are not created equal. Specifically, some are granted by accredited institutions.

In the UK, the Education Reform Act of 1988 (section 214, here) dictates which institutions can legally grant a degree, and makes it an offence for an unaccredited institution to do so. In the United States and many other territories there is no such law. This means that you can, for a fee, acquire all manner of interesting qualifications that might be said to overstate one's professional or academic achievements.

And so to Ralph.

Ralph H Cat, Esq, is a clever cat. He can, for example, open doors by hanging from the handle. Some might think this qualifies him for a degree, and as it turns out there are institutions that agree. Armed with his very own Gmail address, a fake address in Central London, a phone number (Ofcom handily provides dummy numbers for dramatic use) and a date of birth (his real age converted to human years with this chart) he set about obtaining his High School  Diploma – after all, you have to start somewhere.

The institution in question – carefully chosen by clicking a Google advert that appears when you search for "buy degree" – issues "life experience" degrees so applicants can "Receive a College Degree for What You Already Know". This makes the application process rather less strenuous than the one I had to go through via UCAS. The applicant is asked to "Briefly type the work or life experience that qualifies you for this degree."

Here's Ralph's life experience, as submitted for consideration:

"Since leaving home I have spent the last three years looking after my brother, Hunter, who has limited mental capabilities and requires regular assistance with everyday tasks. We share an apartment together. Besides looking after him, I have a keen interest in food and sports – particularly soccer. I am also a keen hunter, although with limited opportunities to get out of the apartment (it's hard to leave Hunter) this hobby is tricky to pursue."

Naturally, as Ralph is a Good Cat, it is all true. He did leave home (in a cat carrier) and lives with Hunter, who isn't terribly bright (he tries to hunt snowflakes) and does indeed need help with many cat-like tasks. They do share (our) apartment. Ralph loves watching football, or pretty much anything on TV, and hunts wasps, flies and other insects. In short, Ralph has lived a fairly average life as a London housecat. He has not, however, learned anything to merit a High School Diploma.

Nonetheless, within 24 hours – success! Ralph not only qualified, but was also offered a place on a scholarship programme, giving him a discount on the, er, "programme" fees. Here's the confirmation, as presented by the website (click for full size):

Which is lovely, and makes me terribly proud. But although it was tempting to pay $203 and get this qualification, as a pushy parent I couldn't help but hold greater aspirations for my furball. So I applied again, but this time for something a little trickier: a Bachelor's Degree in Social and Behavioural Sciences, Cum Laude. The application form had conveniently saved Ralph's CV, so it took a matter of seconds. And lo, just a few minutes later (again, click for full size):

I have to admit to being slightly sceptical – after all, surely no degree can be granted in less than five minutes based on a one paragraph life story. Perhaps this was an unfortunate system glitch? Fortunately the online chat tool was there to set my mind at ease:

All Ralph now has to do is pay $499, either by credit card or by cheque via what appears to be a mail forwarding address in Santa Monica, and he'll have a BSc. What a clever kitty!

As tempting as it is to get Ralph's name up in lights on the Wikipedia page "List of animals with fraudulent diplomas", though, I don't think I'll be writing off the best part of £350 for a worthless qualification. After all, Ralph is unlikely to ever apply for a job other than as my housecat and moth-slayer extraordinaire, and I know he's a smart cookie. And in any case, he's decided to take a Gap Year to go travelling first – he's even found a rucksac.

Please note that I haven't named or linked the institution in question here, either – partly because I don't have the time to fend off lawyers should it become litigate-y, and partly because even the most cursory glance at its website is enough to tell anyone that it's nonsense. One US Government website names it as a diploma mill that is suspected to operate from the UAE.

I really write like..

July 14th, 2010

If you've ventured into Twitter lately the chances are you've seen messages about I Write Like -  an amusing little website that analyses your writing and tells you which notable author comes closest in style.

Well, I've fixed it. Here's my more accurate version.

Mousebot, Part Three: Motors

July 9th, 2010

Armed with some plans and a bunch of miscellaneous parts, the first big challenge is to get Mousebot moving.

The obvious answer would be to hook up two small DC motors to the Arduino's digital output pins, then simply set those to HIGH to move it forward and LOW to stop. This has a couple of problems, though: there would be no way to reverse the motors, and so no way to steer the Mousebot, and the Arduino can't supply much current, so attempting this would probably destroy it.

So there are two problems to solve: how to run the motors from a separate power supply, merely switching it from the Arduino, and how to rig the motors so that current can be supplied in both directions.

Isolating the motor power

In principle, isolating the motor's power supply and switching it from the Arduino should be pretty easy. A transistor can be used as a kind of switch, and I had a few of those to hand, so after checking out which pin is which (thanks, internet) I connected one up like this (excuse the dodgy diagram):

So far so good – when the Arduino digital pin goes high the LED lights, and nothing catches fire. Stick a motor in there instead of the LED and resistor and it should go and stop on command. But how on earth to control the motor in both directions? This turned out to be a bit fiddlier.

Two way control

A look on the web tells me that, in order to control a motor in both directions, you need something called an H Bridge. It's a simple concept – something like this:

Close switches 1 and 4 and the motor runs one way, or chose 3 and 2 and it runs the other way. Substitute four transistors for the four switches, rig them to Arduino outputs and I'd have two way control from the 3V supply. But then I need to control two motors independently, so that'd take eight transistors, eight outputs. That's going to take quite a bit of breadboard.

Buying it in

One way around the effort of making two H-bridges is to buy them: you can get several bridge-on-a-chip components that include the entire thing, ready to solder. The problem is that most are designed to handle motors that take at least five volts – mine only require 1.5 to 3v. Eventually, however, I came across this: the Pololu Micro Dual Serial Motor Controller.

Everything you need to know about this little chip is in the name. It's tiny, it controls two motors and it connects via Serial. Sold. I grabbed one, picked up a second identical motor (Maplin WC68) and started to connect the whole lot up. To connect to an Arduino Duemilanove, I used (pins numbered left to right when the component-side of the board is facing you):

1) Motor +ve (3v, for me)

2) Ground (common: connect Arduino ground and 3v battery -ve)

3) Arduino +5v

4) Serial – I used Arduino pin 3

5) Reset – Arduino pin 2

6 and 7) Motor one. I also connected a .1F capacitor across these

8 and 9) Motor two – again, with capacitor

Note that I used pin 3 for the serial transmission, which is not the Arduino's serial out pin (that's 1) – I had difficulty getting it to work with the standard Arduino serial.write command, so used the SoftwareSerial command to send serial over pin 3, but you could use any digital pin. The resulting mess looks a bit like this:

Once it's all connected, you need to program the Arduino.

Coding it up

Programing the Pololu isn't tricky, but does require a little preparation. The key is to reset it (pin 3 low, wait, high, wait while it initialises) then send four-byte commands. I found it far easier to use softSerial.print() rather than serial.write(), which seemed to generate surprisingly erratic results, hence using pin 3. Here's my test code: each motor is run for two seconds, in turn:

#include <SoftwareSerial.h>
#define rxPin 4
#define txPin 3
SoftwareSerial softSerial =  SoftwareSerial(rxPin, txPin);
int resetPin =  2;

void setup() {
pinMode(rxPin, INPUT);
digitalWrite(txPin, HIGH);
pinMode(txPin, OUTPUT);
softSerial.begin(9600);
pinMode(resetPin, OUTPUT);
digitalWrite(resetPin, LOW);
delay(1000);
digitalWrite(resetPin, HIGH);
delay(1000);
}

void loop() {
// motor 1
softSerial.print(0×80,BYTE); //start command
softSerial.print(0×00,BYTE); //sets device type
softSerial.print(0×03,BYTE); //set motor and direction (0,1,2,3)
softSerial.print(0x7F,BYTE); //full speed
//  stop
delay(2000);
softSerial.print(0×80,BYTE); //start command
softSerial.print(0×00,BYTE); //sets device type
softSerial.print(0×03,BYTE); //
softSerial.print(0×00,BYTE); //stop
delay(2000);
// motor 2
softSerial.print(0×80,BYTE); //start command
softSerial.print(0×00,BYTE); //sets device type
softSerial.print(0×00,BYTE); //set motor and direction (0,1,2,3)
softSerial.print(0x7F,BYTE); //full speed
//  stop
delay(2000);
softSerial.print(0×80,BYTE); //start command
softSerial.print(0×00,BYTE); //sets device type
softSerial.print(0×00,BYTE); //
softSerial.print(0×00,BYTE); //stop
delay(2000);
}

Next steps will be to tidy this up into a more usable set of commands, work out how to sense from the microswitches and actually fit the motors onto some sort of chassis.

Hunter vs Water

July 5th, 2010

Following the limited success of his winter campaign against snow (video here), Hunter today opened a new front in the war on H2O.