Home Up Legal Union

DMX Dimmer
Controller Images SSR Decorations Dimmers DMX Dimmer


In looking ahead to our Christmas Light layout, Mary and I found we needed 204 channels.  To top this off, I want them all dimmable.  While we may use some as on/off channels, I still wanted the ability to dim them all.  To do this with an Olson 595 design, you would need 1632 on/off channels.  The upper limit for the Olson 595 design has been placed at 1024 by others on the Vixen/Computer Christmas list.  I decided to take another approach - DMX.  DMX has been around since the mid-80's best I can tell.  It is a differential serial format that provides up to 512 eight bit dimmable channels.  Vixen already has a plug-in for DMX, so nothing new there needed!  The output from my DMX-Dimmer will run any of the triac designs out there at Computer Christmas (5vdc output).  You do need a USB to DMX encoder.  I got mine from Enttec for about $60.

A DMX Universe consists of up to 512 channels.  The DMX Dimmer will decode up to 24 channels, starting at an address of 1 to 511.  My design will only decode the first 511 channels - channel 512 is not available.

Basic Operation: The unit is designed around a MicroChip 16F877.  It accepts the serial input via a differential convert IC that then provides standard logic level inputs to the 16F877 serial input.  The starting address, and the number of channels to decode, are stored in the 16F877's EAROM.  This data is read on startup.  As data arrives to the DMX Dimmer, it stores the 8 bit value for each channel the unit will decode in memory.  This is done in an interrupt routine.  Another interrupt routine provides a 32.5us clock.  This breaks each half cycle of a 60Hz wave into 256 steps.  The main body of the program looks for the passing of 32.5us - at which time it increments an 8 bit counter.  It then examines the value of each channel and if the value of the 8 bit counter is greater than the 8 bit DMX value, it turns that channel on.  At the end of the half cycle all outputs are turned off.

Software: The software was written in assembler using the Tech-Tools CVASM16 Assembler.  This is a free assembler.  I use it rather than the MLAB software from MicroChip (which is also free) because I use a Tech-Tools In circuit Emulator.  With minor modifications the code should compile with MLAB.

Encoder/Diagnostic Boards:  I designed two different boards with which to set the beginning DMX address to start decoding and the number of channels to decode.  I used this approach, since this is rarely done, rather than include the circuitry on each DMX Dimmer.  The first board uses jumpers to set the DMX address and channel count with individual LEDs to show the value in EAROM.  This board can set the data, or just show what is currently in the EAROM.  The software will not let you set values outside the usable ranges; i.e. you can not set the first address as 510 and tell the unit to decode 24 channels - this would decode from 510 to 534 - DMX stops at 512.  The second board has more functionality.  The starting address and number of channels is set by rotary switches (no need to know binary).  The display is a numeric LED display (again no need to know binary).  Besides being able to just show current values, or set new values, this board also has a diagnostic mode.  In the diagnostic mode the channel number that is set by the rotary switches is used as the starting address with only one channel being decoded.  The value of that channel is then displayed on the diagnostic board.  This allows you to see what the DMX Dimmer is actually seeing for a particular channel.  No dimming is done during the diagnostic phase.  Using the diagnostic mode does not change values in the EAROM.

Current Status:  A prototype has been constructed and tried out.  It does work.  I have not yet tried all 511 channels, of dimming nor all 511 channels of diagnostic mode.  I have tried it at random channels from 1 to 511 and it works as designed.  Testing is continuing.  There is currently one flaw that I will be addressing  - at low levels the lights have a flicker.  This has been traced down to a jitter in the 32.5us clock.  It seems to be going from 27us to 32.5us when DMX data is coming in.  With no DMX data coming in the clock is rock steady at 32.5us.  I have some code written to tryout, but I have not had a chance at this time.

PCB:  I have designed a printed circuit board for the DMX Dimmer.  Unlike the original design, it does not include the transformer or power supply.  It expects to receive clean and proper DC voltage and a low voltage AC signal for the zero crossing interrupt.  The PCB was done in an old version of Protel PCB.  It measures 3.9" by 4.4".

As I finish testing I will update the software and any hardware changes if needed.

Pictures are coming.

Files: As of April 18, 2007
DMX Dimmer Schematic - original version
DMX Dimmer Schematic - PCB version
DMX Dimmer Basic Encoder Schematic
DMX Dimmer Extended Diagnostic Encoder Schematic
DMX Dimmer Software

Please address general comments to web@dv-fansler.com

This page was last modified: 01/22/14
This Document is Copyright 1998-2014 by David V. Fansler  All rights reserved.
Legal Notice