maltepöggel.de

QScanDMX

Upgrade of a roller scanner effect to DMX

Some time ago I got an old roller scanner from a friend. It probably had a Sound2Light control at first and was already rebuilt with a DMX switchpack board. With a few relays it was possible to switch the lamp or stop motors (original control was interrupted). However, I have to say that I didn't really like this solution and so a new control had to be designed.

Picture: QuarkScan light effect in action

The hardware consists of two DC motors (rotation roller, rotation mirror wheel) and a stepper motor (combined color / gobo wheel). The stepper motor is equipped with a mechanical stop, against which the wheel is rotated when switched on, in order to start from the zero position. The light source is a 24V / 250W ELC projector bulb.

So let's start with the planning: Both motors should be able to rotate continuously in both directions. The gobo wheel should reach its position as fast as possible. The lamp must remain switchable. All parameters are to be controlled via DMX.

Thereby I came across a mechanical problem: The color / gobo wheel can't always reach its target position efficiently with the existing stop. If you want to rotate from the last position to the first, you have to rotate backwards almost 360 degrees.

Now what do you do about it? Quite simply, you throw out the bolt for the stop. The only problem is that the controller can't determine a zero position when it is switched on. To detect this, I integrated a hall sensor. Hall sensors react to magnetism and are a good alternative to photoelectric barriers in bright or dusty environments. You can buy small cube magnets at Conrad which can be glued to the gobo wheel with silicone. The Hall sensor itself is attached with two-component glue.

Picture: Glueing the hall sensor
Picture: Magnet on the gobo wheel

The software only has to rotate the wheel until the Hall sensor has found the position and possibly make a few steps of "correction", because positioning the magnet correctly to within a few millimeters is very difficult.

Picture: Solid State Relay
Picture: Controller board is developed

For switching the lamp I decided to use a solid state relay. This spares the corresponding power hardware on my board and is, in contrast to a relay, wear-free.

Both motors are connected to an H-bridge to rotate them in both directions. The speed is controlled by pulse width modulation. The motor driver L293D from SGS even integrates free-wheeling diodes!

The unipolar stepper motor of the gobo wheel is controlled by a ULN2003 (Darlington Array).

Picture: Internal structure

Control of the lamp and the motors is done by an Atmel Mega8515 microcontroller. I process the DMX signals with the GPL licensed DMX library from Hendrik Hölscher. I compiled with the AVR GNU C Compiler on Linux.

Picture: Completed controller

Schematic of the control board

Picture: Schematic of the controller

I created two libraries myself; the "lib_gobowheel" controls the unipolar stepper motor in half steps and evaluates the hall sensor. A function called again and again in the main program checks whether the motor has already reached the target position and if not turns one step towards the target position. This way the main loop is not blocked, i.e. a kind of "multitasking".

The second library "lib_motdriver" is a simple interrupt controlled PWM lib. There are functions to set the ports of the L293D accordingly and to let two motors run differently fast in the desired direction. The channel value processing is done in the main program.

Videos

The final program is GPL v3 licensed.

Downloads