Jump to content

DMX Hobby Controller


cdcarter

Recommended Posts

I am working on a little DMX controller that would just give 100% to one DMX channel at a time, in the form of a handheld unit. The device would function as a simple dimmer test unit for focusing instead of setting up the board. I have purchased a PIC hardware programmer, and I am trying to get a copy of the DMX512 specification. I was wondering if anyone has tried doing this and run into any problems etc...
Link to comment
Share on other sites

There are a fair number of DMX sites online. For example, this one: http://www.euro-pa.be/DMX.html pretty much covers DMX-512 in about 1 page (actually, the original spec wasn't really that much longer, and came bundled with the AMX 192 standard so you wouldn't feel completely ripped off about buying a copy).

 

It really is an amazingly simple spec. I've implemented it on quite a few different microcontroller families without any problems.

 

Good Luck,

-jjf

Link to comment
Share on other sites

You would probably be better off using a DMX chip and interfaceing that to the PIC. It depends on what PIC you are using but the resources required in the PIC to produce a propper DMX signal are quite high and so you are not left with many clock cycles to do other things.

 

Your other option is to use a DSP which is designed for this type of application.

 

However it is certainly possible to produce DMX from a PIC as I have done this in the past. I managed to make a simple four channel dimmer with a 16F84a. The a is very important in this case as it is the only 16F84 that you can run at 20MHz. You would have no chance with a normal 16F84. This was all quite a while ago though and I am sure that you can get much better PICs for the job now.

 

I would recomend that you get a decent C compiler as this will make your life allot easier.

 

Please also make sure that you get the line driver circuitry correct. There is a fair amount of filtering required that is often left out of most designs. Although it will kind of work the quick and simple way it will never work as well as doing it correctly. If you get a DMX chip then you will not need to get an RS485 line driver but if not then there are quite a few to choose from and some are allot better than others.

 

Good luck and if you get stuck get back on this forum.

Link to comment
Share on other sites

There is a battery powered controller on the market at the minute ...

 

Chris, excuse me but, I think you've missed the point of the original question. The device you reference will control ONLY channels 1 to 6, it does not have the facility to set a start address (it also has a three pin DMX outlet but let's not get into that discussion) The OP is wanting to build something which would step through all the dimmer channels in the rig for focussing. Unless it was a very small rig this device would not be useful.

Link to comment
Share on other sites

You would probably be better off using a DMX chip and interfaceing that to the PIC. It depends on what PIC you are using but the resources required in the PIC to produce a propper DMX signal are quite high and so you are not left with many clock cycles to do other things.

Not really true, so long as you choose the right PIC.

The 16F84 series is NOT the right chip for the job - I use a 16F767 as it has a fine selection of analogue input and digital I/O, Flash memory and an internal clock running up to 8MHz so I don't need an external crystal. I only need 4MHz for DMX use, so I run at 8Mhz to give me plenty of headroom.

 

DMX-512 is based on RS485, which in turn in similar to RS232 (the main difference is the line driver)

A PIC with built-in RS232 hardware will produce a logic-level DMX-512A signal with very little software overhead, especially if interrupt-driven.

You have to do a few clever bits with trapping errors and timers, but that's a mind problem, not a space problem.

Implementing RDM wouldn't be beyond possibility either, as it is a half-duplex standard.

 

Even if you choose not to use interrupts (they are a fairly advanced concept), you always have the 'break' to do all your local processing in - there is no stated maximum, although the longest time between packets is 1 second.

 

You'll then need a suitable line driver - the SN75176B is the cheap, industry-standard chip. It doesn't do opto-isolation, but isolated transmitters are considered 'non-preferred' by the standard.

Connect DMX Pin 1 directly to circuit ground and the case (if metal) on your transmitter, and that complies - you aren't allowed resistances greater than 100 ohm to circuit ground or 20 ohm to case.

RF-bypass capacitances are suggested for isolated tx/rx units, otherwise no filters are wanted.

Link to comment
Share on other sites

You would probably be better off using a DMX chip and interfaceing that to the PIC...

