Posts in Category: hardware

Lasers and MIDI and software… Oh my!

Photo of Jean-Michelle Jarre performing in Helsinki in 2009 © Miemo Penttinen

What happens when a music teacher suggests instrument variety is a driving force behind a child enjoying music, the child says “anything unusual” is good, the other child wants a techie project and the father has far too much 80’s electronica ?

We decide to get a laser harp, of course ! 🙂

And there’s no way at all this could have been due to my obsessive saving of paper-round money to buy Jarre albums on tape to listen to on my Walkman (with Dolby-B, I’ll have you know – quality antiquity !).

A quick Google later and it’s apparent that commercial units run from €500 to £1000 as ‘entry level units’. So that’s not happening. The Wikipedia page does an excellent job of sucking almost all of the fun out of the description, and doesn’t help much (apart from providing a link to the excellent photo by Miemo Penttinen).

There’s a Makezine article by Steve Hobley that is interesting as it includes pitch bend although the harp is framed and uses multiple lasers, but this Instructables article is closer to what I had in mind as it describes (with source) how to create a single laser scanning frameless/infinite harp.

So given that I can’t resist changing stuff I know nothing about, is that $100 estimate what I need to spend ? Well, I have breadboard, an mBed plus application board and soldering kit already. I’m not interested in 5-pin MIDI (plan on using USB MIDI via the application board), and there’s no way I want to have 3 separate PSU’s – I’ll contemplate step-down convertors but it must be a single rail main supply. So time to hit eBay to see what’s there at hobby prices. And the first find is that 10 red 1mW laser diodes cost less than £3 inc. P&P from China… Wow… This might just work.

An afternoon talking this over with Ben, and my initial BoM is as follows:

Item Link Cost
5v 4 phase stepper motor + controller £3.59
10 x 11mm acrylic mirrors £1.65
Laser receiver module £2.99
Laser diode module £3.49
5v 2A DC PSU £3.99
2.1mm DC socket with leads £1.19

Current spend: £16.90 – I could have spent less (or had more spare parts) if I’d have bought direct from China, but given that I a) need to keep the kids attention and b) am way too impatient when being given the chance to play with spinning mirrors and lasers, the above items are all from UK (re)sellers.

Potential pitfalls:

  • no fogging gear so viewing the beams may be tricky
  • low power laser may have high false triggers is the sensor gain is too high
  • no idea if the mBed timing is accurate enough
  • the 5v supply may not have enough current (no idea of the stepper consumption
  • still need to write the mBed software !

Although the pitfalls haven’t made me stop thinking about v2:

  • use green + red lasers to mark out a full tone/semi-tone scale
  • use green + red lasers for an effect/note split
  • put a carrier wave onto the laser and use a doppler detection routine at the sensor to offer pitch bend
  • make the MIDI output via WiFi to link into an iPhone/iPad as sound source for a portable version

Delivery of parts is expected this week, so project updates and pics of parts to follow…

LED cycle lights

First pass 12V lighting system for my bike: front is a 15W 3 LED DRL cluster, and the rear is four strips of silicon dipped 12V LED’s with a common 12V 3Ah battery pack under the saddle.

Things still to do: improve the wiring so it’s waterproof (!) and also find out how long the battery pack lasts, as well as investigating the white LED strips for front running lights (town visibility, rather than out-of-town road coverage).

I’m also seriously considering removing a rear strip, or making the centre two run off a 1Hz flash circuit, as a quick test last night showed that the front was about the same as my 270lm Cree, but with a better edge-to-edge falloff whilst the rear was getting on for car fog light brightness, which is a little more anti-social than I was aiming for.



PogoPlug and pkgsrc MySQL server

For the most part, I’ve had no real issues building pkgsrc on my PogoPlug, but all three variants of MySQL server failed to build due to a conflicting type declaration error. For the 2011Q2 branch of pkgsrc and the mysql55-server package, simply comment out the offending line 169 in sql/ so that it reads:

#ifdef HAVE_FP_EXCEPT // Fix type conflict
//typedef fp_except fp_except_t;

PogoPlug, FreeBSD (kirkwood) and pkgsrc

Having bought an end-of-line v2 (pink) PogoPlug, I ignored all the setup guides (of course !) and reflashed the stock u-Boot image with Jeff Doozan’s version. After the obligatory messing with Linux (both ArchLinux and Debian) and discovering that the all-singing, all-dancing setups simply don’t work at all for me (the multi-hundred line shell script for debootstrap simply can’t cope with armel as both host and target), I switched to a real OS and had fun with a CF card and Nicole’s Kirkwood FreeBSD pages.

Of course, the first USB2<>SATA enclosure I used would mount but not boot (grr…) and it took a while to figure out how to get the FreeBSD 8.2 Kirkwood image onto a bigger than 2GB drive (hint: use an existing FreeBSD system and vnconfig), but once I’d used sysinstall on an existing x86 FreeBSD system and also discovered the joys of tunefs -L I had a nice shiny 320GB FreeBSD 1.2GHZ ARM system.

Now for pkgsrc: using the 2011Q2 stable tarball, it was still a bit of a PITA as perl kept dying on me with a SIGABRT, but the key for perl is to put CFLAGS+= -fno-stack-protector into the file inside lang/perl5 and then miniperl won’t keep dying.

I’ve not had any luck with mysql55-server at all, but to get mysql55-client to stop sulking you will need to add two symlinks into the lib directory within work/.dist when it complains. After that, the bmake package command runs to completion.

Not yet got a full setup running with enough features to properly thrash the system, but it’s been happily building multiple packages simultaneously with a load over over 4 without any hiccups, and write speed to the USB2 doesn’t appear to be as much of a gating issue as I had worried it might be, so hopefully my websites will be much lower power in a couple of weeks time.

Buffalo LinkStation cheap serial port

After plenty of frustration trying to upgrade my LinkStation box to a newer version of Debian, I gave up and tried Gentoo as per the nas-central guide, and discovered just how friendly and cuddly apt-get can be… Whilst I have used Gentoo from source on my Qube, trying to do anything with pre-built stage3 tarballs is a royal PITA when the portage EAPI has changed.

As all I wanted was a simple ARM box, I decided it was time for something less complex: Linux from Scratch, but to avoid having to pull the hard drive each time I made a boot config error, I though it would be useful to add a serial port using another nas-central guide and a Nokia 7250i DKU-5 USB data cable from eBay, for a whopping £1.49 (inc. P&P).

My cable was a five wire that required power from the box, so it was a little worrying having to solder things in place without fully testing the data transmission, but for anyone wanting wire colour confirmation:

    Orange: not used
    Green: +ve
    White: Rx
    Blue: Tx
    Black: GND

It also required the insulation shaving carefully on two sides before it would fit through the Kensington lock hole, but after that and with the addition of a cable tie it fits quite neatly.

Some bodged soldering later, it was in, but refusing to work on OS X even though there was a /dev/ttys000 entry created as soon as the cable was plugged in. Some Googleing later and this page provided the driver I needed – after that it was a simple screen /dev/tty.usbserial 115200 and everything was in place.