Receive DMX-512 with an Arduino

Part I: Prologue

arduino

Shiny and new out of the box!

Prologue: For Christmas, I received an Arduino.  If you’re not familiar with them, they’re like a little computer with a lot of pins to which you can connect outputs like LEDs, servos, relays, triacs, or anything you’d want to control, as well as photosensors, switches, anything you’d want to take an input from.  You write your program in the easy-to-learn Arduino environment, upload it to the Arduino board, and it’ll run your program automagically.  I’m not a programmer, but less than an hour after taking it out of the box I had it blinking an LED for me.  Buy one, they’re perfect for all of us who are trying to create some Theater Magic with no money or hope of getting any.

Well, Almost Perfect.  There’s been a way to send DMX with an Arduino for awhile, but when I started poking around for DMX reception code, I came up with zilch.  If you’re already savvy with microcontrollers and assembly code and avrdude and whatever-the-fuck-else, you probably know about this solution.  Me, I look at assembly code and I just hear a dull screaming in my head, nevermind all that other stuff that I don’t know how to do either.

So I figured that a great first project would be to remedy this situation, and write a program to receive DMX on the Arduino platform.  In the way of all Works in this Vale of Tears, this ended up being much more difficult and taking much longer than I initially anticipated.  But eventually I figured it all out, and so here it is!

Features:

  • In-the-field addressing from 1 to 512 via two tact switches (works with the previously released I/O Shield, here).
  • Address is stored in non-volatile EEPROM, so it is retained when power is lost to the Arduino.
  • Addressing hardware allows full use of the pins.
  • Number of addresses to receive is configurable.
  • Works with controllers that send less than the full 512 address set.
  • Break detection is done correctly by detecting a Low value of >88μS per ANSI E1.11-2008, rather than the frame error hack used by many devices.
  • Uses interrupt-based subroutines to eliminate processor-load related timing problems.
  • If the DMX data signal is lost, the Arduino will maintain the current state until new values are received.
  • The reception and user code run sequentially rather than at the same time, so they won’t interfere with each others’ timing.

Continue to Page 2 for Download and Instructions…

You Will Need:

  • A copy of the latest release and the modified wiring_serial.c or HardwareSerial.cpp file.  See the instructions for what to do with the files.
  • An Arduino with an Atmega168 processor (such as the latest Duemilanove version).  Because of the timing-sensitive nature of DMX-512, some of the code had to be optimized by referring to particular registers on the Atmega168.  The code can easily be adapted to other processors, though.
  • An RS-485 to Serial Transceiver, such as the MAX485 or the TI 75176.  They’ll run you about $1, the MAX485 is a little more but it apparently has some kind of fancy overvoltage protection, so I used that.
  • A breadboard and some wires, also a 150Ω resistor to terminate the DMX line if necessary.

Instructions:

DMX uses a twisted pair of signal wires with opposite polarity to transmit information per RS-485.  However, your Arduino needs a serial signal, with a pin brought high for one and low for zero.  To convert between these protocols, you’ll need to wire up your MAX485 or 75176 in the following way:

Schematic Rev2

Here are some pictures which may help you:

The prototype from the left.

The prototype from the left.


The prototype from the right.

The prototype from the right.

Note 1: Starting with Rev11 of the software, I adjusted the pin layout slightly for better routing on the DMX I/O Shield.  The two gray wires in the above photos that are plugged into pins 3 and 4 should be plugged into pins 2 and 3, respectively, if you’re using the latest software.

Note 2: I’m using the Arduino protoshield here, which I highly recommend, they’re handy.  If you don’t have one, the pin layout is the same as if you ran directly into the Arduino board.

Note 3: if you want to retain the use of pins 1, 4, and 5, at the cost of being able to transmit as well as receive, you can connect the corresponding pins on the MAX485 to the ground on the Arduino board.  I’ve done it this way for possible future RDM functionality ;).

