Arduino DMX encoder on the test bench

Today I started testing my DMX project. The ingredients:

  • Arduino Duemilanove with Ethernet shield and DMX shield;
  • DMX decoder PX24500;
  • 24V PSU;
  • 6 x Artecta RGB LED;
  • some wires;
  • a sketch running on the Arduino;
  • UTP cable;
  • software tools.

After connecting all the wires, switching on the PSU, starting the Arduino and checking if the Arduino was succesfully connected to my LAN by pinging it, I was ready. I opened the Arduino IDE Serial Monitor so I could see what my sketch was doing and sent a “command” to the Arduino. For that I used wget, a non-interactive network retriever; most people who know Unix-like OS-es will probably know about its existence but it’s less known among the Windows folks. Well, in just a few words it’s a tool with which you can store the results of a HTTP call into a file and do all kinds of other handy stuff .

I started carefully; the first command sent to the Arduino was:

 wget 

What this should do is change the R-value from its current value to 10 in 0.5 (5*0.1) seconds. G and B values are set to 0 immediately.

What the  Arduino webserver will receive is the following:

 GET /10,0,0,5,0,0 HTTP 1.1

 ....etc, the rest is all standard HTTP headers

After parsing the request and figuring out what to do, the Arduino starts changing the LED colour by issuing DmxSimple commands according to the values received in the HTTP call.

Ok, the moment of truth is here… will the LEDs start producing light or not? Yeah, they did! Tadaa…

This is not Red (nor is it a pipe)

The moment I saw this working, I felt the need for a more sophisticated way to control the RGB values, so I wrote a small tool in Delphi to help me pick the right color:

ColorWheelToEthernet

With a mouse click I can now select the color; the rest is done automatically: calculating the R-, G- and B-value and performing the HTTP call. And all it took was 10 lines of code (with the help of Indy and a very nice Color Lib made by Marco Binic). This allows me to choose a color much quicker and more precise than by editing numeric values on a command line 😉

I did find some issues during my first DMX adventure, so I haven’t reached the phase yet where I can start digging holes in the ground; I’m not totally satisfied yet – more on those issues later, when I’ve hopefully fixed them.

 

Tagged , , . Bookmark the permalink.

6 Responses to Arduino DMX encoder on the test bench

  1. Dwain says:

    Hi Robert,

    Welk type kabel gebruik jij voor buiten vanuit de driver naar de LED. Is dat ook CAT kabel of gebruik je daar speciale (neopreen) kabel voor?

  2. MidnightCow says:

    Hi, Robert!
    I’m working at WIZnet provides Ethernet chip such as W5100, W5200, and W5500 to Arduino Ethernet or shield.
    Your post is a good example for Arudino Ethernet.
    So, Will I introduce your post on WIZnet Museum site (http://wiznetmuseum.com/).

    Thank in advance.

  3. MidnightCow says:

    Hi Robert!
    Thank for your sharing.
    I think you are very good blogger.
    WIZnet have launched new W7500 chip at May, 2015.
    W7500 integrated CortexM0, Hardwired TCP/IP core, and various peripharals. If you are interested in W7500, I will freely send WIZwiki_W7500 IoT Platform to you.
    Feel free to send a e-mails to me.
    Thank you.

    WIZwiki_W7500 : ARMembed Enable Platform (https://developer.mbed.org/platforms/WIZwiki-W7500/)
    Wiki : http://wizwiki.net/wiki/doku.php?id=products:wizwiki_w7500:start

    http://wizwiki.net/wiki/doku.php?id=products:w7500:start

Leave a Reply

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