Raspberry Pi HTTP to GPIO DMX
This is an experimental tool to create a cheap DMX controller with your Raspberry Pi. It only cost the price of your raspberry pi and the MAX485 RS-485 Module (around 2$). This script will help you to create a way to control DMX device through a web HTTP page.
Item | Value |
---|---|
Raspberry Pi | |
MAX485 RS-485 Module | |
Cable | |
Some 0.1 pin header cables | |
Plug suitable for DMX (XLR) |
the Raspberry Pi (rpi) is not 5volt tolerant (it does not accept 5v inputs) but the module has pull-up resistors on the I/O lines pulling the logic signals up to 5v. These resistors need to be removed otherwise damage may result to the rpi, things may get hot, smell bad at best or fail completely at worst. So take your soldering iron to remove resistors. If you don't, it can damage your Raspberry Pi.
Before | After |
---|---|
Now you need to connect the MAX485 board to the GPIOs of the Raspberry Pi. Follow the connection picture.
Note:
- The RO pin is optional.
- The DE pin have to be connected on the GPIO21 or GPIO27 (it depends of the RBPi version).
Wire the MAX485 board to the DMX plug (XLR 3pins) or socket.
Wire | Result |
---|---|
B is positive (red) and goes to pin 3 on the socket. A is negative (black) and goes to pin 2. |
Image is socket viewed from back.
Install softwares
If you overclock the Pi this code will produce some bad packets. it is better to have a raspberry pi non overcloked. The default non overclocked config.txt with the addition of the line disable_pvt=1 added to it seems stable.
We will first edit /boot/config.txt
to add disable_pvt=1
option.
sudo nano /boot/config.txt
then add or uncomment disable_pvt=1
and save it.
sudo