(edit sidebar)
Intro to Physical Computing Syllabus

Research & Learning

Other Class pages

Shop Admin

ITP Help Pages
Tom's pcomp site
DanO's pcomp site


MediaMation CL6 MIDI light dimmer

Written by Rory Nugent
November 18th, 2008

Thanks to Alex Reeder for the original photos and Arduino sample code.

The MediaMation CL6 is a MIDI controlled AC controller device that is commonly used to remotely brighten and dim incandescent light fixtures. This tutorial explains how to control the MediaMation CL6 using MIDI output from an Arduino microcontroller.

You can find the MediaMation CL6 available to borrow from the ER. There's no user manual, but Rob Faludi has a scanned page from the instructions that includes the DIP switch settings and message formats.

(:toc Table of Contents:)

Parts

  • A female MIDI connector (Digikey # CP-1150-ND)
  • A MIDI cable (RadioShack SKU# 42-2151)
  • 220 ohm resistor

How to hook it up

1. Prepare a female MIDI connector and attach the following circuit to your Arduino

2. Plug one end of the MIDI cable into your female MIDI connector and the other end into the MIDI input of the MediaMation CL6. Plug the power cable of the MediaMation into a power outlet.

3. Plug an incandescent light fixture into one of the sockets on the MediaMation CL6 labeled "1".

4. Program your Arduino using the sample code below.

Refer to the MIDI output lab for additional guidance.

Sample Code

 // MIDI Light Dimmer Test Code
 // by Alexander Reeder, Oct. 26 2007

 #define LEDpin 13

 void setup() {
     Serial.begin(31250); // set MIDI baud rate
     blink(3);
 }

 void loop() {
     // slowly step a light up on grouping 1 from off -> on -> off
     noteOn(0x90,0,30);
     delay(1000);
     noteOn(0x90,0,55);
     delay(1000);
     noteOn(0x90,0,80);
     delay(1000);
     noteOn(0x90,0,127);
     delay(1000);
     noteOn(0x90,0,80);
     delay(1000);
     noteOn(0x90,0,55);
     delay(1000);
     noteOn(0x90,0,30);
     delay(1000);
     noteOn(0x90,0,0);
     delay(1000);
 }

 // data1 should be from 0-5, and tells the dimmer which light group
 // data2 should be from 0-127 and represents the brightness
 void noteOn(char cmd, char data1, char data2) {
     Serial.print(cmd, BYTE);
     Serial.print(data1, BYTE);
     Serial.print(data2, BYTE);
 }

 void blink(int howManyTimes) {
     int i;
     for (i=0; i< howManyTimes; i++) {
         digitalWrite(LEDpin, HIGH);
         delay(100);
         digitalWrite(LEDpin, LOW);
         delay(100);
     }
 }
  Edit | View | History | Print | Recent Changes | Search Page last modified on November 26, 2011, at 04:26 PM