|
Infrared Sensors to MIDI Control Change Commands
|
This design
uses Infrared distance sensors to convert
physical movement/gestures (e.g. hand, leg,
head etc.) to MIDI Control Change messages.
These MIDI messages can be used to control
various elements within a MIDI software or
hardware synthesiser/module.
The 6
Infrared (IR) distance sensors control MIDI
Control Change data numbers 48 to 61 inclusive.
The MSB is first (0 to 127 e.g. CC#48), then the LSB is second (0 to
7 eg CC#49). This is the first pair
of CC messages for a 10 bit data output.
These values can be assigned in MIDI programmes
e.g. Reason, Live, Sonar, Cubase etc. to control various
parameters within these programmes. The MIDI output channel (1 to
16) can be selected by the 4-way DIP switch.
The MIDI 6-way IR Sensor unit utilizes:
- An assembled, built and tested Arduino board including a
suitable pre-programmed Atmega168,
- A 2.1mm power socket, and associated LED,
- A MIDI activity LED,
- A 4-way DIP switch, which selects the MIDI channel at power-on, shown
in table 1
- A 150mm wired MIDI 5-pin DIN input socket,
- A 150mm wired MIDI 5-pin DIN output socket,
- The MIDI
IN/OUT circuit schematic is also available.
- The complete circuit schematic is available,
The MIDI 6-way IR Sensor unit requires:
- A 9 Volt battery or equivalent 9 Volt DC power source
- 6 Infrared Distance Sensors, Analogue Outputs
MIDI IN/OUT Wiring:
Operation:
The design uses Sharp analogue output Infrared distance
sensors. There are various types available with different sensor
ranges. Some examples are of 4-30 cm distance GP2D120XJ00F and
10-80 cm distance GP2D12J0000F.
The MIDI channel, that the volume controller affects, is set by
the 4-way DIP switch selection, shown in Table 1 below.
Circuit Schematic:
A circuit schematic of the MIDI
IN/OUT and the Arduino,
combined with the Infrared distance sensors, shows the Input/Output connections.
Power Supply:
The Arduino/Freeduino etc.
Diecimila can be powered via the USB
connection or with an external power supply.
The power source is selected by the PWR_SEL
jumper. To power the board from the USB
connection, place it on the two pins closest
to the USB connector, for an external power
supply, the two pins closest to the external
power jack.
External (non-USB) power can come either
from an AC-to-DC adapter (wall-wart) or
battery. The adapter can be connected by
plugging a 2.1mm
center-positive plug into the
board's power jack. Leads from a battery can
be inserted in the Gnd and Vin pin headers
of the POWER connector. A low dropout
regulator provides improved energy
efficiency.
The board can operate on an external
supply of 7 to 20 volts. If supplied with
less than 7V, however, the 5V pin may supply
less than five volts and the board may be
unstable. If using more than 12V, the
voltage regulator may overheat and damage
the board. The recommended range is 7 to 12
volts.
Note that with the Arduino Duemilanove or
Mega the
power input selection (USB/EXT.) is
automatically selected.
Re-Programming:
Note, the the current
needs of the IR sensors require the use of an external power
supply if the sensors are connected when re- programming the ATmega168
microcontroller via the USB-TTL serial interface.
|
DIP Switch
Selections |
MIDI
Channel
|
| 4 |
3 |
2 |
1 |
| on |
on |
on |
on |
1 |
| on |
on |
on |
off |
2 |
| on |
on |
off |
on |
3 |
| on |
on |
off |
off |
4 |
| on |
off |
on |
on |
5 |
| on |
off |
on |
off |
6 |
| on |
off |
off |
on |
7 |
| on |
off |
off |
off |
8 |
| off |
on |
on |
on |
9 |
| off |
on |
on |
off |
10 |
| off |
on |
off |
on |
11 |
| off |
on |
off |
off |
12 |
| off |
off |
on |
on |
13 |
| off |
off |
on |
off |
14 |
| off |
off |
off |
on |
15 |
| off |
off |
off |
off |
16 |
|
Table 1 MIDI Channel |