magnify
Home Arduino projects Arduino based DMX ArtNet-Node
formats

Arduino based DMX ArtNet-Node

 

Arduino based DMX ArtNet-Node

Or how to make an Art-Net node for less than $ 50

Updated 13-01-2013

In this post we show you how to build an Art-Net node based on Arduino UNO or Arduino Mega with two output DMX universes (1024 DMX channels on mega). This node answers to the basic messages of the Art-Net protocol, so that any controller that meets the protocol will be able to detect it and use it as DMX output.

What do we need?

– An Arduino UNO, Arduino Mega 2560 or Mega 1280, the assembly and the code has been tested with Arduino UNO and Arduino Mega 2560, should work without problems in 1280.

– An ethernet shield based on Wiznet W5100 (Arduino ethershield)

– The DMX shield based on included schematic, or Tinkerkit DMX shield.

– Library Deskontrol 4 DMX universes (included in package)

Arduino IDE v0023 (The code for the Art-Net node does not work for now with higher versions)

New version 0.2:
Arduino based DMX ArtNet-Node v0.2

Old version 0.1:
Arduino based DMX ArtNet-Node v0.1

Changes in version 0.2 beta
—————————-
– Not needed anymore modifications on file hardwareserial.cpp
– Now using deskontrol DMX library version 0.3
– Support for Tinkerkit DMX shield in UART mode
– Support for universe address
– Unified code for Arduino MEGA and Arduino UNO
– 1 universe (512 channels) with Arduino UNO
– 1, 2 or 3 universes (512, 1024 or 1536 channels) with Arduino MEGA

Installation Instructions:

Copy the folder “Dmx” included in the package to the folder arduino-0023/libraries/

Copy the folder “artnet_node” to Arduino sketches folder, in my case “Arduino”

Now we can open the sketch of the “artnet_node”, compile the code and upload to Arduino.

*****************************************************************
IMPORTANT:
To program the Arduino via USB, will be necessary to remove the DMX shield, and put it back once programmed!
*****************************************************************

To test the performance I have used the software “MADRIX”, the utility “DmxWorkshop” of Artistic license, and the utility “artnet-discover” that is part of the library libartnet of Simon Newton.

You can also try the program WhiteCat lighting from Christoph Guillermet.

All these programs are for windows, if you want to try Linux you can use “Q-light.” (Configure your computer with the IP 2.0.0.1, subnet-mask 255.0.0.0, gateway 2.0.0.1)

I hope to share your experiences in the Blog.

 
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
58 Comments  comments 

