my logo
HOME

DMX 512

resources
FAQ
OpenRDM
dimmer
switch pack
demux
LED
matrix
rc-servo
stepper
Analyzer
strobo mod

high voltage

tesla coil
twin

misc

pics
links
imprint
_

...the best of Henne's Sites in english...

DMX servo & LED controller


With this circuit up to 4 rc-servos can be controlled independently via DMX. The resolution is 8bit.
Furthermore a 4ch LED dimmer with integrated strobe function is implemented.

The signal wires of the servos should be directly connected to the Transceiver's output. The servos must be powered by an extra +5V power supply because of their high current consumption.

 

DMX-Transceiver (Rev. 3.01)

picture of transceiver rev.3.01With this modul DMX data can be received or transmitted.

Because of the complete usage of the RS485 converter, a bidirectional transfer of data is possible (i.e: RDM as described in ANSI E1.20). Till now this feature is only supported by a few expensive devices.

Though the circuit is only made of an AVR and few other parts I recommend a diy etched board.

 

 

 


parts

  IC1
  IC2
  IC3
  B1 
  LED1
  LED2
  R1
  R2,3,4
  C1,2
  C7
  C5,6
  SW1
  Q1
  connectors
ATmega8515-16PU
75176B
7805
rectifier (round)
LED 5mm red
LED 5mm green
10k (PT10-S)
390 Ohm
27pF
100nF
100F
DIP-Switch (10)
8MHz (HC49)
pin header (single)

 

 

 

 

 

 

 

 

 

 

 

As you can see, the schematic is quite simple: The heart of the controller is the firmware of the mcu (IC1). The start address is set with SW1. The LEDs indicate the status of the controller. The parts around IC3 are responsable for an exact Vcc of 5.0Vdc. IC2 is the RS485-Transceiver. It allows our controller to communicate via DMX512 with other equipment.

For a dimmer- or switchpack you have to connect the pins of "output" with the "-"pins of the dimmer-/switchmodules because a mcu can drive bigger loads as a current sink. The "+"inputs of all modules must be connected to vcc.

The "spare" port is used for additional pins or to jumper different modes.

AC1&2 have to be connected with a power supply of 9-12V ac or dc. 3-5W should be sufficient.

The following schematic shows you how to connect the transceiver with the DMX bus:

this is the layout:

The board is 48 * 76 mm^2. The resolution of the picture above is 300dpi.

placement:

On the resources site you can find a manual for programming AVRs. The 8MHz crystal has to be selected as clock source by changing the fuse bits.

After the mcu is set to the right clock source, the servo firmware should be written to the flash of the AVR. This firmware uses 7 consecutive DMX channels after the start address to generate the desired PWM-Signals.

 

channel map to control 4 rc-servos

DMX function output pin
ch1 Position Servo1 OUT1 (PA0)
ch2 Position Servo2 OUT2 (PA1)
ch3 Position Servo3 OUT3 (PA2)
ch4 Position Servo4 OUT4 (PA3)

 

channel map for moving lights devices

DMX function output pin
ch1 Servo1 (Tilt) OUT1 (PA0)
ch2 Servo2 (Pan) OUT2 (PA1)
ch3 Strobe  
ch4 PWM1 (red) OUT5 (PA4)
ch5 PWM2(green) OUT6 (PA5)
ch6 PWM3 (blue) OUT7 (PA6)
ch7 PWM4 OUT8 (PA7)

 

servo calibration

Officially a servo should be controlled with a PWM signal of 50Hz and a duty cycle of 1..2ms, where 1.5ms defines the mid position. In fact the most companies have modified the duty cycle to allow larger angles. You can choose one of the common dialects for your servos by jumpering the SPARE port:

Spare1 (PD4) Spare2 (PD5)  Servo
0 0 Standard
1 0 Graupner
0 1 robbe
1 1 custom

0 = not jumpered
1 = jumpered

Additionally the angle of the first servo (Tilt) can be reduced by jumpering Spare3 (PD6). This makes sense in most scanner setups...

If you want to define independent angles for each servo (or if your rc servos don't belong to the table above), you can create an EEPROM file with the PC tool in the firmware archive. Then this file must be flashed together with the firmware. To use these custom angles, Spare1,2 have to be jumpered. 

 

Debugging

A change of relevant channels is indicated by a flashing green LED. The red one repeats error codes until the bug is fixed:

Pattern Error Solution
flashing There is no signal connected to the transceiver. Connect the transceiver to the DMX bus.
double flashing The signal is not accepted as DMX.
The transceiver cannot receive all required channels.
Swap D+ and D- at the DMX connector.
Transmit more channels or choose a lower start address.