Home Proyectos Arduino Nodo ArtNet-DMX basado en Arduino

Nodo ArtNet-DMX basado en Arduino

Nodo ArtNet-DMX basado en Arduino

O como hacer un nodo Art-Net por menos de 50$

Actualizado el 13-01-2013

En este post te mostramos como construir un nodo Art-Net basado en Arduino UNO o Arduino MEGA, con dos universos DMX de salida (1024 canales DMX solo en mega). Este nodo responde a los mensajes basicos del protocolo Art-Net y por tanto cualquier equipo que cumpla el protocolo sera capaz de detectarlo y utilizarlo como salida DMX.

¿Que necesitamos?

– Un Arduino UNO, Arduino mega 2560 o mega 1280, el montaje y el codigo han sido probados con Arduino UNO y Arduino mega 2560, debe funcionar sin problemas en el 1280.

– Un shield ethernet basado en Wiznet W5100 (Arduino ethershield)

– El shield DMX basado en el esquema incluido, o el shield DMX de Tinkerkit.

– Libreria deskontrol 4 universos DMX (incluida en el paquete)

Arduino IDE v0023 (El codigo para el nodo Art-Net no funciona de momento con versiones superiores)

Nueva version 0.2:
Nodo Art-net basado en Arduino v0.2

Version 0.1:
Nodo Art-net basado en Arduino v0.1

Cambios en la version 0.2 beta
– Ya no son necesarios cambios en el archivo hardwareserial.cpp
– Ahora se utiliza la libreria DMX version 0.3
– Soporte para el shield DMX de Tinkerkit en modo UART
– Soportada direccion artnet de cada universo
– Codigo unificado para Arduino MEGA y Arduino UNO
– 1 universo (512 canales) con Arduino UNO
– 1, 2 o 3 universos (512, 1024 o 1536 canales) con Arduino MEGA

Instrucciones de instalacion:

Copiar la carpeta “Dmx” incluida en el paquete a la carpeta arduino-0023/libraries/

Copiar la carpeta «artnet_node» a nuestra carpeta de sketchs, en mi caso «Arduino»

Ahora podemos abrir el sketch del proyecto «artnet_node», compilamos el codigo y lo cargamos al Arduino.

Para programar el Arduino via USB es necesario quitar el shield DMX, y volver a colocarlo una vez programado el Arduino.

Para probar el funcionamiento yo he utilizado el software «MADRIX», la utilidad «DmxWorkshop» de Artistic licence,  y la utilidad «artnet-discover» que es parte de la libreria libartnet de Simon Newton.

Tambien puedes probar con el programa WhiteCat lighting de Christoph Guillermet.

Todas estos programas son para windows, si quieres probar con Linux puedes utilizar «Q-light». (Configura el ordenador con la IP subnet-mask gateway

Espero que compartas tus experiencias en el Blog.

 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn

6 Respuestas

  1. Hi there!I want to use my built stagelightning cnoosle (2 Touchscreens, selfmade MIDI Input ) with GrandMA on PC instead of DMX Control 2.Were do I find information about your Hack to ouptut ArtNet with on PC?

  2. Hey seems to be working fine here with VVVV, i was able to get the 3 universes at the same time, but i need to be carfull when i send the messages, i guess its an issue with vvvv software sending the dmx data rather than an issue of the board / code…

    anyway, i was thinking, if the board its slow,,, why not a faster one ?
    the arduino mega have 16mhz, and the due can handle 84mhz….
    there is a small diference cause mega use 5v and due use 3.3v …
    but i guess the spi bride works the same at that voltage… i need to check that
    and the tx output, if its more that 2.5v, the max485 will give us a high state so it should be the same,,,

    what do you think ?
    i dont have a board here to test it, its quite expensive, but if anybody can confirm that this is true i can give it a try…

    • Toni Merino

      Hi Andres.
      I don’t recommend to use more than 2 universes with mega.

      For use Arduino Due, DMX library needs to be rewritten, I want to make this when I have free time.


      • Yeah i imagine that, DUE its only present on arduino 1.x only
        but can ethernet shield used on aruino mega be use on due ?
        i know it takes time to recompile the whole code to the new arduino, is this part of your future projects ?
        please send me an email at vjandresc4 at i would like to ask you a few more things …


      • Source :

        If you have a due, let me know! 🙂


        This SCRIPT allows you to use arduino with ethernet shield or wifi shield and recieve artnet data. Up to you to use channels as you want.

        Tested with Arduino 1.0.3, so this code should work with the new EthernetUdp library (instead of the depricated Udp library)

        If you have implemented ameliorations to this sketch, please, contribute by sending back modifications, ameliorations, derivative sketch. It will be a pleasure
        to let them accessible to community

        For VVVV patchers, please think to put a mainloop node in your patch: minimum frame rate is 40fps with bulbs. But do not go too much higher ( max 100 fps).

        This sketch is part of white cat lighting board suite: /
        wich is sending data to many different types of devices, and includes a direct communication in serial also with arduino likes devices
        you may find whitecat interresting because its theatre based logic ( cuelist and automations) AND live oriented ( masters, midi, etc)

        Original code by (c)Christoph Guillermet

        V3, modifications by David van Schoorisse
        Ported code to make use of the new EthernetUdp library used by Arduino 1.0 and higher.


        #include // needed for Arduino versions later than 0018
        #include // UDP library from: 12/30/2008
        #define short_get_high_byte(x) ((HIGH_BYTE & x) >> 8)
        #define short_get_low_byte(x) (LOW_BYTE & x)
        #define bytes_to_short(h,l) ( ((h <art_net_header_size && packetSize<=max_packet_size)//check size to avoid unneeded checks
        if(packetSize) {
        Serial.print("Packet received! (size: ");
        Serial.print(") \n");

        IPAddress remote = Udp.remoteIP();
        remotePort = Udp.remotePort();,UDP_TX_PACKET_MAX_SIZE);

        //read header
        for (int i=0;i<7;i++) {
        //if not corresponding, this is not an artnet packet, so we stop reading
        if(char(packetBuffer[i])!=ArtNetHead[i]) {

        //if its an artnet header
        if(match_artnet==1) {
        //artnet protocole revision, not really needed

        //sequence of data, to avoid lost packets on routeurs

        //physical port of dmx N°

        //operator code enables to know wich type of message Art-Net it is

        //if opcode is DMX type
        if(Opcode==0x5000) {

        //if opcode is artpoll
        else if(Opcode==0x2000) {
        //( we should normally reply to it, giving ip adress of the device)

        //if its DMX data we will read it now
        if(is_opcode_is_dmx=1) {
        //if you need to filter DMX universes, uncomment next line to have the universe rceived
        //incoming_universe= bytes_to_short(packetBuffer[15],packetBuffer[14])

        //getting data from a channel position, on a precise amount of channels, this to avoid to much operation if you need only 4 channels for example
        //channel position
        for(int i=channel_position-1;i< number_of_channels;i++) {
        buffer_dmx[i]= byte(packetBuffer[i+17]);
        }//end of sniffing

        for(int k=6; k<9; k++) {
        Serial.print(", ");

        //stuff to do on PWM or whatever

Responder a Andres Cancelar respuesta

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *