Jump to content

Making my own LED fixture


Recommended Posts

I am currently doing an NC in Electrical Engineering and as part of the course we have to do a project. I was thinking about building, from scratch, my own LED fixture that will connect to the desk through DMX, in order to implement a 3 colour system.


I have read This Thread, which has given me a head start, but I was just wondering where the information on the programming comes from.

Do I need to buy a copy of the standard to get started with this project?

Are there any books that you guys would recomend, or sites that I can look at that will start me off in the right direction?

Link to comment
Share on other sites

If you're going to be coding from scratch:


From the dmx512-online site: http://www.dmx512-online.com/gifs/dmxpack.gif < That picture in particular is pretty much what you're working to. For a fixture, youll need DMX reception which is a bit tricker, as you're having to sync with some other data stream. Dependent on the architecture you're using, youll usually have a nice UART which will do most of the hard work for you. the 250kbaud rate is not too hard to achieve on most low range UARTs.


The trick is making sure that you can do DMX reception as unobtrusively as possible in the code as to not screw around with the PWM. If you're using a UART, then this is usually really easy as you just get an interrupt for each byte you receive which you can discard, or handle. You only have three bytes to work to for RGB LED stuff, so don't have to faff around with massive arrays, and copying the DMX frames around.


my 2p anyway!

Link to comment
Share on other sites

Beware of the code on the Microchip site, it isn't always correct. If you want to use a different PIC from the one that the code is written for you may have to hack the code a bit as the instruction sets may be different. (I think the code that most people use is for the 18F24J10.


You could look at "Control Freak" by Wayne Howell and "Practical DMX" by Nick Mobsby

Link to comment
Share on other sites

I'm glad you find my code and circuit diagram useful. Heres a couple of pictures of an LED light that I made.






The housing is just a piece of aluminium channel I found on ebay. The LED boards are nothing more than some stripboard sprayed black. The LEDs are arranged so that any triangle of three LEDs is red, green, and blue. This seems to cut down, but not eliminate, the colour fringing you often get with this style of LED array.


Something to bear in mind with cheap LEDS is that they will vary from batch to batch. The beam angle varies on both of my lights, and the red LEDs on the second unit were actually made with the semiconductor material the wrong way round. Usually one leg is longer to indicate the polarity. Not so in my case. The anode was the cathode, and vice versa. I did not find this out until after I'd soldered nearly 50 of them in place!!


The driver board is also made from stripboard. The MOSFETs are logic-level chips which can be driven directly by a microprocessor. They are massively over-specced for this application though and could, with the addition of a heatsink, handle hundreds of LEDs. They were cheap though.


I've also made another light which uses two TLC5940 driver chips to drive 10 RGB Piranha LEDs. It allows RGB control over each LED and looks quite good. Its no use at illuminating anything but does make for some good eye-candy. If I made another 19 of them I could make a really low-res video wall ;)

Link to comment
Share on other sites

I'm a big fan of PICs for projects like this. Combined with a few transistors and a Max485 transistor you are ready to go. Check out this for more info on receiving DMX.


For this particular project an Atmel ATmega48/88/168 would be far more appropriate as it has four 8-bit and two 16-bit PWM hardware modules which will free run and require no intervention by the processor. A bit harder to program in assembler it's true.

Link to comment
Share on other sites

The ideal chip for this is the Parallax Propellor; its a 40 pin chip, and you can do PWM on all I/O pins simultaneously. You'll need to lose a few for adressing switches and DMX input, but otherwise its outputs all the way. Its also easy to programme in a high level language, and cheap to get into.


Have a look here, in particular, check out the video.

Link to comment
Share on other sites

To be honest, first of all please check with your tutor.


As this is an educational project, it's got to meet certain difficulty and course requirements.

This is actually the most important aspect, as you've got to pass the course - ideally with the maximum available credit!


DMX reception of three channels driving 3 PWM outputs may not be 'hard' enough, particularly as there are app notes including (just about) working code and hardware available from several microcontroller manufacturers!


- Although the example code in the Microchip app note is (likely deliberately) quite hideous, with a lot of incorrect assumptions and nasty failure modes.


In terms of books, a very good one is "Recommended Practice for DMX512 (2nd Edition)" by Adam Bennette, published by USITT/PLASA.

- You can get this from http://www.lsionline.co.uk/books/?k1o9ln for £10.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.