Go Down

Topic: Mono Jack 6.3 mm to USB using Arduino to send midi CC (Read 284 times) previous topic - next topic

pyronb

Hi there,

I'm going to build a simple Arduino device and I need your guidance : )

The goal here is to use my Double footswitch Boss pedal (via 2x Mono Jack 6.3 mm cables) to control Ableton Live parameters.

Today, i'm using my master keyboard to connect the pedals and send midi CC messages to usb using its software.
The goal of my project is to replace the keyboard with a (transportable) Arduino box that takes jack cable as input and usb as output, while preserving the momentary & latch signals sent by the pedal.

From my researches, I need :


So here is a few questions :

  • Would this setup work or am i missing something ?
  • Should I use any resistance between my jack sockets and the Arduino connectors ?
  • If yes, how to know which resistance value to use ?
  • What kind of cables should I use to connect the jack sockets to the Arduino connectors ?
  • Is it necessary to use a breadboard or can I solder directly on Arduino headers?

Looking forward your guidance, I wish you all a great day
David

DVDdoug

There is a USB MIDI library for the Arduino, but I don't know anything about it.  

Quote
2.Should I use any resistance between my jack sockets and the Arduino connectors ?
3.If yes, how to know which resistance value to use ?
I assume the switches can be wired so they switch between ground & open?

In that case, simply enable the Arduino's internal plull-up resistor(s).   When the switch is open the resistor pulls the input high.   When the switch is closed (on) it will ground the input "overpowering" the pull-up resistor pulling the input low.

Quote
4.What kind of cables should I use to connect the jack sockets to the Arduino connectors ?
Since it's DC and almost no current, any wire/cable will work.   (Use something rugged, of course).


Quote
5.Is it necessary to use a breadboard or can I solder directly on Arduino headers?
The headers on the board are female, so you can't solder to them but you can solder directly to the bottom of the board.   I've never done that because it makes development/testing/troubleshooting more difficult and the thing is less serviceable.

I've soldered wires to header pins, and covered the solder joints with heatshrink to make a connector, but I'm really not satisfied with that.  

I'm probably going to use a Arduino-shield perfboard next time to make the connections and/or to adapt to some "normal" connectors (and maybe for some other circuitry), or I may get a custom "shield" PC board made..  






PieterP

The Uno and Mega boards are not good choices for a USB MIDI device, because they don't have a native USB connection, they communicate with the computer over a serial TTL connection to a second microcontroller (ATmega16U2) that acts as a virtual USB COM port. This means that it doesn't support MIDI over USB unless you upload custom firmware to the ATmega16U2. Not recommended for beginners and very cumbersome during development and debugging.

I'd recommend an Arduino Micro, Leonardo, or a Teensy.
If you need more I/O, use a Due.

Read this for more information about MIDI over USB and how it works on different Arduino boards:
https://github.com/tttapa/MIDI_controller/wiki/MIDI-over-USB

Pieter

pyronb

@DVDdoug

any wire/cable will work.   (Use something rugged, of course).
Could I use those ones ? or those ? If you can recommend some high quality ones, i'd be grateful

I'm probably going to use a Arduino-shield perfboard next time
Thanks for that advice, i'll probably go with a protoshield. It will do for a first version and i'll work on the size later on


@PieterP

The Uno and Mega (...) doesn't support MIDI over USB unless you upload custom firmware (...) I'd recommend an Arduino Micro, Leonardo, or a Teensy.
Thanks a lot for that crucial info! I have read about some boards with native usb support but it didn't seem critical to my project.
I have actually read about a few projects using Uno board for making midi controllers, does it mean they have loaded a custom firmware to make it work ?

Read this for more information about MIDI over USB and how it works on different Arduino boards:https://github.com/tttapa/MIDI_controller/wiki/MIDI-over-USB
Interesting reading, thanks a lot!
Out of curiosity, would you recommend using Chinese clones, quality wise ?

PieterP

Thanks a lot for that crucial info! I have read about some boards with native usb support but it didn't seem critical to my project.
I have actually read about a few projects using Uno board for making midi controllers, does it mean they have loaded a custom firmware to make it work ?
Yes, you either need to have special software running on the computer (not great if you just want your controller to work instantly when you plug it into any computer) or custom firmware in the ATmega16U2.
Both solutions are a real pain (been there, done that). You can't upload Arduino programs while this firmware is loaded (unless you have an external programmer or USB-to-Serial converter connected).
Do yourself a favor and get a board that's suited for the job, it'll save you a lot of time and effort. An Arduino Uno or Mega simply wasn't designed to do advanced USB stuff.
Interesting reading, thanks a lot!
Out of curiosity, would you recommend using Chinese clones, quality wise ?
I always buy an official board first, to support the development. Then when I blow the original one up, or if I need a second one for prototyping, I sometimes get a Chinese clone.
Can't complain about the quality of the Chinese boards I got, however, if you really really want to use an Uno clone for USB MIDI, make sure you get one with an ATmega16U2, and not one that uses an FTDI FT232 or CH340G or cp2102. Beware false advertising, some sellers show pictures of an ATmega16U2 while the description says it's a CH340G. Most of the time this means that it probably comes with the CH340G, which can't be used for USB MIDI.

