Show Posts
Pages: [1]
1  Using Arduino / Audio / Re: MIDI input troubles on: October 14, 2012, 09:08:55 pm
I've been able to get to the bottom of my issue and wanted to share what I tried in case it helps others. I used the software serial library to receive the input from the midi circuit and mirror it back to my computer using the usual serial methods. Doing this I discovered that my midi device was sending a `11111110` byte down the wire near constantly. This is a "Active Sensing" message, it's a normal thing for a midi device to do, but just something I was unaware of. So what I though was a short, was actually my arduino board dutifully receiving midi and notifying me about it!
2  Using Arduino / Audio / Re: arduino MIDI input on: October 10, 2012, 07:29:37 pm
  • What does your circuit look like?
  • What midi library are you using and what version?
  • What behavior are you seeing currently?
Disclaimer: I'm also struggling to get MIDI input working, so don't expect to much from me smiley
3  Using Arduino / Audio / Re: MIDI input troubles on: October 10, 2012, 07:20:20 pm
Thanks for the reply!

Regarding the photo, I've uploaded one of the actual circuit I'm using[1]. The only difference from the MMA spec is that I'm using two 220 Ω resistors in place of a 470 Ω, but it's something I read others have done without any issue[2]

To be more specific than "no luck", my project's eventual aim is to handle note-on/off and control change messages. In my initial tests I'm just looking to flash the LED on pin 13 on when a note-on is received. What I'm seeing now is that the LED hard wired to pin 13 comes on and stays on.

I've actually got a saleae logic analyzer[3], so tested the inputs by putting a 1k Ω resistor between pin 5 and 4 of the MIDI input and have been able to see the signal coming off of devices using the saleae. It looks good, I can decode it, etc... When I try to look at the output from the circuit however, I'm not able to detect anything not with the saleae or just a LED.

The board I'm using is an Arduino Uno, and I am using digital pin 0 (the serial in) for MIDI in. When uploading a sketch I disconnect the MIDI so it doesn't interfere, and when actually running the sketch I'm not attempting to use the serial I/O for anything except MIDI.

Thanks again for your help, and hopefully something here makes it clear what I'm doing wrong.

1: http://www.flickr.com/photos/jsmiccolis/8075476742/in/photostream
2: http://www.instructables.com/id/Send-and-Receive-MIDI-with-Arduino/step9/Receive-MIDI-Messages-with-Arduino/
3: http://www.saleae.com/logic
4  Using Arduino / Audio / MIDI input troubles on: October 09, 2012, 09:38:30 pm
I'm having trouble getting midi input working. I've built the MIDI input circuit using a Sharp PC900V, so basically keeping as close to the official spec[1] as possible. I've been able to verify that the optoisolator is working fine; I've built a test circuit with a LED connected to the output of the optoisolator, when I power up the circuit the LED comes on and if I apply a couple volts across the emitter it shuts off[2]. So the circuit itself seems ok.

However, when I connect a midi device to the input I get no luck. I've tried MIDI outputs from two difference devices; a Oxygen 8 keyboard and a old emagic mt4. Neither out which give me anything . If I put a LED and a ~220 Ω resistor between pins 2 & 5 of the MIDI input I can faintly see it glow as events are sent, so I have to assume that everything looks good there and it's providing enough power for the LED in the optoisolator. However if I put a LED & resistor between the output of the optoisolator and ground I get no flashing at all, it just stays on, which is curious.

When trying to test the MIDI input I've got got the Arduino on it's own power supply, not USB power. And when uploading to the Arduino I've found I need to disconnect it from any MIDI device, or the upload will fail.

Now for the strange part. The LED hard-wired into pin 13 has done some strange things when everything is connected and powered up. I'm using very simple test programs[3], but what happens is the LED does the initialization blink, then goes on, and stays on, until i disconnect the input from the serial rx (pin 0). Could this be a short somewhere?

Any help or guidance would be great, I've been stuck on this for far too many evenings!


1: http://www.midi.org/techspecs/electrispec.php
2: http://www.flickr.com/photos/jsmiccolis/8059406413/in/photostream
3: https://gist.github.com/1e9ef74f04f28e217878
Pages: [1]