Chumby vs. DMX

Chumby One displaying a pong-style clock I just got my Chumby One about a week ago – finally. After playing around with this neat little internet-alarm_clock-widget-radio-player for a while – testing loads of different (sometimes crazy or useless) widgets – I wanted to try out something new.

One of the really great things about the Chumby is, that it’s completely “open source”. You can even get the schematics and the PCB-Layout for the whole hardware.

Needless to say that the Chumby runs Linux on its ARM-Processor and all the sources are available (here).

Let’s play

cheap RGB-PARAs already told, the idea was to do funny things with that awesome device. Some time ago I bought one of those cheaper RGB-PAR56 lights (about 30 Euros). It contains various LEDs of the three primary additive colours Red, Green and Blue. These are used to mix some of the theoretically existing colours by controlling the light intensity of each of the three colours.

The spot can be controlled according to the well-known DMX512-standard. At that time the method of choice to interface it was a USB <=> DMX converter (called uDMX), which I found here.

The uDMX hardware is quite simple – everything is built around an ATMEL AVR-microcontroller, which is also handling the usb part (low speed usb-device emulated in software).

Let’s be very clear — no one needs the Chumby One, nor does it close any great gap in your tech life — but it offers enough information and functionality in one small, portable, cordless place to justify the modest price of admission. (engadget review)

The controller firmware for uDMX Mod comes with the source-code for a small command-line tool to rudimentary control it without using one of the many advanced DMX-control programmes available.
The tool uses libusb, which fortunately is also readily available on the Chumby (source-code to be found here for FW 1.0.2430/2370: http://files.chumby.com/source/falconwing/build2370/libusb-0.1.12.tar.gz).

So, all you need to do to control the spot using a Chumby is cross compile that small control tool for the chumby. ;)

Preparations

First the corresponding GNU Toolchain has to be installed as described in the Chumby Wiki.

In order to link the tool against libusb, the library has to be available on the machine building the uDMX-tool. So the next step is getting the libusb-sources for the current Chumby-firmware here and building it.

So after unpacking the downloaded file, the next thing to do is

]$ cd whereever_you_put_libusb/libusb-version
libusb-0.1.12]$ ./configure --build=i686-linux --host=arm-linux --prefix=`pwd`/install
libusb-0.1.12]$ make
libusb-0.1.12]$ make install

These steps should result in a sub-folder called “install”, containing the following:

libusb-0.1.12]$ ls install/*
install/bin:
libusb-config

install/include:
usb.h  usbpp.h

install/lib:
libusb-0.1.so.4  libusb-0.1.so.4.4.4  libusb.a  libusb.la  libusbpp-0.1.so.4  libusbpp-0.1.so.4.4.4  libusbpp.a  libusbpp.la  libusbpp.so  libusb.so  pkgconfig

uDMX

Now that libusb is prepared, it is time to build the command line tool. As mentioned earlier the source-code comes with the firmware for uDMX Mod (to be found here).

After unpacking, the subfolder sources/commandline contains the wanted files.

In order to build the binary for Chumby’s ARM the Makefile has to be modified a bit.
The line that specifies the compiler to be used has to be changed to:

CC              = arm-linux-gcc

Then we have to tell the compiler where to find the headerfiles for libusb (the path behind the “-I” should point to the location of usb.h):

CFLAGS          = `$(LIBUSB_CONFIG) --cflags` -O -Wall -I /whereever_you_put_libusb/libusb-0.1.12/install/include

Finally we need the linker to know the location of the built libusb:

LIBS            = -L/whereever_you_put_libusb/libusb-0.1.12/install/lib -lusb

Now we can save the Makefile and run a decent

commandline]$ make

to get the uDMX binary:

commandline]$ ls
Makefile  uDMX  uDMX.c  uDMX.o

And that’s it.

The uDMX-binary can now be copied to the Chumby (e.g. using scp, or by putting it an a USB flashdrive).
To test the setup connect the uDMX to the Chumby’s USB-port and connect it to a DMX device.

Then calling

chumby:/mnt/storage/ml# ./uDMX 0 255 255 255

on the Chumby (ssh or on a local keyboard) will set DMX-channels 0, 1 and 2 to 255 (or 0xFF).

Use

Apart from the fun factor the described setup actually can be useful.
Even if you are no flash developer (I am none), who creates his own widget to control the DMX-adaptor, you can use a feature of Chumby’s alarm software to easily switch on the light when Chumby tries to wake you up.
The Chumby Wiki describes an easy way to run a custom script when an alarm starts.

You could also use cron on the Chumby to do whatever you like with your DMX device at any time.

References

  1. Chumby One review at engadget http://www.engadget.com/2009/11/13/chumby-one-review/
  2. official Chumby website http://www.chumby.com/
  3. Chumby Sourcecode http://files.chumby.com/source/
  4. uDMX Mod http://lutz.in.hagen.de/cms/index.php/projekte/udmx-mod/udmx-mod/menu-id-31.html
  5. GNU Toolchain for Chumby http://wiki.chumby.com/mediawiki/index.php/GNU_Toolchain
  6. Custom alarm options http://wiki.chumby.com/mediawiki/index.php/Chumby_tricks#Custom_alarm_actions
  1. No comments yet.
(will not be published)
  1. No trackbacks yet.

Switch to our mobile site