Or just avoid all these problems, and get a Leonardo (clone?) with native USB support. There's really no point in choosing an UNO for USB MIDI if you have to buy a new board.

Pieter

pyronb

Thanks a lot PieterP for all those infos. I'll definitely take those under account.

By any chance, do you know of a nice electronic components online store located in Europe ?
Sparkfun looks good but shipping from the States are are gonna cost a lot for me

David

DVDdoug

Could I use those ones ? or those ? If you can recommend some high quality ones, i'd be grateful.[/quote]The first is good for internal wiring.   22 or 24 gauge is about right.    The second is good for connecting to the Arduino header sockets or to a plug-in breadboard and/or experimenting & prototyping.  You may not need them with a protoboard.

But, I thought you were asking about soldering to the 6.3mm plugs to make cables and I was thinking about something like this.   Of course, if you are using 6.3mm jacks (sockets) on the Arduino-side, you can use pre-made cables for connections to the floor-switch.   

I agree with Peter about the Chinese stuff (or eBay or Alibaba)...   A lot of it is poorly documented and I "feel better" about buying from a reputable supplier and a known manufacturer.   i.e. Sparkfun & Adafruit (which I realize are U.S. suppliers) usually link to the chip-manufacturer's datasheet, and if it's a circuit board there is usually a schematic, and often some application examples, etc.

And when you add-up the real total-cost of your project, including the case, power supply, switches, knobs, connectors, and all of the little things, you aren't saving much money by skimping on the "most important" electronic components.   

If you're going "into production" and you need to make a profit, then it's more important to minimize costs...  If you can save 5 or 10%, that goes directly to profit or it allows you to compete.  (Of course, that doesn't mean you can use unreliable parts.)    But as a hobbyist, you're going to spend more than you expect anyway and you're going to spend lots of development time for a one-off project and not worth taking chances with unknown parts.     

Grumpy_Mike

Quote
you either need to have special software running on the computer (not great if you just want your controller to work instantly when you plug it into any computer)
True, but if you don't mind a helper application on your PC the one called hairless is the best. Versions for most OS. It converts a serial stream into a MIDI stream.

As to an electronics store then I would recommend Farnell or Rapid

pyronb

The first is good for internal wiring.   22 or 24 gauge is about right.    The second is good for connecting to the Arduino header sockets or to a plug-in breadboard and/or experimenting & prototyping.  You may not need them with a protoboard.
I'm new to this and I can't really make sense of that sentence to be honest. Could you throw a link about wire documentation by any chance so that I learn a bit about that ?

But, I thought you were asking about soldering to the 6.3mm plugs to make cables
No no : ) I have cables already. What I need to do is to solder those female sockets into the Arduino (using some cables I guess). That's for that purpose that I need those cables.

Speaking about soldering, I didn't looked deeply yet into the connection that I would have to make. Could you please tell me if those tutorials are good exemple for what i'm trying to accomplish ? Here, here, here, here and here.
I couldn't find tutos using jack sockets but midi ones should be somewhat close, am I right ?


usually link to the chip-manufacturer's datasheet, and if it's a circuit board there is usually a schematic, and often some application examples, etc.
not worth taking chances with unknown parts.
Good to know, it can't hurt for a first project to go with the real deal.

Grumpy_Mike

https://en.m.wikipedia.org/wiki/Wire_gauge

Into the Arduino's female sockets you plug male header pin strips. Then you solderd to those header pins.
Google DuPont header pin strip
header pin strips

pyronb

https://en.m.wikipedia.org/wiki/Wire_gauge

Into the Arduino's female sockets you plug male header pin strips. Then you solderd to those header pins.
Google DuPont header pin strip
header pin strips
Ahah everything makes sense now : ) Thanks a lot

I'll make all required purchases in the next few days and keep you all updated on how it goes.

David

pyronb

Hey guys, I have picked everything needed for the project  (gonna go with Due, Pro Micro or Teensy btw) but i'm struggling to pick the 1/4 inch 6.35mm female Jack socket mono.

Here the selection I have made so far, can you please help me decide which to pick ?

Choice 1

Choice 2

Choice 3

Choice 4

I'm open to any other connection of course

I wish you all a great weekend

Grumpy_Mike

Any will do. Basically their are PCB mounting or panel mounting, so it depends on how you intend to box your project.

pyronb

Cool thanks Grumpy_Mike !

I have found some exactly like Choice 1 by visiting a few shops in my city yesterday : )


Go Up