58 Responses

  1. Nicholas West

    I have adjusted the dmx lib but still no output

    • Toni Merino

      Hi Nicholas.
      In order to use the TinkerKit DMX shield in UART mode, you need to move this bridges: DE-ENABLE, RE-ENABLE, TX-SELECT, RX-SELECT to pads 2 and 3. (the oposite as come by default)
      Tinkerkit DMX shield
      To do this, remove the resistors R2, R4, R5, R6 and make a soldering between pads 2 and 3 of each option, or move resistors to oposite pads.

      You can use deskontrol DMX library without any modifications.

      in setup() function of your project add:
      pinMode(2, OUTPUT);
      pinMode(5, OUTPUT);

      ——————————————
      For receive DMX:
      ——————————————
      in setup() function of your project add:

      // because the shield uses two output pins from arduino to control the MAX485
      digitalWrite(2, LOW); // control of 485 direction (input)
      digitalWrite(5, LOW); // control of 485 direction (input)

      ArduinoDmx0.set_control_pin(-1); // disable control from library *** needed ***
      ArduinoDmx0.set_rx_address(1); // set rx0 dmx start address
      ArduinoDmx0.set_rx_channels(100); // number of rx channels
      ArduinoDmx0.init_rx(DMX512); // starts universe 0 as rx, NEW Parameter DMX mode

      ——————————————
      For transmit DMX:
      ——————————————
      in setup() function of your project add:

      // because the shield uses two output pins from arduino to control the MAX485
      digitalWrite(2, HIGH); // control of 485 direction (output)
      digitalWrite(5, HIGH); // control of 485 direction (output)

      ArduinoDmx0.set_control_pin(-1); // disable control from library *** needed ***
      ArduinoDmx0.set_tx_address(1); // set tx0 dmx start address
      ArduinoDmx0.set_tx_channels(100); // number of tx channels
      ArduinoDmx0.init_tx(DMX512); // starts universe 0 as tx, NEW Parameter DMX mode

      *****************************************************************
      To program the Arduino via USB will be necessary to remove the DMX shield, and put it back once programmed!
      *****************************************************************

      Regards.

  2. nicholas west

    Thanks so much!

  3. Graham Simply

    Hi Tony
    I’ve just been playing with the code, and I’ve ad to download version 0023 to get this to work, I’ve not tried the hardware for DMX in/out as yet but using your instructions at the head of the blog all compiles, and I can see the node with DMX workshop.
    This is great, and thank you.
    I seem to have a problem finding the latest issue of code, the link takes me to version with the PDE at 12 June 2012 and the DMX Lib at ver 0.2.
    Tried clearing cache and refreshing page but always seems to want to download this version and nothing newer that you have uploaded.
    What am I doing wrong ? And does your new code make use of the newer Arduino 1.01 onwards ?

    Once again many thanks.
    Graham

    • Toni Merino

      Hi Graham.

      I seem to have a problem finding the latest issue of code, the link takes me to version with the PDE at 12 June 2012 and the DMX Lib at ver 0.2.

      I’m now updating and testing the code in order to compile for Arduino UNO and MEGA, using the new version of the DMX library. As the code is tested, it will update.

      And does your new code make use of the newer Arduino 1.01 onwards ?

      No, I was testing with Arduino IDE 1.0, I made the necessary changes (in version 1.0 of the IDE has changed the Ethernet library and UDP) and did not get it to work smoothly.
      It works much better with the 0023 version, the only supported for now.

      DMX library can be used with new versions of IDE.

      I have several modifications contributed by A. Caneira, like adding an LCD display, and some improvements, which also publishes soon.

      Regards.

  4. Graham Simply

    Hi Toni

    Thank you for updating the files, and also pointing out A.Canira’s site.
    I’m currently building a part isolated shield for DMX out as I’ll be connecting at least one of the DMX Universe to Mains driven Dimmer packs, and will have additional DMX outs for other uses.
    I should be able to compare a zero88 single DMX to Artnet Node against this at my local theater.
    Have you had any thoughts on DMX input ?

    Best Regards
    Graham

    • Toni Merino

      Hi Graham.

      Have you had any thoughts on DMX input ?

      Yes, in next revision of node I want to enable a DMX input universe.

      Regards.

  5. Lightingdude

    Hi! I’m interested in making one, but I’m concerned about a few things:

    1. I do pro-level festivals and concerts. I need to get a minimum of 4 universes. Can I somehow gang two of these together and get 4 universes of output?

    2. Is the output fast enough to be reliable at that level, or is this more for christmas lights and such?

    Thanks!

    • Toni Merino

      Hi.

      Can I somehow gang two of these together and get 4 universes of output?

      Yes, but I recommend you to get the maximum frame rate, you use 4 nodes with Arduino UNO.

      Is the output fast enough to be reliable at that level, or is this more for christmas lights and such?

      I’ve used in live events, to control moving heads, par cans, strobos… and I have not had any problems.

      You can try first with a single unit, to see if it meets your needs …

      Best regards

  6. Omar_Avo

    Hi Toni!
    I used your code Art-net node with Arduino MEGA 2560, programmed with Arduino v0023; I made a dmx shield with your schematics, with one output DMX; I used ArduinoDmx0.set_control_pin number 7 (this is the control pin for my dmx shield).
    I connect the Dmx node with Avolites Sapphire Touch (gateway 2.0.0.1, subnetmask 255.0.0.0), but I can’t see the arduino Node
    What I can do?

    Best regards

    • Toni Merino

      Hi

      I connect the Dmx node with Avolites Sapphire Touch (gateway 2.0.0.1, subnetmask 255.0.0.0), but I can’t see the arduino Node
      What I can do?

      Have you tried first with a computer?

  7. littlefoot

    Wheres the sketch? I downloaded the package but no sketch in it, I’d really like to try this out. Is there something I’m missing here? I dug through the package and no .ino file anywhere, maybe need to rename something?

  8. littlefoot

    Thank you, Toni for your response.
    I feel kinda dumb now.

    I have one more question though.
    Would it be possible to add 2 buttons to increment the last segment of the IP address?
    This would be handy If you had multiple nodes running at the same time

    • Toni Merino

      Hi.

      I have one more question though.
      Would it be possible to add 2 buttons to increment the last segment of the IP address?
      This would be handy If you had multiple nodes running at the same time

      I want to add in the next revision the ability to store settings in EEPROM, support for an LCD display (Contributed by A. Caneira), and some keys …

      Regards.

  9. Great news Toni. Some keys can be very usefull for a basic system menu… Change IP, configuring active Universes, chose DMX mode, etc, etc. The 2×16 display can be short. I’ve thought about doing some kind of menu, with an LCD display 84 * 48 (nokia), they are very cheap ($ 4), but it seemed that the Arduino library for this module consumes more of the precious memory than using a 2×16 LCD. But the worst is… that I’m taking the first steps in C + +

    • Toni Merino

      Hi Caneira.

      Great news Toni. Some keys can be very usefull for a basic system menu… Change IP, configuring active Universes, chose DMX mode, etc, etc. The 2×16 display can be short. I’ve thought about doing some kind of menu, with an LCD display 84 * 48 (nokia), they are very cheap ($ 4), but it seemed that the Arduino library for this module consumes more of the precious memory than using a 2×16 LCD. But the worst is… that I’m taking the first steps in C + +

      Thanks for the info, I think it’s best to use a non-graphical LCD, in order to economy resources, when I have some time to prove it.
      I am currently making changes in code, for store configurations in EEPROM, and others improvements.
      Actually I have some lack of time…

      regards.

  10. I forget… the ready made modules with 2x16LCD and some keys, are possibly the easy and more economic way… specially for assembly.

    Regards to community

  11. Omar_Avo

    Thank you, Toni for your response

    Yes, I used your “discover.exe” programm, but it show me only the IP address of my pc; I used also “MADRIX”, and it dosen’t work.

  12. davide

    ciao,
    ho realizzato un prototipo di questa scheda con arduino mega 2560 e ethernet shield,ora è possibile sostituire la ehternet shiel con la wifi shied?
    sarebbe bello avere la possibilità di collegare senza fili questo tipo di scheda.

  13. Hi Davide

    Surely be better and cheaper to use a wifi client type D-Link or similar

    I’ve used this method several times it works quite well. Simply configure the router to work in the same IP range of Artnet Node. Wifi routers are quite cheap

  14. littlefoot

    First off, I’d like to thank you Tony for all your hard work and quick replies.

    Though I do Have a few questions for you I haven’t been able to figure out for myself.

    1.I don’t intend to use the tinkerkit shield, That said. where do I declare the IO pins to talk to the 485? I’ve found the spot to change the control pin for each universe, but as I understand it(and please correct me if I’m wrong), The control pin only tells the 485 if it’s being used as an input or output.
    2. this isn’t as much of a big deal to me, I’d just like to understand better, keep in mind I’m fairly new to arduino. In your code there are several places where you use #if defined, where are these things defined in the first place? I’ve searched throughout the code to find out where, but I am at a loss.
    3.This is kind of a followup on 2. If I’m only intending on using a specific chip, say the AVR_ATmega2560 can I remove this

    #if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
    const int MAX_BUFFER_UDP = 1650;
    #elif defined(__AVR_ATmega328P__) || defined(__AVR_ATmega168__)
    const int MAX_BUFFER_UDP = 550;
    #endif

    and replace it with this?

    const int MAX_BUFFER_UDP = 1650;

    • Toni Merino

      Hi.

      1 – Yes, control pin only set 485 direction, maybe hardwired 485 direction, and not used.

      2 – 3 These “#if defined” are used by compiler when select board type Arduino UNO or Arduino MEGA to select right code.
      This not use any memory, but you can delete.

      Regards.

      • littlefoot

        yes, But what about the IO pins? where Do I change which pins are used to talk to the 485 If I decide to use 2 universes? as I understand it, I would need to change the IO in order to add the wiznet shield with the arduino uno

        • Toni Merino

          Hi.
          I/O pins are defined inside DMX Library, is not possible to change the USART pins. (See examples in DMX lib)
          With Arduino UNO you only have 1 USART (1 universe)

          Currently these processors are supported by DMX lib:

          Arduino MEGA (ATMEGA1280 – ATMEGA2560), up to 4 USARTS, ArduinoDMX0 = USART0, ArduinoDMX1 = USART1…

          Arduino UNO (ATMEGA328), only 1 universe, ArduinoDMX0 = USART0

          Arduino NANO (ATMEGA328 – ATMEGA168), only 1 universe, ArduinoDMX0 = USART0

          Regards.

          • littlefoot

            Toni,
            Thank you for clearing that up for me, and as I said before thank you very much for your hard work on this project. I’m sure everyone who has interest in this also appreciates it, keep up the good work!

  15. Tony

    Hi Toni,
    I have a question in regards to the 2 female ports on the DMX Master shield.
    can both ports be programmed as outputs if I’m using The Arduino Mega 2560 with it. Looking to build a 4 port DMX Artnet node. and wont to limit space.

Leave a Reply

Your email address will not be published. Required fields are marked *