One Dumb Hack is necessary: rename your currently installed HardwareSerial.cpp file to HardwareSerial.cpp.backup, and put the modified HardwareSerial.cpp from this site in the same directory.  It’s located in:

(Arduino Install Directory)/hardware/cores/arduino/

The reason for this is that the Arduino software defines the USART_RX_vect serial reception interrupt, and includes it in your compiled code, even if you don’t use any serial functions.  This will, I hope, be fixed in a future release, but until it is this is the work-around.  You can read more about the issue here.  Once you’ve uploaded the sketch and it’s working to your satisfaction, you can undo this part to regain your normal serial library functionality.

Finally, fire up the Arduino software, and put what you want the Arduino to do with the received values in the action() loop. The received values are stored in the dmxvalue[] array. The downloaded sketch contains example code to print out each of the values to the serial port, and set PWM pins 5 and 6 to the first and second value in the array, respectively, but this can of course be changed to anything you want.

That’s it, let me know how it works for you!  You may want to keep reading for the Known Limitations, etc.

Known Limitations:

  • Atmega168 and Atmega328 based processors only (you will have to rename the registers and interrupt vectors if you want to use it for another processor).
  • Currently only tested with a USB-DMX Pro controlled via Lightfactory and MagicQ software, since that’s what I could get my hands on.  But it handles a variety of frame rates, break lengths, etc. just fine.  If you’re in the Portland area, and you’d like to let me test it with other controllers, drop me a line.  Also, if you use it with other controllers, let me know how it turned out.
  • Because I needed access to exact timing, I had to use the Timer2 functionality, so pins 3 and 11 cannot be used for PWM.  This is also the most frequent cause of incompatibility problems when using community-developed libraries.  See the comments for remedies if you’re affected by this.
  • Will not detect bad addressing.  For example, with it set to receive the default 8 channels, “dmxaddress=510;” would give you two good channels and six channels of junk.  Or ”dmxaddress=50;” when only 55 addresses are sent by the controller.  Edwin Dolby at Laser Productions had an elegant idea to address this, namely that you could use the constrain function to map out of bounds values to the correct 0-511 range.  However, I have decided not to implement this by default, as without some kind of numerical readout I think the values should just be set to what you set them.  But, easy to implement if you decide you want it!
  • When addressing, sometimes when you hit the 0 or 1 switch it doesn’t take.  I’ve programmed the LED to turn off briefly if the bit was successfully entered, so if you don’t see it go off, you’ll have to hit the switch again until it takes.  I don’t know why it’s doing this, if you have some time to wade through the logic let me know why and I’ll update the code.

Future Development:

  • Add a dip switch and code to allow in-the-field addressing.
  • Reduce the number of Atmega168-specific functions to improve code portability.
  • Design a shield for better durability, signal pass-through, termination, etc. Check here!


  • Add frame error and data overrun error handling routines.
  • Add bad start address value detection, based on the number of frames received (so if you set the start address to 50, and the number of addresses to 10, but only 55 DMX slots are being sent by the controller, the error will be indicated by the pin 13 LED).
  • Add RDM functionality.
  • Develop a separate DMX monitor application.

Release History and Notes:

  • 23 June 2010: Rev14
    • Tested and working with IDE version 0018.
  • 9 July 2009: Rev13
    • Tested and working with IDE version 0016.
    • The number of channels to receive is now easily user-configurable.
    • Replaced static variables with #define statements for memory optimization (+48 bytes, woot!).
  • 12 May 2009: Rev12
    • In-the-field addressing via two tact switches (works with the previously released I/O Shield, here).
    • Address is stored in non-volatile EEPROM, so it is retained when power is lost to the Arduino.
    • Addressing hardware allows full use of the pins (which is why I didn’t use the more conventional dip switch setup).
    • Some of the variables were localized, since the sketch is now getting pretty complex.
  • 27 April 2009: Rev11
    • Adjusted pin layout for better routing on the DMX I/O Shield.  Pins 3 and 4 in Rev10 are now pins 2 and 3, respectively.
  • 1 April 2009: Rev10
    • Cleaned up and improved code commenting.
    • Adjusted HardwareSerial.cpp (included) so the code will compile on Arduino software release 0015.  If you’re still using 0014 or 0013, you’ll replace wiring_serial.c instead (also included).
    • Replaced manual register configuration of the USART with the Arduino function serial.Begin(250000), which apparently works just as well and reduces the number of Atmega168-specific register calls considerably.
    • Moved the action() loop (what you want the Arduino to do with the received values) to its own tab, to make the code easier to use.
  • 20 March 2009: Rev09
    • First release
  • Rev00-Rev08: Pre-release betas.

