Can we Convert DMX to PWM?

Hi Guys,

I'm wondering Can we or How to Convert DMX to PWM?

I am thinking to use the DMX signal as an input to the Arduino.

Hoping anyone here can give me an idea on how?

Thanks in advance Guys.

Your topic was MOVED to its current forum category as it is more suitable than the original

What would such a DMX message contain ?

Have you even tried looking for this on the web. I searched with this term: "arduino dmx" and got over 1 million hits. On the first page there was tutorials, shields, source of different shields etc. Try that search I think you will be surprised. The top hit i got was: ArduinoDMX | DMX-Examples

The DMX signal is a bit like driving a WS2812 LED strip, (but not exactly as it does not regenerate the signal but listens to the whole bus at the same time as all the other devices on the DMX bus), so that each DMX receiver counts the number of bytes sent, and only when that number is equal to its "address" it transfers it into a variable. That number is a PWM value for setting the brightness of a lamp using PWM.

For an RGB device your Arduino would have to capture three addresses, one for each colour component, Red, Green & Blue. Or four addresses if you have a white LED as well. These addresses are normally consecutive.

So your Arduino would sit there counting bytes and when the last of its three or four bytes have arrived transfer it to your LEDs. Note the first byte doesn't count and is a command type instruction, so your addresses will start from one.

Be aware that when transferring the data to your LEDs the interrupts are turned off and so it can't read the DMX bus for this time. You have to make sure that the DMX master doesn't send a new set of signals during this time. In other words have a delay before the next set is sent.

YES ... Maybe

Or just buy one: DMX_PWM_05 (robotshop.com)

So yeah.... Like almost any project there is input (DMX) and output (PWM) with the input and output "connected" with software.

I've never actually used DMX but I know a little about it. As you may know every DMX device has an address and then each device has its own set of commands (which should be listed in the user manual) depending on its capabilities... Some are multi-color, some have moving heads or moving gobos, etc.

Your code just has to read the command, check address (ignore anything addressed to another device) then parse and decode the command, and set the dimming (PWM) appropriately.

That will likely involve some if-statements. Since DMX is 8-bits I don't think you'll have to map the dim level and you can probably just "extract" it from the command and use it directly.

I think there are some semi-standard commands so you might want to look-up the dimming command for an existing light and use the same one.

With this kind of project it's REALLY HELPFUL is you have working DMX setup. That way if it doesn't work (and it probably won't work the 1st try) but the other DMX light works, you'll know the controller and wiring are OK and the problem is with your light.

P.S.
"High power" lights aren't usually dimmed with regular PWM and I assume you're not using DMX for a tiny little LED, so you might want to make sure you can dim the light with an Arduino before you go too far with the DMX stuff.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.