Larry the Lobster: larynx transplant

Watch on YouTube for HD!

Prototyping underway

Prototyping underway!

Intro

The mbed launched with the famous billy bass demo, but with the launch of the new RS Animatronic Lab Board (RS part number 754-1965), it was thought that giving another rubber-aquatic irritant a better singing voice would be fitting. Larry may have been gutted, but he can dance as well as before, and sing like ...an actual music player... The conversion was not that difficult, and should be acheivable in an afternoon provided one has some semblance of the right tools (side cutters and a screw driver (and maybe a way of joining more wire on to make the thing easier to service)). Larry could now have his software modified to do anything! The world is your lobster!

Hardware

/media/uploads/p07gbar/lobster_l.png

The Lobster was taken apart and the motor connections (ones going into the actual lobster bit) were cut and terminated with some small screw terminals. These were easily connected to with wires connected into the RS Animatronic Lab Board. The AudioCODEC (RS part number: 754-1974) is used for playing any audio which goes along with the routine, this is fed to a simple power amplifier (from maplin: here) for the speaker. The built in switch could also be wired between GND and nR on the mbed, allowing it to be reset (this causes the device to start playing again), however this was found to cause frequent resetting, as the switch triggers when the lobster moves. The connections were made as demonstrated in the diagram.

Software

The software makes use of the WavPlayer library:

Import libraryWavPlayer

A library which allows the playing of Wav files using the TLV320

An action cue and parser was constructed to allow sequences to be easily constructed and changed without a re-compile. This configuration file can be on the mbed or the USB drive, depending on where you specify in the code. This allows one to very quickly tinker with a routine.

The text file defines a series of actions which are specifically non-blocking. Here is an example file:

0.1 DEBG 0 0
0.5 LED1 1 0
1   LED1 0 0
1.5 LED1 1 0
2   LED1 0 0

This file makes the program print a "debug" message over the serial port at 0.1 seconds after the program starts, it then makes LED1 turn on at 0.5 seconds, off at 1, on at 1.5 and off again at 2. The format is as so:

[time/s] [action code/4 chars] [actions integer] [actions float]

Import programRSALB_lobster

Lobster controller program

Generally I hope this program might allow people to build action/event triggers easily: the action cue class is very abstract and gives a simple circular buffer (with circular sorting!).

The routine

Of course, Larry had to dance, having made a full recovery from his (rather extreme) operation. To test out his larynx, his old song was spliced together with a lovely recording of "I Dreamed a Dream" from the musical Les Miserables by SoundCloud user user387859 and a recording of someone clearing their throat by Mike Koenig. This was mixed in Audacity (a brilliant open source audio program). The song was manually choreographed into lobsterese and put on the mbed's local filesystem.

To replicate the routine This file needs to go on a flash drive (later to be plugged into the mbed), and this file needs to be put on the local filesystem.


1 comment on Larry the Lobster: larynx transplant:

26 Sep 2012

Nice project, well done.

Please log in to post comments.