pacmunchkin Posted September 23, 2010 Share Posted September 23, 2010 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 More sharing options...
boatman Posted September 23, 2010 Share Posted September 23, 2010 Google is a very useful tool. There's a mountain of DMX homebrew websites out there. Here's a couple to start you off: http://www.dmx512-online.com/ http://sourceforge.net/projects/semitone/files/ Link to comment Share on other sites More sharing options...
Wol Posted September 23, 2010 Share Posted September 23, 2010 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 More sharing options...
Shez Posted September 23, 2010 Share Posted September 23, 2010 I've got a copy of the DMX standard kicking about somewhere; let me know if there's any particular data from it that would be useful to you. Link to comment Share on other sites More sharing options...
dbuckley Posted September 23, 2010 Share Posted September 23, 2010 Also check out Big Clive's site; he's got some RGB LED stuff on there. Link to comment Share on other sites More sharing options...
KevinE Posted September 23, 2010 Share Posted September 23, 2010 Most small DMX fixtures these days use a PIC or Atmel / Philips etc clone, and an RS485 receiver, that's about it. Im sure a PIC DMX subroutine can be found on the net somewhere if you want to save a bit of fiddling. Link to comment Share on other sites More sharing options...
peternewman Posted September 23, 2010 Share Posted September 23, 2010 The old Response Box LED pixels had some stuff including source code available, have a look here and here. Link to comment Share on other sites More sharing options...
DrV Posted September 24, 2010 Share Posted September 24, 2010 If you're starting PIC programming from scratch you could do a lot worse than "Easy Microcontrol'n" by David Benson. There is also some stuff on PWM programming on the MicroChip web site Dave Link to comment Share on other sites More sharing options...
Modge Posted September 24, 2010 Share Posted September 24, 2010 There is also some stuff on PWM programming on the MicroChip web siteAnd indeed sample DMX Receiving (Receiving starts on page 7) application: http://ww1.microchip.com/downloads/en/AppNotes/01076A.pdf Link to comment Share on other sites More sharing options...
kitlane Posted September 24, 2010 Share Posted September 24, 2010 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 More sharing options...
gyro_gearloose Posted September 24, 2010 Share Posted September 24, 2010 I'm glad you find my code and circuit diagram useful. Heres a couple of pictures of an LED light that I made. http://i157.photobucket.com/albums/t41/gyro_gearloose/PICT0002.jpghttp://i157.photobucket.com/albums/t41/gyro_gearloose/PICT0001.jpghttp://i157.photobucket.com/albums/t41/gyro_gearloose/PICT0003.jpg 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 More sharing options...
nickjones Posted September 24, 2010 Share Posted September 24, 2010 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. Link to comment Share on other sites More sharing options...
boatman Posted September 24, 2010 Share Posted September 24, 2010 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 More sharing options...
dbuckley Posted September 24, 2010 Share Posted September 24, 2010 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 More sharing options...
Tomo Posted September 26, 2010 Share Posted September 26, 2010 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.