DIY Midi Foot Controler for AxeFX (Guitar Effects Porcessor)

Status
Not open for further replies.

bossredman

Well-known member
Hi,

I’m about to embark on my first midi based project & looking to build my own Midi Foot Controller to allow me to send Midi Commands to a Guitar Effects processor (an Fractal Audio AxeFX 2) and was wondering if any of the Teeny USB boards would be suitable.

Examples of possible commands are:
Preset increment (+1)
Preset increment (+10)
Preset decrement (-1)
Preset decrement (-10)

BANK increment (+1 - start at 1st preset of new bank)
BANK increment (+1 - start at same preset number of new bank as currently on in current bank)
BANK decrement (-1)
BANK decrement (-1 - start at same preset number of new bank as currently on in current bank)

Scene switching
Effect toggling (ie ON/OFF)

Inputs would be:

10 to 20 momentary switches.

1 to 2 Analogue inputs for Volume Pedals, Wah Pedal etc.

Output would be:

5 pin Din midi OUT port

Would also maybe look at some point in future to integrate an LED display too (to display current BANK#, PRESET # & PRESET NAME) – not a deal breaker.

I assume the USB port on these boards is to allow programming of the Midi CPU – would that be correct?

Are you able to advise pls.

I’m fairly new to this so any help you could offer would be great pls.

Thanks
 
Teensy 3.1 is a great board for MIDI stuff, I'd check out

this: https://www.pjrc.com/teensy/td_libs_MIDI.html

and this: https://ccrma.stanford.edu/~craig/articles/linuxmidi/misc/essenmidi.html

MIDI out is a real simple circuit, just follow the schematic on the first page, and use 47 ohm resistors in lieu of 220 if using T3.1
Then you can use the MIDI library if you want, or just send serial bytes manually at 31250 baud which is what I prefer. Search for Arduino MIDI and you'll find tons of tutorials, which can easily be followed with a teensy instead and it'll fit nicer in a foot pedal situation than an arduino would.


Also I've used a couple of these chinese LCDs, can't beat the price:
http://www.ebay.com/itm/1602-16x2-HD44780-Character-LCD-Display-Module-LCM-blue-blacklight-New-2014-/181295337227?hash=item2a360b4f0b

you'd have plenty of pins to implement it even if you use more than 10 switches
 
Thanks a lot - appreciate your help.

I'll have a read through those links in detail ASAP.

I'm UK based - so did a search for UK based suppliers.

Does this one look like a genuine Teensey 3.1?

http://www.ebay.co.uk/itm/Adafruit-Teensy-3-1-header-/161393801841?pt=LH_DefaultDomain_3&hash=item2593d1fa71

Also ref the LCD's, looks like the Chinese ones you suggested don't ship to the UK.
Is there anything specific I need to look out for when sourcing an LCD that will be compatible with the Teensey 3.1?

Cheers
 
Yeah that looks legit, and for lcds, just search ebay for HD44780 and you'll find tons of other people selling em like this one:
http://www.ebay.co.uk/itm/5V-1602-16x2-HD44780-Character-LCD-Display-Module-LCM-Blue-Blacklight-Rasp-Pi-/261632529154?pt=LH_DefaultDomain_3&hash=item3cea839302

Or if you can wait 2-3 weeks you can find one dirt cheap from China. I once got one for $1.58 including shipping. This means a factory made it, a distibuter handled/sold it/paid ebay fees, and then shipped it 12000km for less than it would cost me to send a padded envelope to the next town over in the US ($1.93). How someone is making money in that transaction I just don't know.
 
Once again thanks.
Parts ordered just need to find some good tutorials to follow so will follow your initial advise on that too.

One thing I'm not clear on.
Does midi out only allow me to send data to another device's midi in.
Or can it receive data back too?
I plan to send program change commands to increment the presets.
Just wondering if I can request preset name from the axefx and receive back to display on LCD or do I need mini in too.
 
One thing I'm not clear on.
Does midi out only allow me to send data to another device's midi in.
Or can it receive data back too?

Serial MIDI (5 pin DIN connectors) is unidirectional on each cable. To move data in both directions, you need 2 cables. That has nothing to do with Teensy... it's simply how standard MIDI cables work.

If you build the recommended circuit shown here, there are 2 connectors, for IN and OUT.

But if you only build the OUT side, with just a connector and a couple resistors (don't forget to use 47 ohm if Teensy 3.1), it can't possibly receive data.
 
Thanks Paul,
OK off to a bad start already.
Received my Teensey 3.1 today and whilst trying to solder the headers in , managed to solder all the legs on one side of the chip together.
Off to buy a solder sucker tomorrow - doh.
What a clown I am.

So my next question if people are still prepared to help an idiot is,can someone explain why the pins are seemed to be labelled several times pls as different types.
Eg pins 13 to 23 on the RHS also are labelled, led. And A0 to A9.
And then again various touch, pwm etc.
Does it mean they can only be used for either or?

I am totally new to this but learning as I go along.
 
can someone explain why the pins are seemed to be labelled several times pls as different types.
Eg pins 13 to 23 on the RHS also are labelled, led. And A0 to A9.
And then again various touch, pwm etc.
Does it mean they can only be used for either or?

Yes, it means the pin can be used in several different ways.

For example, pin 14 could be used as regular digital input or output. But it can also be used to read an analog signal. Or if can be used to output the SCK clock of the SPI port.

Which function it actually does depends on your code. If you use the SPI library and you add SPI.setSCK(14) to your program, it will become the SCK output. If you later use pinMode(14, INPUT_PULLUP), it will be reconfigured to a digital input with weak pullup.

The chip has an amazing number of capabilities. There can't be one dedicated pin for everything. Even if that could be the case, you probably wouldn't want that. If you're never going to use SPI communication, it's pretty handy to be able to reuse those pins for other stuff.
 
OK thanks.
thought I was getting 34 dig io PLUS 21 an io etc.
May have to rethink as initially needed
19 switches
13 LEDs
2pots
Midi out
Midi in
20 x 4 LCD screen (will look now for number of ports required as not 100% sure yet )
 
Ok - initial hardware now setup (1 switch & 1 LED & MIDI OUT).
Plan was to get this one switch sending a Program Change to my AXEFX & then expand from there.

First pass was just to try & send serial bytes at 31250 baud.
Can't get the AXEFX to recieve the midi command (ie it has a Midi light that should flash upon receipt of a Midi msg - definately works with an other controller).
So I guess it's either my code or wiring at fault.

I'll start with wiring - does this look correct? How can I verify?
I've followed the wiring as per suggested above:
Pin 4 (Midi Connector - 2nd from Left when viewed from rear) > 47 Ohm resistor > +5V (rail on breadboard)
Pin 2 (Midi Connector) > Ground
Pin 5 (Midi Connector - 2nd from Right when viewed from rear) > 47 Ohm resistor > TX1 (Pin 1 on Teensey 3.1 - ie 3rd from left on bottom when USB port is on LHS)

If this looks good then I post code.
 
Can some pls post some really basic code for initialisation, just to do a program change to program 35 pls on start up.
Both via use of the midi library & serial.

I've tried all sorts and although now I can get the Midi light on the AxeFX to blink - it does not change the preset.
Wondering if my syntax is wrong.
 
aha - sorted.
After 4 hours of fumbling around I stumbled on the issue.

Wiring was ok.
I found the correct sytnax was actually - "MIDI.sendProgramChange( PRESET_NUM, CHANEL_NUM );".
 
UPDATE:

Got the basics working. Ie
Peset incr/decr
Scene incr/decr
Bank incr
Toggle Preset incr/decr value between 1& 10. - lights LED if 10.

So my next issue is how do I get the led to blink yet still poll through switches to see what's being pressed.
Its almost like 2 sections of code running in parallel.
 
Can anyone advise on a wiring diagram for how to hook up the Teensey 3.1 to a LED screen pls:
HD44780 Backlit 2004 LCD Display Blue Backlight 20x4 Arduino Raspberry Pi AVR.

I can seem to find loads of sites listing what the pins on the LCD are - but struugling to see how some relate to the pins on the Teensey 3.1.

CD Pin Function Teensey 3.1 Pin?
1 Ground (Vss)
2 +5 Volts (Vdd)
3 Contrast Adjust (Vee)
4 RS
5 R/W (or Ground)
6 Enable (E)
7 D0 (no used)
8 D1 (no used)
9 D2 (no used)
10 D3 (no used)
11 D4
12 D5
13 D6
14 D7
15 Backlight Power
16 Backlight Power

Can anyone fill in the Teensey 3.1 column pls or post a site pls.
 
Details are here:

http://www.pjrc.com/teensy/td_libs_LiquidCrystal.html

Basically, you need to connect RS, E, D4, D5, D6, D7 to digital pins. It doesn't matter which digital pins. You can choose any that are not needed for all the other stuff you're using. Just put those 6 numbers into the code, as described on that page. Or if you can't choose, just use pins 12, 11, 5, 4, 3, 2, as the example shows.

The R/W pin needs to connect to ground. You need to connect power to VSS and VDD, and the pot to VEE for contrast, and power to the backlight (maybe with a resistor to limit the current - some displays have the resistor built in, others make you provide it).
 
Am i correct in thinking that the Teensey 3.1 has both internal pull-up AND down resitors?

Currently I have 10 switches in my project.
Wiring for each is:
1 wire from 1st sw terminal to +5v
1 wire from 2nd sw terminal to I/O pin.
1 wire also from 2nd sw terminal to RESISTOR then to GROUND.

TBH - it works perfectly fine - but breadbaord looks a mess.
and I have more switches to add.

If i where to use the internal pull-down resistor, would that eliniate the need for 2nd wire from the 2nd sw terminal to teh resitor & ground completely?

Do also just change the setup code:
from: pinMode( 3, INPUT );
to: pinMode( 3, INPUT_PULLDOWN);
 
6N138 will probably work. I'd connect +5V pin 8 and a 270 to 470 ohm pullup resistor from pin 6 to +5V.

Teensy 3.1 is 5V tolerant, so it should handle the 5V output signal from the 6N138.

If you were using Teensy-LC, you'd need to connect +5V to pin 8, but the pullup resistor to +3.3V.
 
Im now trying to get the MIDI-IN working.
1st step was to send a sysex msg to get the current "preset name", read what comes back & display accoridng on the LCD.
At this stage I'm just sending teh same msg & should therefore recieve the same back each time.

I'm doing this repeated initially in the void loop() to get it working right before integrating it to only work on demand via a push switch.

Although i have managed to actually read & display the name, it appears to only work after several loops of sending & reading the sysex msg. (does that confirm I have my MIDI-IN circuit correct atleast ??).
After several receipts - It then stops recieving.
Also the returned msg sometimes comes back corrupt & the array size varies.
eg
Bassman About 2 Explode = GOOD
Bassðððððððððððððððððððððððððððððððððððððððððððððððððððððððððð = BAD

An example of how this is running is:
1 - send msg - NOTHING returned
2 - send msg - NOTHING returned
3 - send msg - NOTHING returned
4 - send msg - NOTHING returned
5 - send msg - NOTHING returned
6 - send msg - "Bassman About 2 Explode" returned.
7 - send msg - NOTHING returned
etc

byte data[8] ={0xF0, 0x00, 0x01, 0x74, 0x03, 0x0F, 0x09, 0xF7}; //sysex msg:
MIDI.sendSysEx(8,data,true);

if (MIDI.read())
{
MIDI.getSysExArray();
const byte *pMsg = MIDI.getSysExArray();
sizearray = MIDI.getData1();

for (int n = 6; n < sizearray; n++)
{
Serial.write(pMsg[n]);
}
delay(200);
}

Any ideas pls?
 
Am i correct in thinking that the Teensey 3.1 has both internal pull-up AND down resitors?

Currently I have 10 switches in my project.
Wiring for each is:
1 wire from 1st sw terminal to +5v
1 wire from 2nd sw terminal to I/O pin.
1 wire also from 2nd sw terminal to RESISTOR then to GROUND.

TBH - it works perfectly fine - but breadbaord looks a mess.
and I have more switches to add.

If i where to use the internal pull-down resistor, would that eliniate the need for 2nd wire from the 2nd sw terminal to teh resitor & ground completely?

So - I'm now at a stage of transitioning from breadboard to vero-board.

Is there anything I need to consider when deciding whether to use external vs the internal PULLDOWN resistors.

My proto used external - but tempted to switch to the internals on the Teensy purely out of tidiness.

Cheers
 
Status
Not open for further replies.
Back
Top