--> Arduino DMX master using RS485 click board | Electronza

Arduino DMX master using RS485 click board


In this project, I will show how to implement a DMX master controller using one Arduino Uno, and one MikroElektronika Uno Click shield hosting one RS-485 click board. This project allows up to 32 devices to be connected to the same DMX bus, including the master controller, so up to 31 slave devices can be used. The number of DMX channels is up to 512, but due to memory space restrictions you may wish to use a limited set of channels.

The RS-485 click board features a half-duplex SN75176 IC (which is basically an MAX485 clone). This is a non-isolated DMX transceiver, so there is no galvanic isolation between the master device and the rest of DMX devices. Two unwanted issues here: this allows for ground loops to exist, so a current path can be established from a DMX slave device through the RS485 transceiver and then through Arduino and the USB cable connected to a computer or a laptop. If there’s a defective device and you have such a ground loop, you can damage all the equipment, including the computer. Second, lack of galvanic insulation can allow the live mains voltage to leak from a defective device through the DMX cable and into the Arduino and the connected PC. Another issue is that when used outdoor, especially with a long DMX bus, hazardous voltages can appear on the DMX bus during electric storms. So, it’s best to use this project only indoors.

While there’s a low statistics for this to happen, the lack of galvanic isolation creates a potentially life-threatening situation, so please take all the appropriate safety measures when working with this project. Don’t touch any of the exposed circuits. Use battery power if possible. Better safe than sorry.

If you plan to do some serious projects starting from this article, then I strongly recommend the use of a DMX isolator or use an isolated RS485 click board, with minor changes in the code.

Close-up view of the RS485 click board

The main element on the RS-485 click board is the RS-485 transceiver, which is configured to work in half-duplex mode. You can either transmit or receive, the selection between these modes being made through the R/T signal, which corresponds to the PWM pin of the RS-485 click board. When using the Click shield, if the RS-485 click is inserted into slot #1, the PWM pin is connected to Arduino pin D5. If the slot #2 is used, the selection between emitting or receiving is made through Arduino pin D6.

Three jumpers are present on the RS-485 click. If our project is connected to one end of the DMX bus, which is the most frequent situation, all three jumpers must be closed. However, the DMX master can take any position of the DMX bus. If the master is somewhere in the middle of the bus, remove all three jumpers.

DMX master schematic. Created with fritzing.org


By the RS-485 standard (inherited by DMX), there must be also a proper termination of the other end of the DMX bus. So, a terminator comprising of a 120-ohm resistor mounted inside an XLR connector was plugged in.

DMX terminator. Created with fritzing.org

The light fixture used for testing is a Eurolite T-36 LED DMX Par, which uses five DMX channels, as follows:

CH1: Red (0:100%)
CH2: Blue (0:100%)
CH3: Green (0:100%)
CH4: Brightness (0:100%)
CH5: Flash (0:10 — no flash; 11:255 flash 0:100%)

The switches on the back of the T-36 were configured for DMX operation, channel range 1:5.
Arduino DMX master connected to a T-36 DMX from Eurolite

As for the software, I used the Conceptinetics DMX library. The following is a code example for this light fixture, which turns on each color for about 3 seconds, then turns off all lights, followed by a dimming of the red channel from 0 to 100%:

Name

Air quality,1,Arduino code library,2,Arduino projects,12,Casual stuff,1,ESP8266,2,PIC projects,1,Review,14,Tutorial,11,
ltr
item
Electronza: Arduino DMX master using RS485 click board
Arduino DMX master using RS485 click board
https://1.bp.blogspot.com/-F09ACO4OJHg/YFi3vi1kMxI/AAAAAAAABwc/BMDBIVMuVpgqxZYN7IKNfrS7ooXOtpIJgCLcBGAsYHQ/w640-h480/dmx_working.jpg
https://1.bp.blogspot.com/-F09ACO4OJHg/YFi3vi1kMxI/AAAAAAAABwc/BMDBIVMuVpgqxZYN7IKNfrS7ooXOtpIJgCLcBGAsYHQ/s72-w640-c-h480/dmx_working.jpg
Electronza
https://www.electronza.com/2015/07/arduino-dmx-master-using-rs485-click.html
https://www.electronza.com/
https://www.electronza.com/
https://www.electronza.com/2015/07/arduino-dmx-master-using-rs485-click.html
true
4275662725798500575
UTF-8
Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS PREMIUM CONTENT IS LOCKED STEP 1: Share to a social network STEP 2: Click the link on your social network Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy Table of Content