0

MIDI FeatherWing w/ Arduino Uno?
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

MIDI FeatherWing w/ Arduino Uno?

by jessefischer on Wed Jan 13, 2021 11:49 am

Hi, first time posting. I'm not sure whether to post this in Feather or Arduino forums. I have an Arduino Uno and I want to add MIDI input and output for a project I'm working on. Will the Adafruit MIDI FeatherWing work directly with my Arduino Uno? Or does it require a Feather? Secondly, is there a pinout available? I'm a little confused about the photos showing the headers with 12 pins on one side and 16 pins on the other; if I understand MIDI correctly it should be a max of 6 pins to connect (3 for input, 3 for output). Thanks for helping me out!

Best,
Jesse

jessefischer
 
Posts: 5
Joined: Wed Jan 13, 2021 11:45 am

Re: MIDI FeatherWing w/ Arduino Uno?

by dastels on Wed Jan 13, 2021 2:31 pm

The headers on the sides of the board are how it connects, both physically and electrically, to a feather MCU board.

It won't work on the UNO for the same reason it won't work on the Feather 328: they don't have dedicated serial pins., The ones marked Tx/Rx are used for USB:

Because we use the UART, this works with all Feathers except for those with USB-Serial converters that use the UART pins. Right now that means the ESP8266 Huzzah Feather, 328p Feather and nRF52 Feather don't work because they use the hardware UART for programming. Any other Feathers with native USB will work just fine.


My advice is to get a Feather, preferrably an M4Express. Not only will it "just work" with the MIDI wing, it's will give you far better performance, more memory, and the option of using CircuitPython should you wish.

Dave

dastels
 
Posts: 4858
Joined: Tue Oct 20, 2015 3:22 pm

Re: MIDI FeatherWing w/ Arduino Uno?

by jessefischer on Wed Jan 13, 2021 3:29 pm

Thanks for your quick reply! Do you have a recommendation for a MIDI shield that will work with the UNO then?

In the Arduino example that's linked to in the description, it shows that you can connect a bare MIDI connector to an UNO via the Tx pin, for MIDI OUT. Is there a reason you couldn't do the same thing with the Rx pin for MIDI IN (I don't quite get the optocoupler but it seems like you need an optocoupler for input.)

https://www.arduino.cc/en/Tutorial/BuiltInExamples/Midi

Thanks,
Jesse

jessefischer
 
Posts: 5
Joined: Wed Jan 13, 2021 11:45 am

Re: MIDI FeatherWing w/ Arduino Uno?

by dastels on Wed Jan 13, 2021 3:37 pm

An optocoupler electrically isolates the two sides. You don't even need a common ground.

The problem is that the Rx/Tx are used for USB which could mess up the MIDI data. While Adafruit doesn't carry a MIDI shield, I see that there are various options available.

Dave

dastels
 
Posts: 4858
Joined: Tue Oct 20, 2015 3:22 pm

Re: MIDI FeatherWing w/ Arduino Uno?

by jessefischer on Wed Jan 13, 2021 3:56 pm

Thanks again. I'm not sure if I get it, because the examples I see online do show the Tx pin being used for MIDI (I'm assuming you would have to unplug the USB cable after you load the program then? It sounds cumbersome.) Is there any other reason you couldn't use a bare MIDI connector connected to Rx pin with an optocoupler for MIDI IN as well?

Do you have a recommendation for MIDI shield? I couldn't find any except the MIDI FeatherWing here, or else a SparkFun unit is the only other one I see in a quick Google search.

Thanks,
Jesse

jessefischer
 
Posts: 5
Joined: Wed Jan 13, 2021 11:45 am

Re: MIDI FeatherWing w/ Arduino Uno?

by dastels on Wed Jan 13, 2021 4:13 pm

Yes, you could not have MIDI and USB connected at the same time since they use the same Tx/Rx lines. This can be a severe limitation of the 328 based boards.

The MIDI wing is basically just a physical platform for the connectors; the wiring is a pretty simple opto-coupled serial connection.

Sparkfun makes good products. I'd go there before going to an unknown vendor on Amazon.

Dave

dastels
 
Posts: 4858
Joined: Tue Oct 20, 2015 3:22 pm

Re: MIDI FeatherWing w/ Arduino Uno?

by jessefischer on Wed Jan 13, 2021 7:49 pm

Okay thanks this helps me a lot. And if I wanted to go the Feather route, what exactly is the M4Express? it's like an Arduino compatible microprocessor, but it would have additional serial connection?

Jesse

jessefischer
 
Posts: 5
Joined: Wed Jan 13, 2021 11:45 am

Re: MIDI FeatherWing w/ Arduino Uno?

by dastels on Wed Jan 13, 2021 8:04 pm

You can use the Arduino environment/framework, yes. It's *mostly* compatible. There are some advanced things that aren't quite becasue it uses quite a different microcontroller. It's fast with lots of memory. https://www.adafruit.com/product/3857. See https://learn.adafruit.com/adafruit-feather-m4-express-atsamd51/setup for more on using it with Arduino. The full guide is at https://learn.adafruit.com/adafruit-feather-m4-express-atsamd51.

It has a completely separate/dedicated USB connection so the serial lines are completely available. The MIDI featherwing just snaps on top of the feather (given they have appropriate headers installed.

Dave

dastels
 
Posts: 4858
Joined: Tue Oct 20, 2015 3:22 pm

Re: MIDI FeatherWing w/ Arduino Uno?

by jessefischer on Wed Jan 13, 2021 9:41 pm

Thanks for all the info Dave, I really appreciate it! Long time coder & musician but newly getting into hardware.

Jesse

jessefischer
 
Posts: 5
Joined: Wed Jan 13, 2021 11:45 am

Re: MIDI FeatherWing w/ Arduino Uno?

by dastels on Wed Jan 13, 2021 9:43 pm

Cool. Have fun!

Dave

dastels
 
Posts: 4858
Joined: Tue Oct 20, 2015 3:22 pm

Please be positive and constructive with your questions and comments.