Introduction: Raspberry Pi DMX Controller and Pure Data: an Animated Flame Art Installation

Having wanted to work with a Raspberry Pi since they came out, it was very exciting when a friend Jean Margret Thomas asked me to help her with a light sculpture that she wanted to create. Jean Margret is a lighting designer and her design called for a Raspberry Pi to run 3 DMX lights. I played a small roll in this project getting the Raspberry Pi to control the lighting.

I'm not at all familiar or efficient with Linux, because of that I did make some large mistakes that this tutorial will hopefully help you avoid.

We knew from the beginning that we were trying to drive a USB DMX Device to control a dimmer pack thus creating animation using lights. The above diagram shows how that is completed on the hardware side. Choosing the right os builds and software for the Raspberry Pi is possibly the most important step.

Step 1: OS and USB DMX Contrller

One very important thing to consider is that there are several different USB DMX controllers that can be used to create a DMX Lighting system using Raspberry Pi. Two of the most readily available are the Entec USB DMX Pro or the OpenDMX USB. You could just as well use the ultraDMX PRO too. Having worked with the first two it is important to make sure that the Raspberry Pi OS that you load is compatible with the hardware.

For instance if you want to run the OpenDMX USB you will need to download the OpenLightingArchitecture OS for Raspberry PI here.The ultra also appears to be functional with the OpenLightingArchitecture OS even though I have not used it. The ultra has many more outputs and could be quite useful if used for such a project.

So before you start setting up you RASPI make sure that you double check the needs of your DMX Controller. Here are some other helpful links!

https://www.raspberrypi.org/forums/viewtopic.php?f...

http://llg.cubic.org/dmx4linux/

https://www.openlighting.org/

Step 2: Programing Software

There are tons of different lighting software and programing environments that can get you going on a DMX system for Raspberry Pi.

https://www.instructables.com/id/Raspberry-Pi-as-a-...

http://store.raspberrypi.com/projects/lightput_025

http://www.jonshouse.co.uk/rpidmx512.cgi

qlcplus

That said I chose to use Pure Data (PD.) It is a break off of the MAX/MSP programming platform developed by Miller Pucket. The software is completely Open source and capable of creating digital synthesizers, computer vision systems and generative graphics as well as DMX Lighting. Instructions for compiling PD are available here. Further installation options for PD on Raspi are here.

Controlling DMXUSB Pro via PD

Here is an article that was very helpful for getting PD controlling the Entec DMX USB Pro. Adding the external for the dmxusbpro object can be a bit difficult this tutorial allows you to control the device over serial communication using the [comport] object that is part of the normal PD distribution for Raspberry Pi.

Step 3: First Method for Creating a Lighting Flame

Once the OS and PD extended 0.43.4 was loaded it was time to test a method for creating a lighting animation. The first tests that I did used the attached FIREUSE.mp3 file to create the animation.


I created a PD patch to analyze the Lows. Mids and Highs of this audio file and out put them to Apple logic as midi. Then the three bandwidths were exported from Logic as individual .midi files. The .midi were then played back in a different PD patch and the data used to modulate the intensity of the 3 lights. Each light was controlled by the .midi data derived from either the Low, Mid or Highs in the FIREUSE.mp3. This can be seen in the video that is attached.

Step 4: Method Used for Flame Lighting Sculpture

Since it was Jean Margrets project after all, the method for controlling the flame needed to be intuitive. We used the key frame midi editor Vezér for an intuitive editing process that even a beginner could pick up in a few minutes to take control of this project. We ported the midi tracks back to PD and were able to see how this looked in real time. However there is no simple way to get Vezér onto the Raspberry Pi.

There were three midi tracks being edited in Vezér as seen in the attached video with Jean Margret at the helm! The same workflow as described in the previous step was used to convert the three Vezér midi tracks into separate .midi files. The .midi files were played back by PD and controlled the DMX Lighting system. If you are a PD buff the Patch used to control the system is attached here.

Step 5: Further Methods and Conclusion

In experimenting with a Raspberry Pi computing system for DMX lighting to create animation for a flame sculpture many ideas came up and were thrown around. There is always the option to add LED Lighting which can be assembled all through the sculpture. Another cool idea was to have the lighting data generated from the environment much like a real fire is generated. For instance you could use a wind sensor that would make the lighting more intense on the opposite side of the sculpture that the wind is blowing at. You could also add an interactive component allowing participants to fuel the installation with firewood, gasoline or even propane canisters for the most exaggerated modulation of the lighting system.

If nothing else this Instructable should have given you the tools to implement a DMX lighting system using a Raspberry Pi. The most exciting part for me is getting a Raspberry Pi running Pure Data a programing platform that I'm familiar with and use for creating generative video and audio systems as well as DSP analysis on audio streams. Hope this has been helpful!