Dual XLR-3 connectors allow the module to act as a receiver or transmitter (master) node in a DMX network and A 9-position DIP switch allows for address configuration without changing firmware.
The RS-485 hardware design allows for software switching between RX and TX modes allowing advanced programmers to experiment DMX receiver projects as well as serial- to-DMX applications.
What is DMX?DMX is a serial protocol that runs over a RS-485 hardware link. It was originally designed to control lights (Chauvet has a bunch of cool DMX lights), but it is also used to control servos, LED's, stepper motors, relays, and other devices (Like a DMX Skeleton). It's an easy-to-use, robust protocol that allows for 1,500 Feet + cable runs using inexpensive cable.
A DMX network has 1 master device, and 1 or more slave devices. 512 control channels are available and many slave devices use more than one channel (e.g., a light might use 1 channel for pan, another for tilt). Each channel can support 256 possible values, although some slave devices will combine 2 channels for 65,535 possible values. Channel values can be changed about 44 times per second, or 44Hz.
You can add the DMX IO Module to the Propeller Platform, a protoboard, or even a breadboard. I'll talk about using it with a Parallax Propeller or Arduino at the end of this instructable.
About This Module
The DMX IO module was designed by Jon Williams and is licensed under the MIT License. He reviewed DMX (and this module) in his November Nuts n' Volts column, which you can read here (pdf).
You can download the design file or buy the kit or a bare PCB from Gadget Gangster. Pre-assembled modules are also available.
Build time is about 45 minutes. Warm up your soldering iron and go to the next step!
Step 1: Using: Usage Ideas
There are a number of DMX dimmer/switch packs (here's one) that let you plug in a lamp or a strand of christmas lights (or anything else that can plug into the wall), turn it on or off, pulse, or dim it. The DMX IO module can issue commands through DMX to dimmer/switch packs or other DMX devices; stuff like Fog Machines, lasers, bubbles, or a snow machine.
Do A Light Show
Color your house
W Hotel In Boston
The DMX IO module can send commands to hundreds of slave devices, like these COLORdash Quad wash lights.
Control Servos and Animatronics
The DMX IO module can also be used to receive commands to control servos, pneumatics, or nearly any device you can think of - you get 12V from the screw-down terminals, and the board also has headers for 3V devices.
Just a few fun things that can be done. Next, we'll start building the module, and at the end of this instructable, there's info on how to program it (don't worry, it's pretty easy).
Step 2: Make: Parts List
- DMX IO PCB
- 9 position 300 mil DIP switch
- 3mm Green LED
- 4x TIP 125 Transistors
- 2x 200uF Electrolytic Capacitors
- 1x .1uF Radial Ceramic Capacitor
- 2x Shunt Jumpers
- 8 Pin DIP Socket
- 56 Pin Headers
- 4x 2N3904 Transistors
- 4x 2 Position Terminal Blocks
- RS485 / RS422 Transceiver IC
- 10 Pin Bussed Resistor Network (10k ohm)
- XLR3 Male Connector
- XLR3 Female Connector
- 3x 4.7k ohm Resistor (Yellow - Violet - Red)
- 4x 470 ohm Resistor (Yellow - Violet - Brown)
- 4x 1k ohm Resistor (Brown - Black - Red)
- 1x 330 ohm Resistor (Orange - Orange - Brown)
- 1x 120 ohm Resistor (Brown - Red - Brown)
Step 3: Make: Resistors
Step 4: Make: 120 Ohm Resistor
Step 5: Make: 470 Ohm Resistors
Step 6: Make: 1k Ohm Resistors
Step 7: Make: 330 Ohm Resistor
Step 8: Make: LED
This led is connected to P27. All you need to do to turn it on is bring P27 high.
Step 9: Make: Ceramic Capacitor
Step 10: Make: 2N3904 Transistors
Step 11: Make: Screw Down Terminals, Prep
Step 12: Make: Screw Down Terminals, Connecting
Step 13: Make: Screw Down Terminals, Complete
Step 14: Make: Solder Down Terminal
Notice the boxes marked 'W' to the right of the transistors? Those are pin headers for controlling servos. The pin next to the W is the control signal, the middle pin is connected to +5V, and the pin on the right is connected to ground. If you want to use the DMX IO to control low power devices, add 3 pin headers at each location.
Step 15: Make: IC Socket
The notch position doesn't actually matter for the socket (It will work either way), but it will help to make sure you put the IC in the correct direction, so it's better to do it correctly.
Step 16: Make: DIP Switch
Step 17: Make: Bussed Resistor, Identifying Pin 1
Step 18: Make: Bussed Resistor, Adding to Board
Step 19: Make: Jumpers
TERM: If the DMX IO module is an end node (transmit or receive), slide the jumper shunt to connect these 2 pins.
GND: If the DMX IO module is the master (transmitting) - only one node will use this jumper. If so, you just slide the jumper shunt to connect these 2 pins.
If the module is the master transmitter, you'll jumper shunt both jumpers.
If the module is the last receiver, you'll jumper shunt the TERM jumper only.
Otherwise, you don't need to jumper shunt either jumper.
If your pin headers comes in a big strip, cut 2 pins out with your dikes and add to the board where it's labeled 'TERM'. Cut out 2 more pins and add at 'GND'.
Step 20: Make: Electrolytic Caps
On the cap, there's a stripe. The shorter lead (closer to the stripe) goes through the longer lead - closer to the edge of the board.
Both caps are 220uF
Step 21: Make: TIP125 Transistors
Step 22: Make: XLR3 Connectors
It's pretty easy to get these correct as the mounting holes on the board only fit the correct connector.
Step 23: Make: RS485 IC
If you don't need the jumper shunts, just slide each over a single pin. This way, you won't lose them in case you eventually do need them.
Lastly, add pin connectors to the outside row of the board. These pins allow you to connect the DMX IO module to the Propeller platform, protoboard, or breadboard. On the board, each connection is labeled P0 - P31. The schematic has a list of connections (expresspcb format), but here's how they map out;
P0: DIP Switch '256'
P1: DIP Switch '128'
P2: DIP Switch ' 64'
P3: DIP Switch '32'
P4: DIP Switch '16'
P5: DIP Switch '8'
P6: DIP Switch '4'
P7: DIP Switch '2'
P8: DIP Switch '1'
P9: DMX channel 1
P10: DMX channel 2
P11: DMX channel 3
P12: DMX channel 4
P24: RX2 (Input)
P25: TXE (Transmit Enable)
P26: TX2 (Transmit)
P27: Activity LED
Step 24: Using DMX
RECEIVEJon Williams' November Spin Zone article provides a lot of detail about the DMX and how he developed the objects. He also coded an easy-to-use object (jm_dmxin) that will simplify reading DMX values. With your spin code, you'll just need to add the library;
When you need to turn on the dmx monitoring,obj
dmx : "jm_dmxin"
to get the value of the channel, it couldn't be easier;pub main
dmx.init(24,16) '24 = receive pin, 26 = activity LED
With that dmx value, you can do whatever you want - display something on a TV display, flip on a light, do some pwm to a channel, etc.dmx.read(chan)
When you're done reading DMX values, you can free the cog with;
Jon has done a cooler version with an RGB lighting fixture using Bit Angle Modulation in his article.dmx.finalize
SENDIf your DMX IO module is the master transmitter, don't forget to slide on the jumper shunts to both jumpers. For software, there's a DMX send object in the Propeller Obex that makes for an easy DMX output. Here's an example of how to use it;
First add the object to the object section of your spin code;
dmxout : "DMXout"
to start it up;
sending dmx values couldn't be easier - just;dira := outa := 1 'brings the TX enable high
dmxout.start(26) ' starts the dmxout
dmxout.Write(2, 255) 'channel = 2, value =255
For ArduinoThe DMX IO module has regular .1" pin spacing, so it won't fit on top of an Arduino, however, you can still connect it to the arduino with wires or a protoboard.
There's a good guide on the Arduino Playground. For connections;
P0:P8 - DIP Switches
P9 - Channel 1
P10 - Channel 2
P11 - Channel 3
P12 - Channel 4
P24 - DMX RX
P25 - Transmit Enable
P26 - DMX TX
P27 - Activity LED
That's it - Do something cool with DMX!