Automated Theater Timeline Using DMX

by dantedeketele in Circuits > Raspberry Pi

12 Views, 0 Favorites, 0 Comments

Automated Theater Timeline Using DMX

LogoTT.png
20250615_202416.jpg
Theater Timeline - DMX backstage overview ofr cast and crew prototype

Always have an overview of your current performance on the bluetooth timeline display or the local webapp.

This localy hosted webserver is a perfect addon to any low-budget theater production.

If you have a big cast or crew that is hard to coordinate. This devoce can help castmembers know when to go on stage and how long the have for breaks and quickchanges.

The combination of the informative website and wallmounted display is perfect to make sure everyone is up to date.

Supplies

  1. Raspberry Pi 4 or 5 (as webserver) and a powerfull powerbrick
  2. Arduino Uno (DMX slave)
  3. ESP32 (bluetooth display) and an micro-usb powerbrick


  1. DMX slave shield (for Arduino)
  2. Level shifter
  3. Breadboard power supply and its powerbrick
  4. Breadboard
  5. Wires to connect components
  6. PIR sensor
  7. Neopixel ledring
  8. LCD-display
  9. I2C to LCD module
  10. MCP3008/MCP3002 ADC
  11. GY-MAX4466 Electret Microphone Amplifier

Electronics

ProjectOne_bb.jpg
ProjectOne_schema_electronics.jpg
20250615_204820.jpg
20250615_204715.jpg
20250615_204655.jpg

To get started, we first need to connect the electronics. Be sure to connect everything to the right voltages.

Orange: 3.3V, Red: 5V, Black: Ground

Provided below is a Fritzing file, use http://fritzing.org/ to open it.


DMX Slave

To read the DMX channels we will connect use a DMX shield and its provided library. We can then communicate the data to the Raspberry Pi using I2C.

Since the RPi and Arduino run on different voltage levels we need to use a level shifter to ensure we dont connect 3.3V to 5V. Add the breadboard powersupply to the breadboard with one side delivering 5V and the other 3.3V.

On the arduino pin A4 is the data line and pin A5 is the clock line. These pins are among the analog pins of the Arduino. Connect these to the high voltage side of the level shifter and connect the respective low voltage pins to the RPi I2C bus.

Ensure the level shifter is powerd by connecting 5V to the High Voltage pin and 3.3V to the low power pin and connecting the grounds.

You can power the Arduino by connecting the Vin with 5V and connecting the grounds.

Flash the Arduino firmware provided below.

Disconnect the shield when flashing! Else the DMX shield might interfere.


Once the electronics for DMX are connected, we can test its workings by running the following in the linux terminal.

Ensure I2C is enabled:

sudo raspi-config

Select "5.Interface Options"->"P5.I2C"->"yes"

Once I2C is enabled you can scan for devices:

sudo apt-get install i2c-tools
i2cdetect -y 1


Microphone

To read the sound levels we use a mic module. It outputs an analog value wich we can convert to I2C using an MCP3008. You can check if its working using the same i2cdetect comand as we used with the Arduino.


Bluetooth Display

Upload the provided firmware to the ESP32. It will give us all functionality needed.

You will need to solder some wires. Be sure to use heatshrink to prevent shortcircuits.


PIR sensor

The PIR sensor outputs a logical 1 or 0 when movement is detected. You can adjust the sensitivity and delay using the 2 potentiometers on the module.


LCD Display

To cimmunicate with the LCD display we use a module. This needs to be soldered to the display as shown in the image above.


Neopixel ledring

The neopixel has a data-in and a data-out pin. We will only use the data-in, so the "Do" can be left disconnected.

Display Enclosure

20250615_204531.jpg
20250615_204622.jpg
20250615_204543.jpg

To create the display enclosure you can use the provided stl files to 3D print the shell. You might need to scale it by 100 to make it the right units. The front can be created by lasercutting a transparent plexiglass panel with a 9cm diameter circle. the top and bottom can be screwed together with 3 M6 screws and the plane snaps into place.

The internals should snap together. mounting holes are provided if necisary.

Server Enclosure

As server enclosure I used a 1u rackmounted shelf, but any serverrack case will do the trick. In case the shield doesnt fit on the arduino, you can mount them side by side.

If you are not able to mount the timeline server in a serverrack on stage, you can mount it anywhere as long as the sound is still audible for the microphone.


In my case I bored holes big enought for the USB powercord, the 9v powercord and the DMX hole.

Setting Up the RPi

Getting started

Install the latest version of Raspbian onto your RPi.

https://www.raspberrypi.com/documentation/computers/getting-started.html

Get an SSH connection to start using the RPi. For this you can use Putty or Visual Studio Code.

Be sure to enable the I2C interface, otherwise you will get errors when running your code.

To connect to the bluetooth display you should first connect it to the RPI. This can be done easily in the GUI. Only when a connection is established will the code work, else you get an error.

Apache

Apache is the web server we will use to host the files.

You can install Apache with the following command in ssh:

sudo apt install apache2 -y

MariaDB

MariaDB is the database server we use to host the information. You can install MariaDB with the following command in ssh:

sudo apt install mariadb-server mariadb-client -y

Python

My backend will be written in Python so I will need to download python.

You can install Python using the following commands:

sudo apt update
sudo apt install python3 idle3


Setting up the Theater Timeline server

Using Visual Studio Code you can clone my github project to your RPI. But before you can start that you should first configure some settings.

https://github.com/howest-mct/2024-2025-projectone-mct-DanteDeketele/tree/main

First execute the database dump file in "docs" in your database. you can use MySQL Workbench for this.

Then you can setup a venv. and install the librarys as documented in requirements.txt