e013026.PDF
(
662 KB
)
Pobierz
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
GENERAL
INTEREST
MIDI Lights
& Slide Control
controlling slide projectors with MIDI commands
Design by A. Mylle
In the January 2001 issue we showed that it was possible to control other
things with MIDI besides the usual musical instruments. This time, MIDI
signals are used to control light sources. There are four adjustable triac
outputs and eight relays to control, for instance, four slide projectors.
26
Elektor Electronics
3/2001
GENERAL
INTEREST
Table 1. Types of MIDI-messages.
channel voice
channel mode
system common
system realtime
system exclusive
messages
messages
messages
messages
messages
note off
all sound off
midi timecode quarter frame
timing clock
system exclusive
note on
reset all controllers
song position pointer
start
sample dump
poly pressure
local control
song select
continue
device inquiry
control change
all notes off
tune request
stop
file dump
program change
omni off
eox (end of exclusive)
active sensing
…
channel pressure
omni on
system reset
midi show control
pitch bend
mono on (poly off)
midi machine control
poly on (mono off)
…
When controlling lights, it is not easy
to maintain synchronisation
between light and sound when the
control signals reside on different
media. There exist a plethora of pro-
fessional equipment that make syn-
chronisation possible, but usually
have a price tag attached that is well
beyond the means of the amateur.
Cheaper systems may have limited
expandability and often cannot be
interconnected with systems from a
different brand.
Hence the idea to control (slide)
projectors and relays via MIDI,
where ‘light events’ can be manipu-
lated with a MIDI/audio-sequencer.
Synchronisation is no longer an
issue, since everything is now con-
trolled from a PC. By using MIDI as
the medium, the application of the
MIDI lights is now independent from
any hardware or software. If you
have at your disposal a MIDI-
sequencer with audio capabilities,
then it is possible to mix the sam-
pled audio with MIDI. And, if this
sequencer possesses more than one
separate MIDI-output, then it
becomes possible to connect multi-
ple light controllers.
as the MIDI-music then congestion on the
MIDI-cable is guaranteed to arise.
More important then the load on the MIDI-
cable is the problem that sysex-messages are
not normally displayed in graphical form on a
sequencer. There will, at best, be a list of
hexadecimal numbers in the play list. To edit
light events with the music is virtually impos-
sible. There is, however, another possibility.
In
Table 1
is an overview of all the types
of MIDI-messages, including a list of the most
common.
Normally, commands for light control
belong in the MSC-category among the ‘sys-
tem exclusive messages’. However, if we look
at the list ‘channel voice messages’ to ‘con-
trol change’, then these messages consist of
only 3 bytes: one status byte and 2 data
bytes. Such a control change usually serves
the purpose of altering the parameters of the
sound source, such as, for example, volume,
reverberation, panning, etc.
Most of the possible 128 control changes
(refer to sidebar ‘MIDI-bytes’) are already allo-
cated fixed functions. But, there are also a
few that are free to be used for equipment
The MIDI solution
This idea is not new. Right from the
beginning, with definition V1.0 from
the MMA (MIDI Manufacturers
Association) were, in the chapter
MSC (MIDI Show Control), defini-
tions for protocols related to the con-
trol of, for example, lights, strobo-
scopes, lasers, film projectors, etc.
These MSC-messages are ‘system-
exclusive’ commands. These com-
mands have a wide range of appli-
cations what immediately means
that they are not easily created or
edited using a regular sequencer.
Besides, an MSC-message for the
control of lights is easily 12 bytes
long. If these MSC-messages are rid-
ing along the same MIDI-interfaces
Table 2. Utilised controllers.
General purpose continuous controller #1
ctrl 16
brightness projector #1
General purpose continuous controller #2
ctrl 17
brightness projector #2
General purpose continuous controller #3
ctrl 18
brightness projector #3
General purpose continuous controller #4
ctrl 19
brightness projector #4
General purpose switch controller #5
ctrl 80
relay projector #1
General purpose switch controller #6
ctrl 81
relay projector #2
General purpose switch controller #7
ctrl 82
relay projector #3
General purpose switch controller #8
ctrl 83
relay projector #4
undefined controller
ctrl 84
extra relay #1
undefined controller
ctrl 85
extra relay #2
undefined controller
ctrl 86
extra relay #3
undefined controller
ctrl 87
extra relay #4
reset all controllers
ctrl 121
all lamps and relays off
‘running status’ is recognised (see text)
3/2001
Elektor Electronics
27
GENERAL
INTEREST
12V
5V
D2
5V
TR1
R33
5V
*
5V
1N4001
K12
IC2
7
805
K11
C16
20
C18
100n
C15
IC7
5V
1
100n
9
S3
10
C5
100n
R34
2
P0
100n
10
S4
11
37
68
1
28
IC7
VAREF
VCC
VCC
VPP
F1
D3
3
P1
C8
C9
S0
S1
S2
S3
S4
S5
S6
S7
P0
P1
P2
P3
1
2
3
5
6
7
8
9
52
53
54
55
56
57
58
59
AD0
AD1
AD2
AD3
AD4
AD5
AD6
AD7
AD0
AD1
AD2
AD3
AD4
AD5
AD6
AD7
9
12
13
14
15
16
17
18
19
A0
A1
A2
A3
A4
A5
A6
A7
A0
A1
A2
A3
A4
A5
A6
A7
A8
A9
A10
A11
A12
A13
A14
10
C14
D
1
7
P4.0
P4.1
P4.2
P4.3
P4.4
P4.5
P4.6
P4.7
P0.0
P0.1
P0.2
P0.3
P0.4
P0.5
P0.6
P0.7
1D
A0
A1
A2
A3
A4
A5
A6
A7
11
S5
8
9
8
7
6
5
4
3
2x 9V
1N4001
100mA
4
P2
1000µ
25V
10µ
16V
4VA5
7
100n
ON
12
S6
11
AD0
AD1
AD2
AD3
AD4
AD5
AD6
AD7
D0
6
5
P3
12
IC15
5V
D1
5
13
S7
13
D2
4
6
S0
15
D3
3
EPROM
14
IC6
16
D4
R26
R12
R10
R6
2
7
S1
17
D5
50
25
A8
27256
15
20
19
18
17
16
15
14
13
ALE
18
5V
P6.0
P6.1
P6.2
P6.3
P6.4
P6.5
P6.6
P6.7
D6
11
24
C1
A9
8
S2
41
42
43
44
45
46
47
48
A8
A9
A10
A11
A12
A13
A14
A15
19
P2.0
P2.1
P2.2
P2.3
P2.4
P2.5
P2.6
P2.7
D7
11
1
21
23
C2
EN
A10
A11
A12
13
8
IC4d
14
10
R8
74HC573
2
IC4c
2n2
3
C7
CH0
CH1
CH2
CH3
D5
9
26
27
IC16f
IC4
A13
A14
100n
11
14
15
1
1N4148
R11
270k
CE
OE
C10
20
14
22
RX
21
A15
IC4 = LM339
C20
P3.0 RxD
22
80C535
P3.1 TxD
1µ
16V
49
5V
ZERO CROSS
23
24
25
26
27
28
PSEN
2n2
P3.2 INT0
P3.3 INT1
IC13e
R9
10
IC16b
SW0
11
12
NSW0
P3.4 T0
P3.5 T1
P3.6 WR
P3.7 RD
1
+VS
7
PWM0
8
11
12
13
14
15
16
17
18
PWM0E
NSW0E
PWM1E
NSW1E
PWM2E
NSW2E
PWM3E
NSW3E
I8
O8
4
5
1
1
5V
5
NSW0
7
IC4b
C1
R32
I7
O7
IC13b
2
6
67
66
65
64
63
62
61
60
SW0
SW1
SW2
SW3
SW4
SW5
SW6
SW7
PWM1
6
IC4a
P5.0
P5.1
P5.2
P5.3
P5.4
P5.5
P5.6
P5.7
I6
O6
R7
4
SW1
5
4
NSW1
NSW1
5
2n2
1
I5
O5
IC11
2x
1N4148
D7
D4
PWM2
4
D
16
I4
O4
*
R13
ULN
PWM0
PWM1
PWM2
PWM3
36
35
34
33
32
31
30
29
NSW2
3
IC13c
D6
I3
O3
C11
P1.0
P1.1
P1.2
P1.3
2803
1N4148
PWM3
2
I2
O2
SW2
7
6
NSW2
1
NSW3
1
1µ
16V
5V
I1
O1
VEE
CH0
CH1
CH2
CH3
IC13d
R4
9
P1.4
P1.5
5V
5V
SW3
9
10
NSW3
1
*
IC3
P1.6
R3
150
Ω
S1
1
1
PC900
1
2
3
4
CLK
4
C17
C19
IC13a
K9
P1.7
PE
IC16
IC13
1
6
4
10
12
SW4
3
2
NSW4
3
100n
100n
5
RESET
1
R14
VAGND
8
8
D1
C6
100n
2
R16
X2
X1
VSS
EA
IC13f
39
40
38
51
8765
4
1N4148
X1
10
SW5
14
15
NSW5
1
1
8
4
2
5
R15
NSW4
NSW5
8
+VS
11
12
13
14
15
16
17
18
NSW4E
NSW5E
I8
O8
7
R
MIDI IN
C4
7
DIS
C3
33p
C13
33p
IC16e
I7
O7
IC5
5V
R25
220
Ω
6
P1
JP1
I6
O6
3
SW6
11
12
NSW6
10µ
16V
OUT
1
K10
5
I5
O5
6
555
IC12
THR
4
3
5
I4
O4
2
RESET
TR
X1 = 12MHz
IC16d
3
ULN
2
CV
I3
O3
5k
2803
SW7
9
10
NSW7
NSW6
NSW7
2
NSW6E
NSW7E
1
I2
O2
1
5
C12
IC16a
IC16c
zie tekst
*
see text
*
siehe Text
*
voir texte
*
4
1
IC13, IC16 = 74HC4049
I1
O1
R5
220
Ω
1
2
3
6
7
VEE
1
1
3n3
MIDI THRU
9
NSW0E
PWM0E
NSW1E
PWM1E
NSW2E
PWM2E
NSW3E
PWM3E
NSW4E
NSW5E
NSW6E
NSW7E
R19
R20
R21
R23
12V
R37
R36
R35
R38
IC1
IC8
IC9
IC10
2
1
2
1
2
1
2
1
RE1
RE2
RE3
RE4
RE5
RE6
RE7
RE8
6
4
6
4
6
4
6
4
R28
R27
R29
R30
VDR
VDR
VDR
VDR
MOC3020
MOC3020
MOC3020
MOC3020
R17
R18
R22
R24
2
2
2
2
2
2
2
2
5
5
5
5
5
5
5
5
4
4
4
4
4
4
4
4
3
3
3
3
3
3
3
3
1
1
1
1
1
1
1
1
K1
K2
K3
K4
K5
K6
K7
K8
000179 - 11
PRJ1
PRJ2
PRJ3
PRJ4
AUX1
AUX2
AUX3
AUX4
Figure 1. Schematic of the MIDI-light-control.
specific functions, for instance. If we select
our light control commands from these avail-
able control changes then, suddenly, every-
thing becomes much simpler. Lights may
now be manipulated in the same way as the
modulation of volume. A nice feature is that
it becomes possible to program the
sequencer to operate a light with the modu-
lation wheel and switch a relay with the sus-
tain pedal. Providing the light mod-
ule with a MIDI-through-connection
means that it can simply be con-
nected in series with the sound mod-
ule using a standard MIDI cable. Of
course, there is the prerequisite that
the sound module does not respond
to the controller commands used by
the light module. These controller
commands have been chosen such
that the risk of interference is virtu-
ally eliminated. The MIDI-light-mod-
ule uses only a couple of controllers
from channel 16 and since MIDI files
seldom contain these specific con-
trollers there is unlikely to be a prob-
lem. The MIDI-light-controller can
drive 4 projectors and 8 relays when
28
Elektor Electronics
3/2001
GENERAL
INTEREST
face more versatile. Either use the contact to
switch low voltage directly or use an opto-
triac to switch 230 V. This last suggestion can
be implemented by combining an opto-triac
with a power triac and fitting this in an enclo-
sure with built-in plug and socket. This way
everything is safely separated from the 230 V
mains. Never use the relay contacts to switch
230 V directly!
Braun
slide projector
Midi Light
1
3
3
1
5
4
4
5
2
2
1 = slide transport +
2 = A1
3 = G
4 = slide transport –
000179 - 12a
The hardware
Zeiss Ikon
slide projector
Midi Light
The light module (
Figure 1
) is built around an
80C535-12 from Infineon (Siemens). It is a
member of the 8051-family with, among other
things, four pulse width modulators built
around timer 2, 7 I/O ports and an 8 channel
A/D-converter. The PWM section performs
the phase control of the mains voltage for the
4 projector lamps.
The PWM outputs each trigger an opto-
triac type MOC3020 (IC1, IC8, IC9 and IC10),
1
9
2
8
3
1
10
3
7
5
4
2
4
6
2 = slide transport +
3 = slide transport –
4 = A1
8 = G
5
000179 - 12b
Figure 2. Connector details of the control terminals of slide projectors from Braun
and Zeiss Ikon.
used with the MIDI-controllers sum-
marised in
Table 2
.
the value of the controller. Every
change of state requires an event. A
value of ‘0’ means the contacts are
open, a value of ‘127’ means contacts
closed. This means that the user
defines the contact closure time.
100
Ω
1
3
Possibilities
230V
5
4
1
5
2
100n
250V
Control of 4 projectors
The light intensity is controlled by
the value of the controller. Every
change in intensity requires an
event. Value ‘0’ means the light is off
and value ‘127’ means light is on
maximum. The pre-glow is
adjustable and is identical for all four
channels. The lamp characteristics
are linearised.
2
4
1W
Driving 4 relays
(Make and break contacts can be
utilised for a variety of purposes)
The relay is controlled in real time by
the value of the controller. Every
state change requires an event.
When the value is ‘0’ the relay is not
energised, when the value is ‘127’
the relay is energised. The DIN con-
nector makes both the make- and
break contact available together
with a 12 V signal via a series resis-
tor. This approach makes the inter-
LOAD
MOC3020
TIC206D
2A T
000179 - 13
Figure 3. Schematic of a circuit to control 230 V
load (max. 2 A).
Control of 4 normally open con-
tacts
(To advance slides, for example)
The relay is controlled in real time by
which in turn fires the power triac internal to
the projector. If a modification to the projec-
tor is necessary, it is limited to the fitting of a
triac. If the projector has a built-in brightness
control it will be sufficient to make the anode-
and gate connections available on the out-
side. A number of common projector connec-
tions are shown in
Figure 2
.
To obtain good mains synchronisation of
the pulse width modulators, a zero-crossing-
detector is built around an LM339 quad-com-
parator (IC4) which, every 10 ms, activates
interrupt 0 on pin 32. Careful attention was
paid to the design of this detector to avoid
interference to the light control from the
1350 Hz time code signal that rides on top of
the 50 Hz mains voltage. The AC signal is
tapped from the (highest available) voltage
on the secondary of the mains transformer.
On the outputs of the first two comparators,
alternating between them, appears a falling
Running status
MIDI-commands (such as ‘control change’) consist always of a single status byte
followed by one or more data bytes. The status byte defines the type of com-
mand that is to follow, while the data bytes contain the actual information. In the
case of the control change, for example, the status byte is followed by 2 more
data bytes. The first contains the controller number and the second contains the
controller value. When the next MIDI-message is intended for the same MIDI-
channel, it is not necessary to repeat the status byte. This status byte would have
been identical to the previous one. Such successive MIDI-commands of the same
type and for the same channel require only a single status byte, sent at the begin-
ning of the set of messages. A status byte is only transmitted if it differs from the
previous one. This entire mechanism is called ‘running status’. Some older MIDI
equipment is unable to handle the running status. The better sequencers permit
this mode to be switched off.
3/2001
Elektor Electronics
29
GENERAL
INTEREST
K8
K7
K6
K5
K4
K3
K2
K1
000179-1
000179-1
R30
R29
R27
R28
RE8
RE7
RE6
RE5
IC10
IC9
IC8
IC1
IC12
100mA/T
F1
C20
C2
S1
IC16
IC13
IC11
C7
R6
IC4
R11
C11
C1
C6
C10
T1
R14
IC5
C4
IC3
D2
IC2
C9
D3
X1
D16
C8
D17
K9
K10
30
Elektor Electronics
3/2001
Plik z chomika:
gasma
Inne pliki z tego folderu:
bge.jpg
(26 KB)
detail1.htm
(5 KB)
detail2.htm
(4 KB)
detail3.htm
(4 KB)
detail4.htm
(6 KB)
Inne foldery tego chomika:
1974
1975
1976
1977
1978
Zgłoś jeśli
naruszono regulamin