The goal of this project is to implement a basic DMX lighting controller using an EFM32 Giant Gecko microcontroller.
So, what’s DMX? DMX512 or 'DMX' is a serial protocol used in the control of lighting equipment. Traditionally for stage light dimming, its use has expanded to laser scanners, fog machines, actuators, residential holiday lighting, etc.
A few milestones were set to achieve the goal:
• Verify my research of the DMX specification: Capture live DMX traffic on a scope using “loopback” DMX break-out terminators (provides access to the signal conductors) between a standalone DMX controller console and a DMX LED “PAR” Can
• Interface to external RS-485 transceiver chip and verify functionality: Giant Gecko STK running USART demo code driving external transceiver -> scope observation of D+/D-
• Develop software to implement simple DMX protocol traffic: Drive minimal spec-compliant DMX packet to transceiver -> verify timing by scope observation
• Demonstrate DMX lamp control in 7-channel mode: Drive 7-channel DMX Universe with GG STK -> verify expected lighting responses by LED “PAR” Can
DMX communication is on a unidirectional network, and a DMX controller can drive between 1 and 512 devices in the serially connected 'DMX universe'. The protocol includes asynchronous serial data at 250 kb/s in 8N2 format and a DMX Packet which equals 8b frame for each channel in the universe.
Figure 1. A single transmission (DMX Packet) includes synchronizing elements and channel data for up to 512 channels Image Source
Figure 2. DMX Packet Image Source
An example of a DMX device is an LED "PAR" Can Lamp, which can be operated in 3 or 7 channel mode.
Figure 3. “Off the shelf” DMX solution
Figure 4. EFM32 Giant Gecko-driven DMX solution
Software: DMX Packet Transmission
DMX Packet transmission was ported from DVK UART RS-232 example. DMX Universe stored in 513B array (StartCode + 512 channels).
Software: DMX Packet Transmission
An array holds 6 sets of data for channels 2-7 of the DMX “PAR” lamp while Ch 1 (Master Dimmer) is left at 0xFF (no dimming) throughout.
Updates to the DMX Universe are then transmitted during the next DMX packet.
DMX Packet: Set # 1
DMX Packet: Set # 2
DMX Packet: Set # 3
DMX Packet: Set # 4
DMX Packet: Set # 5
DMX Packet: Set # 6
EFM32Giant Gecko DMX Control In Action!
This Hack a Gecko project is a result of a "fun hacking session" and are provided as is, free of charge with no guarantees or support from Silicon Labs, to partially or fully show and demonstrate EFM32 Gecko microcontroller capabilities. Get inspired, use at own risk, and build some awesome and cool applications."
To drive the DMX cabling you'll need the external RS-485 transceiver (also relatively inexpensive) and external power (you're not going to want to drive the full DMX controller from a battery, but in any environment with DMX lights, etc. you'll likely have access to mains power anyway). That said, there's nothing magical about the DMX standard and this approach is effective. I would solve the isolation issue (see "Next Steps" section) before rolling out to something I needed to depend on and/or would be positioned with public access. And to be of much use "live" you'd want to expand on the DMX universe manipulation (i.e. input and/or complexity of pre-recorded scenes) beyond what is featured in this quick demo.
But I enjoyed making it, and when I get some time (someday) I hope to follow-thru with some of these improvements also
Good points, and that's a neat idea in your video (I'd love to have a system to monitor moisture levels - I'm horrible at keeping my garden sufficiently watered without drowning everything). Best of luck with your builds, and let us know if you add DMX support to your theater kits!
I don't think I will be working on DMX soon, unless a lot of the work has already been done for me. That's partly why I'm here--to assess how much has already been done.
I see Silabs coming out ahead on this on the EZR32's. DMX is not really low power, and DMX Arduino shields sell for between $18-$40, with isolation included at the higher end of that. However, existing wireless DMX is at 2.4GHz, yet we are packing 1,000 people in one auditorium, all using 2.4GHz. How many offerings are there for 315MHz with programmable MCU's?
I don't anticipate that we'll be doing any work to develop a DMX controller, but given your thoughts on the current market we may someday see an OEM/vendor provide a DMX solution that leverages our wireless capabilities. You make a convincing argument, to me anyway