DMX signal reverse polarity detection

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

DMX signal reverse polarity detection

3,440 Views
ianbenton
Senior Contributor I

Does anyone have a neat way of determining if a DMX signal is inverted? (Data+ and Data- interchanged, so that the received signal is inverted)

Labels (4)
5 Replies

2,986 Views
kenchill
Contributor III

Here is the answer for those interested:

The usefulness of auto dmx-polarity is dependant on application.

A lot of our devices get used in architectural lighting systems and are packaged in different forms, the simplest being a small cylinder 13mm dia. x 30mm long with bare leads, there can be 100's of these used in a single installation - and often get incorrectly wired - they are RDM enabled.

The UART in your processor needs to be able to invert the Rx input (and Tx output if using RDM), if not an external xor gate will be needed.

A three-stage filter is used on the dmx packets signature. Framing errors, overrun errors, slot count and start-code are added to the filter on the following dmx packet's break. Using a simple algorithm to compare the filter entries it can be determined if any changes in signature are caused by noise or data errors (noise is a random event and can happen anywhere in the packet). Packets with data errors are counted and when a preset value is reached it can be assumed that the dmx-polarity is wrong - whereby the the UART Rx and Tx inverters are enabled, sometimes you can get a good dmx-packet with incorrect dmx-polarity so this needs to be taken into account.

It can sometimes take 10 or more packets to determine if the dmx-polarity is reversed. Our devices only update their outputs when the filter determines a good dmx packet has been received, which means it is delayed but this has little issue with most lighting systems and also synchronises them.

RDM packets get processed immediately and are not added to the filter, if there are errors after a correct RDM start-code this will be picked up during RDM processing.

This may seem a pretty crude solution but it works very well, keep things simple.

Ken...

0 Kudos

2,986 Views
chrispflieger
Contributor IV

You might want to look at an RS-485 interface chip that has support for crossed data wires.

Support for swapped data wires is pretty rare in DMX - even if you support it, the other devices in the chain probably don't.

Note: DMX-512 hardware often does have opto-isolators.

0 Kudos

2,986 Views
kenchill
Contributor III

Hi

Is this info still wanted?

We have a DMX project that achieves auto-DMX polarity using a MKE04 that works well and uses no extra parts.

The only problem is the DMX bus no longer fails high (as it is inverted) - not found this an issue though, we just signal to the user that the polarity is inverted, in most cased they don't even bother to correct it.

If this info is still needed I'll expand on the solution.

Ken...

2,986 Views
soledad
NXP Employee
NXP Employee

Hi,

I don't believe the DMX protocol will tolerate an inverted signal. When the optical isolator inverts the signal level, you will have to add a standard inverter if you remove the isolator.


Have a great day,
Sol

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

2,986 Views
ianbenton
Senior Contributor I

There isn't an opto-isolator - it's RS485!

If the data is received through a lead with Data+ and Data- reversed, then the line break at the start of the frame looks like an idle period, and the idle period between frames looks like a line break. DMX is still valid if it has a long line-break and a short idle period. So it's quite tricky to spot a reversed signal.

0 Kudos