Home Creators Posts Import Register Favorites Logout

Content

As requested, here's a video demonstrating how you can use DMX lighting to add a really theatrical effect to your escape room: setting mood lighting, using spotlights to highlight particular elements, or creating ambient/environmental lighting effects such as lightning, police cars, or a magical UV blacklight effect.

All these effects can be triggered directly by a standalone Arduino with a DMX shield - which might respond to player inputs, or events when a puzzle is solved or a certain amount of time has elapsed in the room, for example. But I'll also show you how you can use Node-RED to create an (optional, additional) browser-based graphical interface to the Arduino - creating a "virtual lighting desk" - which a gamesmaster can use to manually set hue, brightness, store presets, and activate/deactivate  DMX slave devices in realtime.

If you have a different DMX interface, you can use the same basic flow as described here, but change the Serial Out node that currently points to the Arduino to match your interface. Note that you will also need to adjust the specific channel/values to match the setup of DMX devices that you use, since there is no standardised format - every lighting setup is different.

As always, thankyou for your support, and please ask if you have any questions!

Timings

00:00-03:45 Introduction and demonstration

03:46-08:49 Explanation of DMX hardware and interface

08:50-20:11 Arduino code

20:12-38:04 Creating a virtual lighting desk in Node-RED

38:05-39:08 Wrapup

Resources Used

Conceptinetics DMX shield - https://www.tindie.com/products/Conceptinetics/25kv-isolated-dmx-512-shield-for-arduino-r2/ (other shields are available - e.g. https://thepihut.com/products/dmx-shield-for-arduino . It's also possible to create your own DMX shield using a MAX485 chip, as explained at https://playground.arduino.cc/DMX/DMXShield/ )

RGB Cans: £70 for 4 - https://amzn.to/34yeHA3

Spotlight: £19 https://amzn.to/36xgaIC

UV: £23 https://amzn.to/2NmH6TV

Node-RED - https://nodered.org/

Arduino Code and Node-RED flow

https://github.com/playfultechnology/node-redscape/

Files

DMX Lighting Control with Arduino and Node-RED

Bored of simple LEDs and Neopixel strips in your Arduino projects? Want something a little bit more.... dramatic? In this video tutorial, I'll demonstrate how you can use an Arduino UNO to control DMX stage lighting and other effects (e.g. fog machines). This is ideal for creating theatrical set-pieces in escape rooms: setting mood lighting, using spotlights to highlight particular elements of a room, or setting ambient/environmental lighting effects such as lightning, police cars, or a magical UV blacklight effect. All these effects can be triggered directly by DMX signals programmed in code in a simple standalone Arduino sketch. But I'll also show you how you can use Node-RED to create a browser-based graphical interface to the Arduino - creating a "virtual lighting desk" - which you can use to set hue, brightness, store presets, and activate/deactivate DMX slave devices in realtime, or triggered by in-game events such as puzzles being solved, or when the game countdown only has a certain time remaining etc. Timings --- 00:00-03:45 Introduction and demonstration 03:46-08:49 Explanation of DMX hardware and interface 08:50-20:11 Arduino code 20:12-38:04 Creating a virtual lighting desk in Node-RED 38:05-39:08 Wrapup Resources Used --- - Conceptinetics DMX shield - https://www.tindie.com/products/Conceptinetics/25kv-isolated-dmx-512-shield-for-arduino-r2/ (other shields are available - e.g. https://thepihut.com/products/dmx-shield-for-arduino. It's also possible to create your own DMX shield using a MAX485 chip, as explained at https://playground.arduino.cc/DMX/DMXShield/ ) - RGB Cans: £70 for 4 - https://amzn.to/34yeHA3 - Spotlight: £19 https://amzn.to/36xgaIC - UV light: £23 https://amzn.to/2NmH6TV - Node-RED - https://nodered.org/ If you'd like to support me making more video tutorials explaining how to use tech in escape rooms and other playful settings, please check out my Patreon at https://www.patreon.com/playfultech, where you can also find code downloads, wiring diagrams, and additional resources for all my projects.

Comments

Tristan Fournier

The Arduino Code repository is not available. Is it possible to put it back ?

Katelyn Cahill-Rowley

Hi Alastair, In the code, we only send to the DMX shield using one "dmxTransmitPin" and one "modeSelectPin". If I used a logic level converter, do you suppose I could simply connect two pins on an ESP32 to the shield, and thusly use it with an ESP 32? I hoped to run this on ESP32 because it's the same board I'm using for all of my other puzzles, and I've gotten used to using MQTT with it, as opposed to a COM serial connection that would need to travel a significant distance to my control room

Andrew Leonard-Brook

Hi Alastair. I joined your patreon channel specically for this post and 1 other. The Arduino code is showing as not available anymore. Is there any other way to get the code please? Ive tried typing it out, but its not working, It would be very much appreciated.

Sébastien Guivarc'h

Hello Alastair, I love your Job and your videos, thanks for that. I'm Teaching electronic in France and I'm currently designing a DMX Shield to control DMX Universe with Node-Red and like you I want to use a Software Serial Pin to transmit data to the RS485 Transceiver. In your video you say that you modified the simple dmx library but I can't find your code or any explanation about your modifications of the library, could you help me on this point? Thanks !

Giovanni Gentile

Could I add some "random" function that generate randomic number assigned to each colour... I think it's simple in Node-red but I'm noob

Aleksandar Milenkovic

Thanks Alastair, I am looking to use DMX in our new escape room and was going to use what you have done as a starting point. Can I ask what your new method is? Not sure I want to start learning this if there is a better method. Can you send me instruction pls. too

James Bell

Hello Alastair, Incredible work you do here. So FUN.

James Bell

Wondering if it is possible to (and recommended) to skip serializing the DMX data packets with JSON. For a project I'm working on, it be helpful to create effects for a couple RGB can lights via MQTT. Is using JSON ideal for this.

James Bell

I really like the lightning effect you programmed with the added audio. ... makes me want to sit in a room and close my eyes to take in the thunder beauty. Have you found any good resources for "effects"? I like the fastLED library because it comes with a set of animations (e.g., plasma, strobe, star twinkle, fire, etc.) It would take a lot of time to write each desired lighting effect for a given theatric.

Euan Hair

Hi Alastair, I am having a problem downloading the Serial Port module on node red. I've tried installing from palette and npm but both fail. Do you happen to have an idea where I'm going wrong? Cheers, Euan

Euan Hair

This time I'm properly stuck. When you demonstrate how to send a Serial Communication in the monitor I received the same error message every time "{"channels":[ {"channel":1,"value":255}, {"channel":3,"value":128} ]} 1 255 3 128 deserializeJson() failed: IncompleteInput"

Euan Hair

I'm using the DFRobot DMX shield and have tried moving the jumpers to change settings but have been unable to get it to work. Can you point me in the right direction? Thanks, Euan

Euan Hair

Sorry to spam your page with more questions...I love this tutorial. I got everything working perfectly over serial but now I'm keen to try it using the MQTT out on Node Red - Is there a way to point this at the serial monitor or a better way to go about this?