The Code: Here is the .pde sketch file.  It may be of general interest as well if you’re trying to write interrupt-based programs for the Arduino.  In the download, there is also a tab for the user code and another for in-the-field addressing module.

[cc]

/***********************************************************
* DMX-512 Reception                                        *
* Developed by Max Pierson                                 *
* Version Rev13 9 July 2009                                *
* Released under the WTFPL license, although I would       *
* appreciate Attribution and Share-Alike                   *
* See blog.wingedvictorydesign.com for the latest version. *
************************************************************/

/******************************* Addressing variable declarations *****************************/

#include
#define NUMBER_OF_CHANNELS 8
//the number of channels we want to receive (8 by default).

#define SWITCH_PIN_0 11 //the pin number of our "0" switch
#define SWITCH_PIN_1 12 //the pin number of our "1" switch
unsigned int dmxaddress = 1;
/* The dmx address we will be listening to.  The value of this will be set in the Addressing()
*  function, if triggered, and read from EEPROM addresses 510 and 511.

/******************************* MAX485 variable declarations *****************************/

#define RECEIVER_OUTPUT_ENABLE 2
/* receiver output enable (pin2) on the max485.
*  will be left low to set the max485 to receive data. */

#define DRIVER_OUTPUT_ENABLE 3
/* driver output enable (pin3) on the max485.
*  will left low to disable driver output. */

#define RX_PIN 0   // serial receive pin, which takes the incoming data from the MAX485.
#define TX_PIN 1   // serial transmission pin

/******************************* DMX variable declarations ********************************/

volatile byte i = 0;              //dummy variable for dmxvalue[]
volatile byte dmxreceived = 0;    //the latest received value
volatile unsigned int dmxcurrent = 0;     //counter variable that is incremented every time we receive a value.
volatile byte dmxvalue[NUMBER_OF_CHANNELS];     //stores the DMX values we're interested in using.
volatile boolean dmxnewvalue = 0; //set to 1 when new dmx values are received.

/******************************* Timer2 variable declarations *****************************/

volatile byte zerocounter = 0;
/* a counter to hold the number of zeros received in sequence on the serial receive pin.
*  When we've received a minimum of 11 zeros in a row, we must be in a break.  As written,
*  the timer2 ISR actually checks for 22 zeros in a row, for the full 88uS break.       */

