Author Topic: MIDI controller - AUX jack design.  (Read 305 times)

lukatosh

MIDI controller - AUX jack design.
« on: July 26, 2020, 11:10:15 PM »
Hello greetings from Chile. I hope they are well in the  COVID-19 pandemic.

I would like to ask from some advice on a design that I'm working on. I'm planning to build a MIDI foot controller using an arduino board. I would like to add an "aux" jack  who could work as an expression pedal input or to add 2 more stomp switches.

As reference, i've looked at the MorningStar MC6 mannual. It says this: The potentiometer wiper should be connected to the Tip of the stereo cable, while the Ring and Sleeve should be connected to the outer lugs on the potentiometer.

Then, googling,  i've found this diagram. There you can see that a "current limit resistor is used".



So... I've made this diagram to achieve what i'm looking for. (The gray area are the options that i could connect to the aux switch)



I have two main Questions.

1.- Is the current limit resistor really needed? What values i need to use?

2.- As you can see, the 3rd lug of the potentiometer is going to be connected to 5v. This voltage can be a pin set to a HIGH level? or it must be tied to a  "true" 5v source?

My goal is then use the same pin for provide the 5v (expresion pedal) and digital read the stomp switches.

(3).- Another idea is to use software serial mod to send MIDI trough A0 pin... but here a resistor is needed. Maybe the "current limit" resistor would work... but the MIDI standard suggest a 220Ohms (at 5v). Don't know if a 220Ohms would work or achieve it pourpose as"current limit resistor"  in the "expressión pedal" configuration.

(By the way... whe using this aux jack to add two more stompswitches i will set the internal pull up resistors of the arduino)

Well that's it... i'm trying to do my best with the english writing. Hope you can understandme. I really aprecciate your help guys. thanks so much!

potul

Re: MIDI controller - AUX jack design.
« Reply #1 on: July 27, 2020, 05:36:07 AM »
1 - I don't think you need a limiting resistor for the expression pedal. I have never used it in my projects.

2 - If the pot have a high value (10k upwards), you will really draw little current. You can use the output pin set at 5v.

3 - Not sure if this will work. Why do you want to use the same jack and not use a dedicated MIDI out?

On the other hand, the schematic looks ok, but there is a possible issue if you connect a foowswitch but the Arduino is in Expression mode, you might be shorting A1 from 5v to ground, and this an power cycle the arduino.

lukatosh

Re: MIDI controller - AUX jack design.
« Reply #2 on: July 27, 2020, 09:55:57 AM »
well... Maybe that's the purpose of the current limit resistor.

If I'm thinking this right, when the pin is shorted, by ohm's law a 1/4 watt 220 Ohm could do the work (22.7mA, 113mW). At least it would give time for the user to realize that the aux jack working mode is not propperly configured without damaging the arduino.

Interesting...  Maybe that resistor need to be on both lines A0 and A1.

About sending MIDI (that could be done using the same 220 ohm)... there are new pedals that already work with MIDI through a TRS jack.  It could be an optional feature.

Another approach to this issue could be warn the user to only insert TRS plugs to the "aux" jack... But this is not a "real" solution.

Thanks so much!



potul

Re: MIDI controller - AUX jack design.
« Reply #3 on: July 28, 2020, 02:12:10 AM »

About sending MIDI (that could be done using the same 220 ohm)... there are new pedals that already work with MIDI through a TRS jack.  It could be an optional feature.


I know about this, the question was, why not using a dedicated jack for midi? Reusing this jack means you will not be able to use midi when having an expression pedal... And managing MIDI from the standard UART pins is much easier.

Blackaddr

Re: MIDI controller - AUX jack design.
« Reply #4 on: July 29, 2020, 07:43:13 PM »
That's a pretty cool diagram you found there!  ;)

Expression pedal manufacturers put the current limit resistor there because not all expression pedal jacks are wired the same way. Some think the POT wiper should be connected to the TIP and some think the wiper should be connected to the RING. Some let you switch the behavior of the two, either at the expression pedal on on the device with the jack. What happens if they're configured opposite to each other?

In that diagram, consider what happens when the pot is turned all the way down, so the wiper is at GND and pretend R2 isn't there, so the wiper is connected directly to the RING. If you then accidentally plug it into something that is wired with the power supply on the RING, and the wiper on the TIP, you've now shorted the power supply to ground and probably fried your pedal or at least blown a fuse.

The current limit resistor ensures that if the expression pedal or the effect/midi box are configured backwards, it won't work properly, but nothing is damaged as the supply now simply connects to ground through the current limit resistor.

Reasonable values for the limit resistor are anywhere from 100 ohm to 1Kohm.

You also need to consider what happens as you physically push the plug into the socket. Let's assume the expression pedal uses the TIP for the wiper, and the RING for power supply and everything is configured to match. Let's again assume the wiper is all the way to GND to the TIP is at GND. As you slide the plug in, the tip will momentarily have contact with the RING terminal in jack before it is all the way in. Again, you just shorted out the power supply.

In summary, manufacturers who put an expression jack on their product don't trust the expression pedal to be wired with a current limit resistor, say they put their own limit resistor between the power supply and the jack connection. Expression pedal manufactures don't trust the other guys to do that, so they put a current limit resistor on the wiper.

Neither device manufacturer wants to be dealing with deal products so they both typically add protection and so should you.
« Last Edit: July 29, 2020, 08:46:38 PM by Blackaddr »
Blackaddr Audio
Digital Modelling Enthusiast
www.blackaddr.com