About   |   Projects   |   Elsewhere   |   Work   |   Feeds   |   Contact

Archive for May 2009

links for 2009-05-28

29 May 2009

Links

No comments yet

links for 2009-05-26

27 May 2009

Links

No comments yet

links for 2009-05-24

25 May 2009

Links

No comments yet

Howduino and panda hacking

3556669644_7e72ed13e0.jpg
I spent yesterday in Liverpool at Howduino – billed as a “one day event about connecting the internet to the real world, breathing life into inanimate objects and creating new ways to interact with things”, it took place at FACT (somewhere that’s worthy of a blog post in itself).

Imagine a room full of geeks, artists and hackers who’d been let loose with soldering irons and toys, and then throw in the capabilities of Arduino boards. The end results ranged from painting with bristlebots through to circuit-bent Furbies.

I took my panda along, together with a box of analogue meters. Ebay is a fantastic source of that kind of retro kit, and I’ve picked up several moving-needle meters from the late 50s for less than a tenner each. The main plan, though, was to fit an old aircraft fuel-flow meter into the panda so he could display trends and changes in an easier-to-visualise way than the LEDs.

The meter itself is just a basic voltmeter with a dial calibrated from 0 to 800 lbs per hour – presumably it came out of some kind of jet, although I’m not sure how big an engine that would imply. There’s an XLR-style bayonet connection on the back, but I drilled two holes into the back of the case and soldered flyleads onto the internal terminals to make things easier. Then the panda got hacked open, and the meter was hot-glued into the wound.

Actually getting it to work was a bit of a challenge, however. The first problem is that the meter is *incredibly* sensitive – full-scale deflection takes less than 0.5 volts. The Arduino’s analogue outputs range from 0 to 5V, so I had to connect the Arduino output to a voltage divider (having first tried to figure out the right resistor values with a rotary potentiometer.) The PWM output from the Arduino runs from 0 (off) to 1023 (full on) with the duty cycle ranging roughly linearly between the two, so it’s just a case of adjusting the deflection to full-scale at 1023, and the rest falls into place.

The biggest problem, though, was with the Arduino itself. I’ve got a Ethernet shield which fits on top of the main board, and had that linked to an old ADSL router with a 4-port hub. Getting to the outside world took longer than I could be bothered with tinkering, so I ended up running a server locally on my Mac with MAMP to give the Arduino something to talk to.

Getting it talking needs the Ethernet library, and that’s buggy. It would connect fine the first time, but then crashed immediately you tried to establish a second connection. Adrian McEwan (who organised the whole thing) pointed me in the direction of a patched version, but I didn’t R the FM closely enough and only installed the library file. You actually have to remove the (old) compiled version as well – once I’d figured that out, the code started to function as it was supposed to.

The Arduino sketch establishes a connection to a server and grabs an XML file using the Ethernet methods. That then gets parsed using the unfeasibly low-tech string library and finally converts the XML value into a PWM value which controls the duty cycle of the analogue output. Because of the inertia of the needle, the pulses are smoothed out and the display reads steady.

The XML file could come from virtually anywhere – Pachube for example – but I’ve got a few Ruby scripts running on one of my servers that does some manipulation before creating the final values as XML. The challenge now is going to be the data source – and ideally something with a range from 0 to 800, and units of pounds per hour. Any suggestions?

24 May 2009

Play

2 comments

links for 2009-05-23

24 May 2009

Links

No comments yet

links for 2009-05-22

23 May 2009

Links

No comments yet

links for 2009-05-21

  • The ruby-nxt library lets you control the LEGO Mindstorms NXT robotics kit via Bluetooth using the Ruby language.

    There are three interfaces:

    * High-Level: The NXT class provides multi-threaded, object-oriented interface to the motors, sensors, and most other core NXT functions.
    * NEW High-Level: The Commands module (included with NXTComm) provides a command object-based interface very similar to the Blocks in NXT-G. (this may replace the NXT class in the future)
    * Low-Level: The NXTComm class provides direct access to the NXT Bluetooth bytecode protocol. There is also the UltrasonicComm class which implements the I2C communications needed to interact with the ultrasonic sensor (via NXTComm).

    ruby-nxt requires the ruby-serialport library which you must manually download and install from: rubyforge.org/projects/ruby-serialport

22 May 2009

Links

No comments yet

links for 2009-05-15

16 May 2009

Links

No comments yet

National Express miss the Cluetrain

<crossposted from the Headshift blog>

I’m a regular rail traveller on the East Coast Main Line, so when news of “innovative customer management technology” being deployed by operator National Express arrived in my inbox, I had to take a look.

According to the press-release-masquerading-as-a-news-article in Computing magazine,

“Maintaining passenger loyalty while reducing operational costs has become an urgent priority…

…Consequently National Express is introducing an innovative text message analysis service. the new system captures passenger feedback by SMS, providing executives with a realtime view of company performance and service requirements.”

The idea is that you send a text message to a shortcode number moaning about the overflowing toilets, and something happens. Somewhere. Maybe.

Or then again, it might not.

Cue wavy lines, as we’re transported back to 1995.

It’s easy to be snarky – National Express East Coast are facing real problems after they massively overbid for the privilege of running the service, and passenger numbers have gone through the floor as a result of the recession.   So they definitely need to do something to improve their customer service, stem the losses, and avoid the humiliation of handing back what’s regarded as Britain’s premier rail route.

But this is such a classically “dumb management” idea it deserves to be called out – NXEC seem to have missed out on the last few years and the idea that THEY need to go where their customers are, and not the other way around.

One of the best things about NXEC’s service is their on-board wifi service – it’s got wrinkles, but being able to get online onboard is (still) a real value-add.   Which should have perhaps given NXEC a clue as to where they needed to be concentrating their efforts.

When things go wrong, their customers are online. They’re blogging about their journey from hell, or Twittering, or updating their Facebook statuses.   They’re having conversations – not with the company, but with their networks of friends and aquaintences. And they’re having those conversations outside of NXEC’s area of influence – not texting faceless automatic systems.

So it’s not about the technology, although that’s a dumb choice. It’s about the approach itself – NXEC seem to be stuck in a peculiarly 20th century mindset that hasn’t realised that their customers are everywhere that the company is not.

In the spirit of offering some criticism that’s at least trying to be constructive, here’s a few things that NXEC could be doing.   They could be monitoring Twitter for mentions about their service, and tweeting back with information and updates. They could be active on Facebook, offering apologies and explanations when they find tales of woe.   And they could offer something other than a faceless “email us” link on their website (and for that matter, they could offer a website that plays nicely with mobiles and loads quickly enough to be useful with 3G dongles.)

I’m going to hazard a guess that all of these would be cheaper – and far more effective in the long run – than the “investment” which has been thrown at SMS.   After all, a copy of the Cluetrain manifesto runs to £5 on Amazon, so it’s not like these ideas are hard to come by.

14 May 2009

Change

No comments yet

links for 2009-05-10

11 May 2009

Links

No comments yet