void setup() {

  /******************************* Max485 configuration ***********************************/

  pinMode(RECEIVER_OUTPUT_ENABLE, OUTPUT);
  pinMode(DRIVER_OUTPUT_ENABLE, OUTPUT);
  digitalWrite(RECEIVER_OUTPUT_ENABLE, LOW);
  digitalWrite(DRIVER_OUTPUT_ENABLE, LOW);    //sets pins 3 and 4 to low to enable reciever mode on the MAX485.

  pinMode(RX_PIN, INPUT);  //sets serial pin to receive data

  /******************************* Addressing subroutine *********************************/

  pinMode(SWITCH_PIN_0, INPUT);           //sets pin for '0' switch to input
  digitalWrite(SWITCH_PIN_0, HIGH);       //turns on the internal pull-up resistor for '0' switch pin
  pinMode(SWITCH_PIN_1, INPUT);           //sets pin for '1' switch to input
  digitalWrite(SWITCH_PIN_1, HIGH);       //turns on the internal pull-up resistor for '1' switch pin

  byte switch1 = 0;
  byte switch0 = 0;  //the switch states for the 1 and 0 pin
  switch0 = digitalRead(SWITCH_PIN_0);
  switch1 = digitalRead(SWITCH_PIN_1);

  if (switch0 == 0 || switch1 == 0)
  {
  Addressing(switch0, switch1);
  //call the addressing subroutine if either switch is pressed.
  }

  //read the previously stored value from EEPROM addresses 510 and 511.
  dmxaddress = EEPROM.read(511);   //read the high byte into dmxaddress
  dmxaddress = dmxaddress << 8;   //bitshift the high byte left 8 bits to make room for the low byte   dmxaddress =  dmxaddress | EEPROM.read(510);   //read the low byte into dmxaddress   dmxaddress = dmxaddress + 3;   /*  this will allow the USART receive interrupt to fire an additional 3 times for every dmx frame.   *   Here's why:   *   Once to account for the fact that DMX addresses run from 0-511, whereas channel numbers   *        start numbering at 1.   *   Once for the Mark After Break (MAB), which will be detected by the USART as a valid character   *        (a zero, eight more zeros, followed by a one)   *   Once for the START code that precedes the 512 DMX values (used for RDM).  */   /******************************* USART configuration ************************************/   Serial.begin(250000);   /* Each bit is 4uS long, hence 250Kbps baud rate */   cli(); //disable interrupts while we're setting bits in registers   bitClear(UCSR0B, RXCIE0);  //disable USART reception interrupt   /******************************* Timer2 configuration ***********************************/   //NOTE:  this will disable PWM on pins 3 and 11.   bitClear(TCCR2A, COM2A1);   bitClear(TCCR2A, COM2A0); //disable compare match output A mode   bitClear(TCCR2A, COM2B1);   bitClear(TCCR2A, COM2B0); //disable compare match output B mode   bitSet(TCCR2A, WGM21);   bitClear(TCCR2A, WGM20);  //set mode 2, CTC.  TOP will be set by OCRA.   bitClear(TCCR2B, FOC2A);   bitClear(TCCR2B, FOC2B);  //disable Force Output Compare A and B.   bitClear(TCCR2B, WGM22);  //set mode 2, CTC.  TOP will be set by OCRA.   bitClear(TCCR2B, CS22);   bitClear(TCCR2B, CS21);   bitSet(TCCR2B, CS20);   // no prescaler means the clock will increment every 62.5ns (assuming 16Mhz clock speed).   OCR2A = 64;   /* Set output compare register to 64, so that the Output Compare Interrupt will fire   *  every 4uS.  */   bitClear(TIMSK2, OCIE2B);  //Disable Timer/Counter2 Output Compare Match B Interrupt   bitSet(TIMSK2, OCIE2A);    //Enable Timer/Counter2 Output Compare Match A Interrupt   bitClear(TIMSK2, TOIE2);   //Disable Timer/Counter2 Overflow Interrupt Enable             sei();                     //reenable interrupts now that timer2 has been configured.  }  //end setup() void loop()  {   // the processor gets parked here while the ISRs are doing their thing.    if (dmxnewvalue == 1) {    //when a new set of values are received, jump to action loop...     action();     dmxnewvalue = 0;     dmxcurrent = 0;     zerocounter = 0;      //and then when finished reset variables and enable timer2 interrupt     i = 0;     bitSet(TIMSK2, OCIE2A);    //Enable Timer/Counter2 Output Compare Match A Interrupt   } } //end loop() //Timer2 compare match interrupt vector handler ISR(TIMER2_COMPA_vect) {   if (bitRead(PIND, PIND0)) {  // if a one is detected, we're not in a break, reset zerocounter.     zerocounter = 0;     }   else {     zerocounter++;             // increment zerocounter if a zero is received.     if (zerocounter == 22)     // if 22 0's are received in a row (88uS break)       {       bitClear(TIMSK2, OCIE2A);    //disable this interrupt and enable reception interrupt now that we're in a break.       bitSet(UCSR0B, RXCIE0);       }   } } //end Timer2 ISR ISR(USART_RX_vect){   dmxreceived = UDR0;   /* The receive buffer (UDR0) must be read during the reception ISR, or the ISR will just   *  execute again immediately upon exiting. */   dmxcurrent++;                        //increment address counter   if(dmxcurrent > dmxaddress) {         //check if the current address is the one we want.
    dmxvalue[i] = dmxreceived;
    i++;
    if(i == NUMBER_OF_CHANNELS) {
      bitClear(UCSR0B, RXCIE0);
      dmxnewvalue = 1;                        //set newvalue, so that the main code can be executed.
    }
  }
} // end ISR