I had no idea that there was such a thing as a DMX 'chip'! I've implemented a DMX specific UART in programmable logic, and I've done DMX transmit with basic bit banging, but an RS-485 stream of bytes with no check sum and no error checking just doesn't seem like it warrant a specilized peripheral. It can be nice to use UARTs with good FIFOs - ie, instead of servicing DMX 1 byte at a time, write 64 bytes at a time (or whatever) to the UART each interrupt.

 

But still, I can recall doing a DMX transmit using an original 8032. At 12 MHz, that had a 1 uS instruction cycle (1 mip), but the built in UART could only do DMX baud rate with an 8 MHz clock. At 8 Mhz, you only have 29 instructions per DMX byte (instead of 44), but the interrupt is just moving data. I'd have to dig up the old code, but I know that I had enough CPU time left to drive a display, scan a keypad and do some master faders (which is at least a MUL AB and a shift).

 

I'm also not aware of any filtering left out of 'most' designs. Could you be more specific? A few consoles incorrectly attach earth ground at the connector, but 'filtering'? Additional passives on the differential side of an RS-485 specific tranceiver (or RS-422 transmitter/receivers) would seem counter productive. The exception being the bias bridge required for RDM (if it is ever ratified).

 

Call me old fashioned, but a good ol' SN75176 attached the the USART of the PIC seems a lot simpler and efficient than simulating a bus on the PIC to interface to some other, presumably single sourced, peripheral.

 

-jjf

Link to comment
Share on other sites

You would probably be better off using a DMX chip...

 

I had no idea that there was such a thing as a DMX 'chip'!...

 

I can't think of any large scale "DMX chips" -- I'd suggest a UART (as included in many microcontrollers) and a RS485 driver (SN75176) typically. You can just pass a frame in and forget about it. Bit-banging at full 250kbs is possible on a 16F84 clocked at 4MHz, just, but the main issue is only being able to buffer something like 60 channels (off the top of my head) and how you get the data in fast enough. You may also have to resort to assembly for best performance of bit banging!

 

I'm not sure of any filtering required either? Unless you mean "filtering out transients to ground"? On the designs I've seen (mainly early High End stuff) they just have a couple of zeners, resistors and fuses.

From the isolation point of view and the spec. I was under the impression there was nothing wrong with isolating drivers (as in the data in/out of the bus driver), but the bus ground should be tied to chassis ground at, and only at the transmitter?

 

Ben Suffolk's USB DMX interface

Alternative OpenLX USB DMX interface

 

 

 

:unsure: - Massive overquoting edited from two posts. Please help keep things tidy and save our scrolling fingers by not repeating every single thing that was said a couple of inches further up the screen.

Link to comment
Share on other sites

I had a look for the DMX chip that I used and it appears that it is not sold any more, probably because the price of PICs with UARTS is so low now. It was basically an RS485 receiver chip that also supported DMX.

 

When I said filtering I meant both filtering the transients to ground and opto-isolation. This was probably a bit miss-leading as an opto-isolator is not a filter.

Link to comment
Share on other sites

Just a thought, but could you make it wireless at the same time, then you could use it whilst up the ladder with no cables trailing.

Wireless is a completely different kettle of fish - RF devices are rather complicated, and IR isn't very feasible when up a ladder as the transmitter box would be up in the booth by the console!

 

I'm working on it, although don't hold your breath as I don't have much free time these days.

 

Note to self - must finish the hardware design next week.

 

When I said filtering I meant both filtering the transients to ground and opto-isolation. This was probably a bit miss-leading as an opto-isolator is not a filter.

Filters and optoisolation are not required at all by the standard - it may be a good idea to add spike suppression zeners though.

Link to comment
Share on other sites

Wireless is a completely different kettle of fish - RF devices are rather complicated, and IR isn't very feasible when up a ladder as the transmitter box would be up in the booth by the console!

 

I'd wondered about bluetooth, then a mobile phone would do! For venues without DECT and a suitable interface!

Link to comment
Share on other sites

Archived

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.