Introduction: Online DMX Light Controller

Just switch on your favourite Raspberry Pi and start controlling a show from any smartphone or laptop connected to the Internet. Sounds cool right? Well, this is exactly the goal of this project. You will just need a Raspberry Pi and a DMX to USB interface, and you should be ready to go within an hour.

Quick notice: To help you follow these steps, you might want to have a look at flashular's Raspberry Pi as a DMX light controller which is one of the building blocks of this project.

Before you begin, you know I'll be really happy to answer any of your questions so feel free to ping me!

Step 1: The Big Picture

To begin with, I'd like to explain you briefly how the chain of command works when you will want to send a command to your spotlights.

  • Website as a remote controller

Whenever you want to send a command to your DMX spotlights, you will need to use the website that is part of this project and which monitors everything. I tried to make the user interface as user friendly and clear as possible, so once set up you shouldn't have any problem using it.

  • Raspberry Pi as a DMX controller

Secondly, any modification made on the website will be detected by the Raspberry Pi controlling directly the state of your spotlights. It will download the new state, and trigger the transition you chose online to switch from the old to the new state.

  • DMX - USB interface

Thirdly since we can hardly plug a dmx cable in a computer, we need a way to send our data over a USB cable and then somehow, to convert this into DMX. This is done by DMX to USB interfaces which are not very expensive, and are just plug n play devices so this part shouldn't be a problem either.

  • Lighting gear

And finally at the end of the chain, here is your lighting gear which can be any DMX controlled spotlights, DMX being the only communication protocol handled in this project.

Doesn't look too tricky so far right?

Step 2: Web Interface

First of all, wanna try the interface to know what you're downloading? You can try it out over here.

  • Setting the website

The core part of this project is to control everything from the web, in order to let you monitor your spotlights with any device, from any place. To achieve this, you will need to do the 2 following things:

  • First, have a place where you can host a website. This is something I can hardly help you with but there are plenty of resources out there will guide you better than me on this topic.
  • Secondly, just copy (using FTP for instance) the source code at the root of your website.

I made the source code available on Github here. You will find the following directories:

deamon          the background RPI program that writes data to the USB port
values_handler  the main RPI program that directly controls the DMX state.
www		the online web interface which serves as a remote control.

Hence, copying the source code to the root of your website will require you to download the project by running the following command in your terminal:

git clone https://github.com/louisblin/ChampyLight

And copy the content of the www directory in your website root.

Once this is done, your website is ready!

Step 3: Raspberry Pi

  • Shopping list

If you don't already have one, you will need to buy a Raspberry Pi and a USB to DMX interface.

- For the Raspberry Pi, you can find the link to buy the Pi from the official website, and I would recommend that you use the same as me (Raspberry Pi 2 Model B) since the program it runs is pretty resources consuming.

- For the USB to DMX interface, I used the VM116 USB Controlled DMX Interface by Velleman. Two models exist depending on wether you want to buy as a kit or assembled.

  • Setting up the Pi

Once you get your Pi, you will need to install an Operating System on it, and might be interested to check the quick start guide. All of these steps are quite standard, so I'll let you check online resources for this, and flashular's tutorial on Instrutables which describes exactly the steps I followed.

  • Installing the software

The software is stored following directories of the same Github project, here:

deamon          the background RPI program that writes data to the USB port

values_handler  the main RPI program that directly controls the DMX state.

After having cloned the project (cf step 2), you can enter the repository and compile it by typing the following commands in your Terminal.

cd ChampyLight
make

Later on, after connecting the DMX interface to one of the Raspberry Pi USB ports, you'll be able to start the 2 programs with the following command:

make && sudo deamon/bin/dmxd.bin &
values_handler/bin/champylight

Just to make things clear, ChampyLight is just the fancy name I gave to this project so don't panic with the new name.

  • Configuring ChampyLight

All of the basic configurations you can easily edit are stored in the following file:

ChampyLight/values_handler/src/constants.h

A compulsory setting you will have to set is `REMOTE_ADDR` which holds the URL of the website on which you hosted the online controller.

  • Going further

If you want to understand better how the values_handler is working, I make a documentation using Doxygen that you can check out by opening the following file in your favourite browser:

ChampyLight/values_handler/doc/html/index.html

Step 4: Usage

Once everything is configured, you just have to start the 2 programs of the Raspberry Pi and you'll be controlling the spotlights.

  • Plug n play

An improvement here could be to tell the Raspberry Pi to launch the 2 programs on its startup. I managed to make it work but I'm really not sure about my code so I won't share it here. However, loads of resources can be found online on this topic so I'm sure you could figure it out easily.

Another thing I did was to use a battery, a wifi hotspot and a USB wifi receiver and order the make the Raspberry Pi more portable. It allowed me to use this system in a touring festival in the French countryside (cf. photo) without wondering about where I would plug the Pi or find an internet connection. It was really convenient, and very nice to see ChampyLight work !

Step 5: Further Improvements Ideas

To push even further the idea that you can control your spotlights from any device and any place, I had the following improvements in mind:

  • Make it easier to user

  1. I'd be nice to have to script that would download (git clone), install (make), update (git pull), and run the code by itself. Whenever it would be called, it would set the project it necessary and run it. An All-in-one solution!
  2. I must admit needing to host a website can be discouraging for a beginner so I thought we could have a single place where the website would be hosted. Anybody could create an account there, register it's Raspberry Pi and start using the interface without bothering about installing and maintaining it. Combined with the previous idea, it would make things so much easier!

  • Because more portable is better than portable

Last suggestion, we could have a camera added on the Raspberry Pi that would stream live video of the stage on the ChampyLight controller interface. The user would even have to be in the room the control his spotlights, not even in the same country actually (let's dream!).

Comments

author
galaxymaster1 (author)2015-10-21

hey could i use this to control a full lighting rig?? my idea was when im not near the desk and im moving lights i can turn up channels when i need to without going to the desk. is this possible??

author

Hey! That's exactly what it's made for!
However I could only test it on LED spotlights, but theoretically it works with any DMX controlled gear. I'll be able to run some more tests on standard spotlights controlled by a power block in the coming month, I'll let you know how it goes because I guess you're not only using LEDs.
Another thing, I don't think you can have more than 1 DMX emitter on a circuit. It means you would need to switch the DMX out cable between your controller and the Pi depending on the way you want to monitor the lights.
Hope this helps :)

author
DIY Hacks and How Tos (author)2015-10-10

Great way to remotely control a lighting system.

author

Thanks! :)

About This Instructable

2,459views

36favorites

License:

Bio: 2nd year student at Imperial College London, enrolled in a MEng Computing.
More by LouisLeBlin:Online DMX Light Controller
Add instructable to: