DIY MIDI CC Controller w/100mm sliders for under $100

Are you familiar with how to use the 5-pin MIDI connector for MIDI Out? I've been browsing around the internet and maybe there are specific pins to use. Would I have to write code to change the parameters of the serial ports to match RS485?

From what I can tell, only the three middle pins are used.

MIDI Pins
 
From what I can tell, only the three middle pins are used.

MIDI Pins

Thanks, but I'm sorry, I meant on the Teensy brd. Do you know what needs to be done there?

If not, no problem. Right now, I'm in an exploratory phase and I can look it up if I get beyond this point.

I would like to make a foot controller for a DMX lighting controller. I have the Chauvet Obey 40 which has a MIDI In. The foot controller can tell the Obey which scenes or chases to use. It also has a command for blackout. Looks like the Teensy brd would be perfect for this app and I think I can get everything done for less than $50.

Thanks for starting this thread.
 
Thanks, but I'm sorry, I meant on the Teensy brd. Do you know what needs to be done there?

If not, no problem. Right now, I'm in an exploratory phase and I can look it up if I get beyond this point.

I would like to make a foot controller for a DMX lighting controller. I have the Chauvet Obey 40 which has a MIDI In. The foot controller can tell the Obey which scenes or chases to use. It also has a command for blackout. Looks like the Teensy brd would be perfect for this app and I think I can get everything done for less than $50.

Thanks for starting this thread.


Check this out. It might be a better (and cheaper) solution than using the Teensy board. If it's still not what you're looking for, then I can do a quick write-up on using buttons on the Teensy board. It's pretty simple, especially if you only have a single button.

DIY TRS to MIDI Cable
 
Programming the Teensy board

Refer to the original article on installing the arduino IDE framework, and the teensy loader app. But use the links below for the current versions, which is what I'm using.


----------------------------------------------


Download arduino IDE 1.8.7https://www.arduino.cc/en/Main/Software for your OS
(I downloaded the Arduino Windows Zip file and just unzipped it to my desktop.)

arduino download.jpg


----------------------------------------------

Download the TeensyDuino Add-on for the arduino IDE framework.
Special note on Windows 10 installs - Windows 10 already has the drivers installed. Just click Next when you will see the following page...

Teensy Loader Win 10.jpg


On this page, browse to where the arduino app is located. I unzipped my arduino folder to the desktop, so my path is "C:/Users/jsben/Desktop/arduino-1.8.7-windows/arduino-1.8.7/".

Teensy Loader Arduino folder.jpg


On this page, you're installing all the libraries, so just click "Next"

Teensy Loader Libraries.jpg


Then Install. On the last page, just click "Done"

------------------------------------------------


Download the Teensy Loader App for your OS, and follow the directions on the page.

------------------------------------------------


More instructions to follow...
 
Using the Arduino Application

With your Teensy board connected via USB, open the arduino app.



  1. From the Tools\Board menu, select "Teensy 3.2/3.1"
    tools-board.jpg

  2. From the Tool\USB Type menu, select "MIDI"
    tools-midi.jpg

  3. From the Tools\Port menu, select your connected device (it'll resemble mine)
    tools-port.jpg

---------------------------------------------

Copy the code below into the blank window


Code:
#include <Bounce.h>

///////////////////////////////////////////////////////////////////////////
// define how many pots are active up to number of available analog inputs
#define analogInputs 3
//////////////////////////////////////////////////////////////////////////


// define arrays for input values and lagged input values
int inputAnalog[analogInputs];
int iAlag[analogInputs];
// define array of cc values
int ccValue[analogInputs];
// include the ResponsiveAnalogRead library
#include <ResponsiveAnalogRead.h>


///////////////////////////////////////////////////////////////////////////
// define pins and cc codes
const int A_PINS = 3;
const int ANALOG_PINS[A_PINS] = {A0, A1, A2};
const int CCID[A_PINS] = {11, 1, 21};
///////////////////////////////////////////////////////////////////////////


// a data array and a lagged copy to tell when MIDI changes are required
byte data[A_PINS];
byte dataLag[A_PINS];

// ititialize the ReponsiveAnalogRead objects
ResponsiveAnalogRead analog[]{
  ///////////////////////////////////////////////////////////////////////////
  {ANALOG_PINS[0],true},
  {ANALOG_PINS[1],true},
  {ANALOG_PINS[2],true},
  ///////////////////////////////////////////////////////////////////////////
}; 

// the setup routine runs once when you press reset:
void setup() {
// initialize serial communication at 9600 bits per second:
Serial.begin(9600);
}

void loop(){
  // update the ResponsiveAnalogRead object every loop
  for (int i=0;i<A_PINS;i++){
    analog[i].update(); 
    // if the repsonsive value has change, print out 'changed'
    if(analog[i].hasChanged()) {
      data[i] = analog[i].getValue()>>3;
      if (data[i] != dataLag[i]){
        dataLag[i] = data[i];
        usbMIDI.sendControlChange(CCID[i], data[i], 1);
      }
    }
  }
}





There are only a few areas you'll have to change for your own use. But I've made it fairly easy


Change this to the number of sliders you have connected to the board
Code:
///////////////////////////////////////////////////////////////////////////
// define how many pots are active up to number of available analog inputs
#define analogInputs 3
//////////////////////////////////////////////////////////////////////////



A_PINS - Set the number of devices you have connected to the board

ANALOG_PINS - Set the pins your devices are soldered to on the board. Note, doing something like "const int ANALOG_PINS[A_PINS] = {A1, A4, A7};" is perfectly acceptable, if that's how you have your devices connected to the board

CCID - This is where you define the MIDI CC code for each slider and/or pan pots. The codes are in the same order as the ANALOG_PINS above, so A0=11, A1=1, and A2=21

Code:
///////////////////////////////////////////////////////////////////////////
// define pins and cc codes
const int A_PINS = 3;
const int ANALOG_PINS[A_PINS] = {A0, A1, A2};
const int CCID[A_PINS] = {11, 1, 21};
///////////////////////////////////////////////////////////////////////////



This is pretty straight forward. Just use this format for the number of devices you have connected to the board
Code:
///////////////////////////////////////////////////////////////////////////
  {ANALOG_PINS[0],true},
  {ANALOG_PINS[1],true},
  {ANALOG_PINS[2],true},
  ///////////////////////////////////////////////////////////////////////////



After updating your code, click the arrow button at the top, to write the code to the Teensy board
execute.jpg


The little Teensy app will pop up on the screen, and it'll say "REBOOT OK" and then "Press button on Teensy..." Just ignore that. After the code is done, you can close the window. You'll know the code is done from the status window at the bottom of the arduino app. It takes about 10 to 15 seconds to run, and should look something like mine when done...
Done.jpg





When you're done, and want to save your code, you'll get prompted about needing to save it in it's own folder. Do the obvious thing, and create the folder, and save the file in that folder.



Hopefully I've explained things thorough enough :)
 
Just a few various pics...

Here's a pic of the car dash-mat I trimmed down, to keep the unit from sliding around. It stays in place incredibly well, and is lower profile than feet would be. It doesn't cut or slice very well at all, but no one's going to see it anyways. Smooth side of mat goes on the case.

IMG_20181125_113457.jpg


-----------------


Here's the jack hole (if your inner-child starts to laugh, it's perfectly acceptable :D). I didn't bother cutting a square since it won't be seen, especially with the USB cable attached.

IMG_20181125_113523.jpg

IMG_20181125_113549.jpg
 
DAW Setup

In your DAW preferences, you should see the Teensy MIDI board. This is Sonar...

preferences.jpg

---------------------------


Select a MIDI track, and make sure either "MIDI Omni" is selected, or the "Teensy Omni" at a minimum.

midi inputs.jpg

----------------------------


Start moving the faders. You should see your MIDI input levels rising and falling with the faders...

selected midi track.jpg

----------------------------