[/cc]

Go to Section:

  1. Part I: Prologue
  2. Part II: Instructions
  3. Part III: Known Limitations, Notes, and the Code
  4. View All

Pages: 1 2 3


77 Responses to “Receive DMX-512 with an Arduino”

  • dmtry Says:

    Hi. Very interesting project thanks! can be used in various applications. I would like to add encoder and managed using several DMX channel setting motor speed and position

  • Daniel Kendell Says:

    Firstly, thanks and well done for cracking this, I’ve wanted to be able to add DMX to my lighting projects for a long time now but sussing it out myself is currently beyond my ability. I’m totally building one of these! :D

    Something I’m unsure about though, Rapid Electronics don’t have a “MAX485″, but they do have “MAX485CPA+” and “MAX485CSA+”. Are either of those suitable for this? I don’t know what the difference is.

    Thanks again for publishing your work,
    Dan

  • Max Says:

    Hi Daniel,
    The difference is the package. The CPA is a through hole package, whereas the CSA is the surface mount. You’ll want the CPA. Best of luck with your project!

  • DDD Says:

    Hi there,

    Any update on the code? Will there be a future version that does not need to modify the Arduino lib?

  • Ed Says:

    Incredible work!
    I am having trouble getting things to work for me.
    I am using Arduino 0017.
    Do you have any more recent builds of your project?
    Thanks so much!

  • Max Says:

    Hi All,
    I will put together an update for IDE 0017 or verify that the current version works. If you don’t want to wait, you could just take a look at what I’ve done to the hardware.cpp file and do the same to the IDE 0017 version.

    Note that the hack to the Arduino library files is necessary due to code on the Arduino side, not my software, so I have no control over when/if this will be fixed.

  • BlueFusion Says:

    For everyone else using 0017:
    The mod you need to make to the hardwareserial.cpp is this:

    Change line 115 from:
    uint8_t rxen, uint8_t txen, uint8_t rxcie, uint8_t udre)

    to:

    uint8_t rxen, uint8_t txen, uint8_t rxcie, uint8_t udre, uint8_t u2x)

    and it should compile.

  • David Says:

    The fix given by BlueFusion does work. One note for a little more clarity: you should do this as an additional modification in the already modified hardwareserial.cpp file (the one included in the download from this site).

    Thanks anyway for the work already done on this, I will be constructing a centerpiece for a disco with this which will have 8 pinspots, mirrors and servo’s! (and maybe we will abuse it every now and then with our band :))

  • James Corbett Says:

    Can your modifications send and receive or not?

  • Gregory Haley Says:

    Doing research.
    Looking for a solution.
    I Need to manipulate 2000+ 3w-5w LED’s for my art project.
    http://www.TheBallofLight.com
    Your project seems like it would allow for it. Each of the 2000 lights would need to be able to be driven by a central DMX console. As I read each of your units can manipulate 512 individual lights. That sounds astounding. That would mean I would need to make only 4 of these units. That would also mean 4 Universes I believe. I think I would also need 4 optical splitters to lead to these units. Then back to the Console.

    I have many questions on this topic and am just getting started on a two and half year project.

    If you are interested at all interested I would love to tell all and pick your brain some you seem extremely knowledgeable on this subject.

  • Max Says:

    I actually would not use DMX for this application– I would try to get your LEDs to take a video input. That way, you’ll be able to program it from a VJ software (such as Arkaos, there are dozens) rather than a theatrical lighting console, which will give you a more intuitive and flexible programming paradigm. Also, I would try to source your LED drivers from commercially available hardware such as the driver boards for LED billboards. By the time you buy the components for 2,000 DIY drivers, you won’t be saving any money, and the soldering involved gives me the creeping horrors. I mean, why spend all your time reinventing the wheel, when you could be focusing on the art? My $.02

  • Michael O'Keefe Says:

    This is amazing! I’m trying to build a DMX-controlled moving light, and your code should be very helpful! However, in Arduino 0018, the project won’t compile: it says “(location)/HardwareSerial.cpp:185: error: no matching function for call to ‘HardwareSerial::HardwareSerial((ring_buffer*, volatile uint8_t*, volatile uint8_t*, volatile uint8_t*, volatile uint8_t*, volatile uint8_t*, int, int, int, int)’”. I’ve tried the modification suggested by BlueFusion, which fixed another compiler error but not this one. Any suggestions for an Arduino 0018 user?

  • lampmaker Says:

    I’m having a hard time getting this code to work on my arduino mega, IDE 0018.
    Additional problem is that I want it to connect to serial3, so I have serial available to talk to the PC.
    With some simple code, I can detect (and copy) data received on serial3 to serial0, so all electronics work nicely. I just can’t get this DMX program to work, and I have no clue what all the timer configurations etc, hacks to harwareserial, etc mean…

  • Kieren Says:

    lampmaker, how did you get it to work on a mega? I have tried for ages bu no matter what i do all i get is errors

  • Grody Says:

    I am likewise unable to compile this on 0018. Game over.

  • Dave Cole Says:

    Hi: I want to build a DMX-driven 8*8 LED array and was hoping to use your code and a TLC5940 (using the http://students.washington.edu/acleone/codes/tlc5940arduino/html_r8/ library) but your library and their library use the same pins (specifically 3 and 11). Is there a way to move those functions to other pins?

    Also, I’m trying to compile under IDE 0018 and even with the Bluefusion mods to hardwareserial.cpp it comes up with errors (it’s still complaining about that line 115).

    Thanks.

    \dmc

  • Max Says:

    Hi Dave,
    That might be do-able. You’ll need to move either my DMX code or the tlc5940 clock timer over to timer1. See the discussion in earlier comments about timers and trying to output two data protocols at the same time. As I understand it, the TLC5940 has an asynchronous serial input, so it doesn’t need constant updates, all the time, right?

  • Dave Cole Says:

    Max: Thanks for your thoughts.

    In my application I won’t be needing to do RDM, so I won’t need the timer on Pin 3 … it’s just the Pin 11 timer I’ll need to move (and the guy who wrote the tlc5490 library isn’t interested in telling me how to move his pins around).

    I’m still learning about the 5940, so I can’t say yet whether it’s asynch or synch … when I get more eddiecated on the topic, I’ll be back.

    Also, I tried downloading IDE 0017 and moving in the new HardwareSerial.cpp with Bluefusion’s mods and the sketch still won’t compile …

    Thanks again.

    \dmc

  • Grody Says:

    I think I might’ve figured out this whole 0018 issue. All I did was comment out the section of code in the IDE-native HardwareSerial.cpp that was commented out in the version provided here, and now it at least appears able to compile. I haven’t tried getting it to run on an Arduino yet.

  • Dave Cole Says:

    Grody: Just ran across your theory … tried it out and got this:

    >>error: no matching function for call to ‘HardwareSerial::HardwareSerial(ring_buffer*, volatile uint8_t*, volatile uint8_t*, volatile uint8_t*, volatile uint8_t*, volatile uint8_t*, int, int, int, int)’

    Thanks for your thoughts, though.

    \dmc

  • aususer Says:

    Gregory Haley: I say the suggested “feeding video” into that 2000 nodes will be “interesting” (say the least).
    But you might want to look at ARTNET or E1.31 for your driving protocols (rather than basic DMX512).
    Your backend/desk will need to support it of course, but it will get over you 512/universe limitations.
    There are examples you can have a look at where they are using > 3000 lights in an awesome christmastree driven by madrix: http://www.response-box.com/rgblights/ (be prepared to sell your kids to get one, and own a nuclear powerstation to light it of course ;).
    good luck!

  • Jay Says:

    I’ve got an interesting anomaly someone may have encountered — the outputted DMX values don’t map correctly from my input values. Here’s how they map:
    0 –> 254

    64 –> 2
    65 –> 254

    128 –> 2
    129 –> 254

    191 –> 2
    192 –> 254

    255 –> 2

    I’m sure it has something to do with my home-made el cheapo FTDI-based DMX transmitter, but my professional DMX lights don’t seem to mind. Any ideas where I should look to see if I can adapt the code? I’m running Arduino 0018, using the standard action() loop.

    Great software! Thanks!

  • Dave Cole Says:

    Success!

    In recent weeks I hadn’t bothered to read the text of the blog, just the comments and so I didn’t notice that Rev14 was out. That has solved all my problems.

    I am successfully processing a DMX signal (which is from a USB converter designed by a friend of mine that is still in beta).

    In my first few minutes of fiddling with the action loop, I found the need to make the output of the serial monitor more meaningful and neater. You can see my rewritten action loop and its output at

    http://www.dmcole.net/wp-content/uploads/2010/08/Arduino-DMX-receiver-Action.png

    Thanks so much Max. Now, on to the not insignificant process of making the serial chips work …

    \dmc

  • Siliconsoul Says:

    Hi,

    I came across this the other day and would like to ask you if you still have a copy of the code lying around somewhere although it shouldn’t be too difficult to implement an LCD and a rotary encoder.

    Would be great if you can share the code with us.

    Thanks.

    Sincerely,
    Siliconsoul.

  • Seb Says:

    Hi,

    Thanks for posting all this so beautifully. I am a LD from NY and have been using Arduino for some small scale embedded systems projects / mock ups. My next quest is to try and make a small, maybe 1′, LED strip light that is driven by an arduino and controlled by a dmx console. I am also new to code writing and my question is… once you get the Arduino to receive DMX what is the best way to map the dmx channel to a digital output?

    -seb

  • Max Says:

    Hi Seb,
    If your power needs are pretty minimal, you could just drive the LEDs directly via the PWM outputs. Otherwise, you’ll need the Arduino to output whatever the control protocol is for your LED drivers– probably 0-10V. Although, it doesn’t seem to me that you save any time/money here by building your own strip– there are RGB strips available at dirt cheap prices, e.g.:
    http://www.enttec.com/?main_menu=Products&pn=72001&show=description
    (or even Ikea!)

    The very best and highest performing RGB strips will run you in the $250/ft range, e.g.:
    http://www.lumenpulse.com/en/products.php?model=324
    But you won’t match the performance/durability of these commercial products unless you have the tooling and engineering skills to make good optical components (miniature lenses and reflectors) and thermally manage the diodes so they don’t overheat and burn out.

    I don’t want to sound discouraging because it sounds like a really fun project, but it’s a way to go if you decide you’d like to outsource some of it.

  • Erick Nava Aldana Says:

    New to Arduino and DMX, but recently buyed shield parts from CuteDigi, three questions:

    I have 3 pin led bars, its compatible?
    How to connect 3 to 5 and viceversa?
    Need to make any change on code(for 3 pin compatibility and/or atmega 328 Duemilanove)?

    Mani thanks, nice project!!!

Leave a Reply