Home > Electronica, Technologie > DMX lightcontrol using FPGA and RS-232 to DMX converter (part 2)

DMX lightcontrol using FPGA and RS-232 to DMX converter (part 2)

The last month I’ve been working hard on my last assignment for my Technical Information Sciences education. The project consists of a DMX light controller built on a Altera DE2 board. It uses an RS-232 to DMX converter so I don’t need to deal with the actual DMX protocol. I focused on building a user interface wherein the user will be able to add devices and connect devices to built in chasers. The project also helps me improving my C programming skills. I found out that programming in C requires a completely different mindset compared to the programming languages I’m more familiar with. In Java, Perl or PHP, the languages I’ve more experience with, I don’t need to deal with memory allocation for example. Apart from Perl I never used pointers in my software. In C I needed pointers many times. It’s a completely different experience, but I enjoy it. The only things I needed was a good C reference manual, a lot of coffee and a quiet room to study. An important pitfall which I had to avoid is “Going too fast and willing to make things too fancy”. This makes the software too complex for my, still developing C skills. I had to keep it simple. Take it easy, learn from others and do small assignments and tests before implementing functionality in the final product.

Now the project is almost finished. I enjoyed developing my C programming skills as well as working with the Altera DE2 board and DMX controlled lights. Like I mentioned in my first post about this project, setting up a proper NIOSII core was a real challenge. I’m glad that I managed to get it working.

Like I said, the software works with devices and chasers. These objects are stored in arrays of structs. A device has a name, start address and a number of channels. Chasers consist of a name, active flag, reference to devices used by the chaser (array of device objects) and a number of required devices. The chasers itself are defined and initialized in code. It was simply too much work to build a system wherein the user can build his own chasers. However, the system can easily be expanded by such functionality. Devices can be added by the user. The menu provide this option by letting the user enter a device name, start address and number of channels. Devices can be connected to chasers in the ‘Chaser’ menu.

I can probably tell a lot more about the setup and code behind the system, but I thing a short video is a much better solution. Sorry for the bad quality. Phone camera…

I called the system ‘DMX Master’. There’s no reason for that other than that I liked it :). The pushbuttons are located on the right part of the DE2 board. C stands for return, M for menu or enter and the < and > buttons… well that’s obvious. Scrolling through the menu only works from right to left. I didn’t had enough time to implement the other direction as well. The most left switch is the reset switch. This one should be enabled at all time. 4 Chasers are built in at the moment which can be set by enabling switches 1 to 4. The fifth switch starts the selected chaser.

Post to Twitter

Categories: Electronica, Technologie Tags: , , , , , ,
  1. No comments yet.
  1. No trackbacks yet.