If you're not getting a signal, go into the preferences, deselect the Teensy board, and hit Apply. Then, enable the board and Apply. It should be working. If not, we need to make sure the computer is getting any kind of signal.

Download and install the free app MIDI-OX. This is a great tool for analyzing MIDI devices.

Note: You have to close your DAW software to run MIDI-OX

In MIDI-OX, display the "MIDI Status" window, and start moving your faders. You should see some activity on the cc channels you've assigned to your unit. My three are 11-expression, 1-modulation, and 21-used by SpitFire for vibrato. On the top row you'll see values for my three faders. You can use many of the other tools/windows to determine if the controller is transmitting a signal, and what port, if any, it's connected to.

MIDI-OX.jpg


If you're not getting anything here, then go back to the start of the setup, and go through the steps again. If you're able to see, and flash code, to the board in arduino, then you should be seeing something in MIDI-OX.



Quick note: In Sonar/DAWs, you need to arm the track(s) to record, as apposed to arming "Write" for recording automation. The track uses the MIDI controller as if it were the same as a keyboard. "Automation writing" is to record value changes in the software itself, like riding a fader with the mouse, for instance.
 
This is going to be fun.

I hear ya. I just ordered a set of the newer sliders for $5.01 ea, as well as a couple more cases. I'm going to rebuild the controller with the faders a little closer together. Plus, I need to make sure the new faders work before updating the thread to look at those, instead of the more expensive ones.

And yeah, it's fun :)
 
Awesome!

hey bro, it's very useful, and i have a teensy 2.0 board,can it run your code to come ture the midi function?
 
hi Jbenson.

it's fantastic what you did. is it possible to manage this with NRPNs and not cc controllers.
I do not do electronics and it scares me a little ... do you think that no one can bring who can do that ...
I do not even of my sight which decreases ... lo

all the best

eric
 
Last edited:
I've been looking to build a midi foot controller for DMX lighting for the band. The behringer FCB1010 is a good product to use but I really don't want to spend $150. Did you have to do any programming on the Teensy brd?

Funny this thread popped back up, I recently finished my MIDI DMX light controller. I used the Teensy 3.2 board, a few switches and LED's. There was code already written for the board, but I learned some of it then customized it to fit my purposes.



20201005_001032878_iOS.jpg

The second pic shows what my brain must look like at times. I didn't cut the wires to length nor wrapped them up into bundles, just let them go where ever. I mounted the Teensy board then built a bus board for all the grounds. The LEDs need a resistor and since only one or two LEDs are lit at any one time, I needed only one resistor. So, one side of the buss board is for LED ground, then the resistor connects them to the the other side where all the switches are grounded.

20201005_001019218_iOS.jpg

When I was done, I put a zebrawood veneer on it. I should have veneered it before cutting all the holes, but I didn't think about it then. The two switches on the right are page switches so I can page through different groups of presets. There are three green LEDs for the pages and the switches cycle up or down through them. Then each preset switch has its own red LED. Eight preset switches and three pages gives me 24 presets.

The unit sends Note On events through USB to my laptop which runs QLC+ DMX lighting control software. The software sends DMX control through a USB to DMX controller which go out to the lights.

20201019_021154756_iOS.jpg

I've used this unit for a couple of gigs already and it worked quite well.
 
well done!!!
I dream of knowing how to do that. I don't know anything about it and I wonder if we can put motorized faders.

i want to do this.

vue 3D de la personaisation de deux bcn44 panneau avant V1.03.jpgvue 3D de la personaisation de deux bcn44 panneau avant V1.04.jpg

I am using two behringer bcn44 coupled together for this.
 
vue 3D de la personaisation de deux bcn44 panneau avant V1.04.jpg

I have many questions.

can we put motorized faders. if it is possible how to weld them? how to change the program so that it is NRPN and not CC midi? I don't know anything if someone can help me

bcn44 interface midi vue de dessous.jpgbcn 44.jpgPLue éléctronique 1 avec le metre.jpg
 
Back
Top