Back to Projects

Lair Lights Controller

Electronics
Intermediate

Set up and control lights for your lair, parties, or any other occasion where you want to demonstrate your acumen and killer instinct.

This project uses common, cheap electronics to build your controller. Open source software is provided.

Parts List

Part 1: Assembling the Controller

First, you'll want to solder three wires onto the XLR jack.

The following steps explain how to build the controller:

The controller is finished!

Finished Schematic

Connect any DMX lights you have to the XLR jack. Next up, programming.

Part 2: Programming the Controller

  1. Download and install VS Code
  2. Install the Platform.io IDE extension. This is needed to connect your computer to the microcontroller.
  3. Download or clone the repo from GitHub: https://github.com/mischieftech/lair-lights-dmx
  4. Open project in PlatformIO

In VS Code, select Open Folder and select the lair-lights-dmx folder you downloaded. PlatformIO will automatically setup the project with the needed libraries.

  1. Update the code with your Wi-Fi network name and password:

In the src/main.cpp file, update the following lines:

const char* ssid = "";
const char* password = "";
  1. Connect the ESP-32 to the computer via a USB cable.
  2. Upload the code to the ESP-32

In the top right corner of the file there is a menu, under which is the Upload option. Select it. This will start compiling and uploading the code to the ESP-32.

  1. Start the Serial Monitor to find the IP Address

Next to the build menu, click the plug icon to open a serial monitor. This will connect to the ESP-32 and view its output. It should output its IP address. Take note of this.

(Example)


The controller is all ready to go. Last part: setting up the software for your lights.

Part 3: Configuring Lights

  1. Open the Mad Power Struggle application: https://power.mischief-tech.com/

Alternatively, you can also download a desktop app or build from source. Repo: https://github.com/camman3d/mad-power-struggle

Important Note

The computer running the application must be connected to the same network as the ESP-32.

  1. Click the Config link in the top-right corner.
  2. Under the DMX Controller IP Address field, enter IP address of ESP-32
  3. Add light definition

Each type of DMX light, or fixture, can have a different number of channels (sometimes also called slots or traits). Each channel corresponds to a different function. You will need to reference your light's manual to determine how to set it up.

For an example, let's say we have a light with four channels:

ChannelFunction
1Dimmer (light brightness)
2Red
3Green
4Blue

A DMX value is in the range of 0-255. So we will set the Dimmer channel to full brightness by setting it to 255. Our light definition would look like this:

  1. Add your lights

Under the Lights section, add the actual lights you have. Each DMX device is assigned an Address so make sure it is set correctly.

  1. If you want, you can add additional colors.
  2. Return to the Board view by clicking the Board button in the top-left corner.
  3. Use the buttons to control your lights!